ui/views/gridview/src/glxgridview.cpp
changeset 71 27f2d7aec52a
parent 69 45459746d5e8
child 72 0a8e959402e5
equal deleted inserted replaced
69:45459746d5e8 71:27f2d7aec52a
   339                 mZeroItemLabel->hide();
   339                 mZeroItemLabel->hide();
   340             }
   340             }
   341             
   341             
   342             if( isItemVisible( Hb::TitleBarItem ) ) {
   342             if( isItemVisible( Hb::TitleBarItem ) ) {
   343                 QString text;
   343                 QString text;
   344                 if(XQServiceUtil::isService()) {
   344 				if(XQServiceUtil::isService() && (0 == XQServiceUtil::interfaceName().compare(QLatin1String("com.nokia.symbian.IImageFetch")))) {
   345                     showAlbumTitle(GLX_SELECT_IMAGE);
   345 					showAlbumTitle(GLX_SELECT_IMAGE);
   346                 }
   346 				}
   347                 else if ( getSubState() == ALL_ITEM_S ) {
   347                 else if ( getSubState() == ALL_ITEM_S || ( getSubState() == FETCHER_ITEM_S)) {
   348 					if (mAlbumNameHeading) {
   348 					if (mAlbumNameHeading) {
   349                     	mAlbumNameHeading->hide();
   349                     	mAlbumNameHeading->hide();
   350 					}
   350 					}
   351 				
   351 				
   352                     text = HbParameterLengthLimiter(GLX_GRID_VIEW_COUNT_LABEL, count); 
   352                     text = HbParameterLengthLimiter(GLX_GRID_VIEW_COUNT_LABEL, count); 
   353                     mTotalImagesCount->setHeading ( text );
   353                     mTotalImagesCount->setHeading ( text );
   354                     mTotalImagesCount->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24));
   354                     mTotalImagesCount->setGeometry(QRectF(0,0,screenSize.width(),deviceSize.height()/24));
   355                     mTotalImagesCount->show();
   355                     mTotalImagesCount->show();
   356                 }
   356                 }
   357                 else if ( getSubState() == ALBUM_ITEM_S ) {
   357                 else if ( getSubState() == ALBUM_ITEM_S || (getSubState() ==  FETCHER_ALBUM_ITEM_S)) {
   358                     mTotalImagesCount->hide();
   358                     mTotalImagesCount->hide();
   359                     QVariant variant = mModel->data(mModel->index(0,0),GlxViewTitle);
   359                     QVariant variant = mModel->data(mModel->index(0,0),GlxViewTitle);
   360                     if (variant.toString() != NULL) {
   360                     if (variant.toString() != NULL) {
   361                         showAlbumTitle(variant.toString());
   361                         showAlbumTitle(variant.toString());
   362                     }
   362                     }
   705     }
   705     }
   706     OstTraceEventStart0( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START, "Fullscreen Launch Time" );
   706     OstTraceEventStart0( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START, "Fullscreen Launch Time" );
   707     if ( mModel ) {
   707     if ( mModel ) {
   708         mModel->setData( index, index.row(), GlxFocusIndexRole );
   708         mModel->setData( index, index.row(), GlxFocusIndexRole );
   709     }
   709     }
   710     if(XQServiceUtil::isService()){
   710     if(XQServiceUtil::isService() ){
   711         qDebug("GlxGridView::itemSelected actionTriggered( EGlxCmdFetcherSelect )" );
   711 		if(0 == XQServiceUtil::interfaceName().compare(QLatin1String("com.nokia.symbian.IImageFetch"))){
   712         emit actionTriggered( EGlxCmdFetcherSelect );
   712 	        qDebug("GlxGridView::itemSelected actionTriggered( EGlxCmdFetcherSelect )" );
   713         return;
   713 	        emit actionTriggered( EGlxCmdFetcherSelect );
   714     }
   714 		}
   715     emit actionTriggered( EGlxCmdFullScreenOpen );
   715 		else{
       
   716 			emit actionTriggered( EGlxCmdBrowseFullScreenOpen);
       
   717 		}
       
   718     }
       
   719 	else{
       
   720 		emit actionTriggered( EGlxCmdFullScreenOpen );
       
   721 	}
   716     OstTraceEventStop( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_STOP, "Fullscreen Launch Time", EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START );
   722     OstTraceEventStop( EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_STOP, "Fullscreen Launch Time", EVENT_DUP1_GLXGRIDVIEW_ITEMSELECTED_START );
   717 }
   723 }
   718 
   724 
   719 void GlxGridView::scrollingStarted()
   725 void GlxGridView::scrollingStarted()
   720 {
   726 {
   753     if(mModel) {
   759     if(mModel) {
   754         if ( index.row() < 0 || index.row() >= mModel->rowCount() ) {
   760         if ( index.row() < 0 || index.row() >= mModel->rowCount() ) {
   755             return;
   761             return;
   756         }
   762         }
   757         mModel->setData( index, index.row(), GlxVisualWindowIndex );
   763         mModel->setData( index, index.row(), GlxVisualWindowIndex );
   758         mModel->setData( index, index.row(), GlxFocusIndexRole );
       
   759     }
   764     }
   760 }
   765 }
   761 
   766 
   762 GlxGridView::~GlxGridView()
   767 GlxGridView::~GlxGridView()
   763 {
   768 {