ui/views/fullscreenview/src/glxfullscreenview.cpp
changeset 71 27f2d7aec52a
parent 69 45459746d5e8
equal deleted inserted replaced
69:45459746d5e8 71:27f2d7aec52a
   216     OstTraceFunctionEntry0( GLXFULLSCREENVIEW_RESETVIEW_ENTRY );    
   216     OstTraceFunctionEntry0( GLXFULLSCREENVIEW_RESETVIEW_ENTRY );    
   217 
   217 
   218     cancelSelectionAnimation(); //cancel the image selection effect before cleaning the view
   218     cancelSelectionAnimation(); //cancel the image selection effect before cleaning the view
   219     //Clean up the rest of the resources allocated
   219     //Clean up the rest of the resources allocated
   220     cleanUp(); 
   220     cleanUp(); 
   221         
   221 	//Hide ImageStrip while launching Details view
       
   222 	mImageStrip->hide();
   222     //Clear the 4 icons present in the Coverflow,so that the transition between the views are smooth
   223     //Clear the 4 icons present in the Coverflow,so that the transition between the views are smooth
   223     mCoverFlow->partiallyClean();
   224     mCoverFlow->partiallyClean();
   224     
   225     
   225     OstTraceFunctionExit0( GLXFULLSCREENVIEW_RESETVIEW_EXIT );
   226     OstTraceFunctionExit0( GLXFULLSCREENVIEW_RESETVIEW_EXIT );
   226 }
   227 }
   314     // fullscreen thumnail size is depends on orientation of phone so change the model context before changing the layout
   315     // fullscreen thumnail size is depends on orientation of phone so change the model context before changing the layout
   315     if ( mUiOff == FALSE ) {
   316     if ( mUiOff == FALSE ) {
   316         mUiOffTimer->start(KUiOffTime);
   317         mUiOffTimer->start(KUiOffTime);
   317     }
   318     }
   318     setModelContext();
   319     setModelContext();
   319     loadViewSection();
   320     loadViewSection();        
   320     setLayout();
       
   321     
   321     
   322     if ( mZoomWidget->zValue() >= mCoverFlow->zValue() ) {
   322     if ( mZoomWidget->zValue() >= mCoverFlow->zValue() ) {
       
   323         mZoomWidget->setWindowSize( screenSize() );
   323         playZoomOrientChangeAnim();
   324         playZoomOrientChangeAnim();
   324     }
   325     }
   325     else {
   326     else {
       
   327         mCoverFlow->setOrientChangeAnim( true );
   326         playOrientChangeAnim();
   328         playOrientChangeAnim();
   327     }
   329     }
   328     
   330     
   329     OstTraceFunctionExit0( GLXFULLSCREENVIEW_ORIENTATIONCHANGED_EXIT );
   331     OstTraceFunctionExit0( GLXFULLSCREENVIEW_ORIENTATIONCHANGED_EXIT );
   330 }
   332 }
   342     
   344     
   343     mUiOff = TRUE;
   345     mUiOff = TRUE;
   344 	if ( getSubState() != FETCHER_S ) {
   346 	if ( getSubState() != FETCHER_S ) {
   345 	    setViewFlags( viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden );
   347 	    setViewFlags( viewFlags() | HbView::ViewTitleBarHidden | HbView::ViewStatusBarHidden );
   346 	}
   348 	}
   347     if ( mImageStrip && ( getSubState() != IMAGEVIEWER_S && getSubState() != FETCHER_S ) ) {
   349     if ( mImageStrip && ( getSubState() != IMAGEVIEWER_S && getSubState() != FETCHER_S && getSubState() != BROWSE_S) ) {
   348         HbEffect::start( mImageStrip, QString("HbGridView"), QString("TapHide"), this, "effectFinished" );
   350         HbEffect::start( mImageStrip, QString("HbGridView"), QString("TapHide"), this, "effectFinished" );
   349     }
   351     }
   350 
   352 
   351     if(mFullScreenToolBar) {
   353     if(mFullScreenToolBar) {
   352        mFullScreenToolBar->hide();
   354        mFullScreenToolBar->hide();
   542 {
   544 {
   543     qDebug( "GlxFullScreenView::LsOrientChangeAnimFinished reason %d ", status.reason );
   545     qDebug( "GlxFullScreenView::LsOrientChangeAnimFinished reason %d ", status.reason );
   544     mIconItems[ 0 ]->resetTransform();   
   546     mIconItems[ 0 ]->resetTransform();   
   545     mIconItems[ 0 ]->setVisible( false );
   547     mIconItems[ 0 ]->setVisible( false );
   546     mBackGroundItem->setVisible( false );
   548     mBackGroundItem->setVisible( false );
       
   549     QSize sz = screenSize();
       
   550     mCoverFlow->setOrientChangeAnim( false );
       
   551     mCoverFlow->setItemSize( sz );
   547     mCoverFlow->setVisible( true );
   552     mCoverFlow->setVisible( true );
   548     mZoomWidget->setVisible( true );
   553     mZoomWidget->setVisible( true );
       
   554     mZoomWidget->setWindowSize( screenSize() );
   549 }
   555 }
   550 
   556 
   551 void GlxFullScreenView::zoomOrientChangeAnimFinished( const HbEffect::EffectStatus status )
   557 void GlxFullScreenView::zoomOrientChangeAnimFinished( const HbEffect::EffectStatus status )
   552 {
   558 {
   553     mZoomWidget->resetTransform();
   559     Q_UNUSED( status )
       
   560     mZoomWidget->resetTransform();	
       
   561 	QSize sz = screenSize();
       
   562 	mCoverFlow->setItemSize( sz );
   554 }
   563 }
   555 
   564 
   556 void GlxFullScreenView::handleToolBarAction()
   565 void GlxFullScreenView::handleToolBarAction()
   557 {
   566 {
   558     OstTraceFunctionEntry0( GLXFULLSCREENVIEW_HANDLETOOLBARACTION_ENTRY );
   567     OstTraceFunctionEntry0( GLXFULLSCREENVIEW_HANDLETOOLBARACTION_ENTRY );
   645 
   654 
   646 void GlxFullScreenView::activateUI()
   655 void GlxFullScreenView::activateUI()
   647 {
   656 {
   648     OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ACTIVATEUI_ENTRY );
   657     OstTraceFunctionEntry0( GLXFULLSCREENVIEW_ACTIVATEUI_ENTRY );
   649     
   658     
   650     if ( mUiOff && getSubState() != FETCHER_S ){      
   659     if ( mUiOff && (!(getSubState() == FETCHER_S || getSubState() == BROWSE_S)) ){  
   651         if( !mFullScreenToolBar ) {
   660 			if( !mFullScreenToolBar ) {
   652             loadFullScreenToolBar();
   661 				loadFullScreenToolBar();
   653         }
   662 			}
   654         mUiOff = FALSE;
   663         mUiOff = FALSE;
   655         
   664         
   656         QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole );    
   665         QVariant variant = mModel->data( mModel->index(0,0), GlxFocusIndexRole );    
   657         if ( variant.isValid() &&  variant.canConvert<int> ()  ) {
   666         if ( variant.isValid() &&  variant.canConvert<int> ()  ) {
   658             mImageStrip->setCurrentIndex ( mModel->index( variant.value<int>(), 0) );    
   667             mImageStrip->setCurrentIndex ( mModel->index( variant.value<int>(), 0) );    
   670             setTitle(GLX_IMAGE_VIEWER);
   679             setTitle(GLX_IMAGE_VIEWER);
   671         }
   680         }
   672         mFullScreenToolBar->setOpacity( 1 );
   681         mFullScreenToolBar->setOpacity( 1 );
   673         mFullScreenToolBar->show();
   682         mFullScreenToolBar->show();
   674     }
   683     }
       
   684 	else if( mUiOff && getSubState() == BROWSE_S){
       
   685 		mUiOff = FALSE;
       
   686         setItemVisible( Hb::AllItems, TRUE );
       
   687         setViewFlags( viewFlags() &~ HbView::ViewTitleBarHidden &~ HbView::ViewStatusBarHidden );
       
   688 		mUiOffTimer->start(KUiOffTime);
       
   689 	}
   675     else {
   690     else {
   676         hideUi();
   691         hideUi();
   677     }
   692     }
   678     
   693     
   679     OstTraceFunctionExit0( GLXFULLSCREENVIEW_ACTIVATEUI_EXIT );
   694     OstTraceFunctionExit0( GLXFULLSCREENVIEW_ACTIVATEUI_EXIT );