camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp
branchRCL_3
changeset 25 bf64cebf4673
parent 20 38fb6f7eacd5
child 27 53c8aa5d97a3
equal deleted inserted replaced
20:38fb6f7eacd5 25:bf64cebf4673
   272   // coming to the foreground
   272   // coming to the foreground
   273   if ( aForeground )
   273   if ( aForeground )
   274     {
   274     {
   275     // Ignore foregrounding if view switch to postcapture anyway in progress.
   275     // Ignore foregrounding if view switch to postcapture anyway in progress.
   276     if( appUi->TargetViewState() == ECamViewStatePostCapture
   276     if( appUi->TargetViewState() == ECamViewStatePostCapture
   277      || appUi->TargetViewState() == ECamViewStateBurstThumbnail ) {
   277      || appUi->TargetViewState() == ECamViewStateBurstThumbnail 
   278       PRINT( _L( "Camera <= CCamPreCaptureViewBase::HandleForegroundEventL, ignored as going to postcapture") );    
   278      || ( iStandbyModeActive && !appUi->IsRecoverableStatus() ) ) {
       
   279       PRINT( _L( "Camera <= CCamPreCaptureViewBase::HandleForegroundEventL, ignored states") );    
   279       return;
   280       return;
   280     }
   281     }
   281     
   282     
   282     
   283     
   283     if ( !( iController.UiConfigManagerPtr() && 
   284     if ( !( iController.UiConfigManagerPtr() && 
   675             else
   676             else
   676                 {
   677                 {
   677                 fixedToolbar->SetDimmed( EFalse ); 
   678                 fixedToolbar->SetDimmed( EFalse ); 
   678                 }
   679                 }
   679             fixedToolbar->SetToolbarObserver( this );
   680             fixedToolbar->SetToolbarObserver( this );
   680             appUi->SetToolbarVisibility( );
   681             // avoid toolbar flicker when returning from user scene setup 
   681 
   682             // after adjusting a setting
       
   683             if ( !iSceneSettingModeActive )
       
   684                 {
       
   685                 appUi->SetToolbarVisibility( );
       
   686                 }
       
   687    
   682             // Make sure toolbar extension button has no background
   688             // Make sure toolbar extension button has no background
   683             CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension();
   689             CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension();
   684             if ( extension )
   690             if ( extension )
   685                 {
   691                 {
   686                 extension->SetButtonFlags(
   692                 extension->SetButtonFlags(
  1492 // ---------------------------------------------------------------------------
  1498 // ---------------------------------------------------------------------------
  1493 //
  1499 //
  1494 void CCamPreCaptureViewBase::ReleaseResources()
  1500 void CCamPreCaptureViewBase::ReleaseResources()
  1495     {
  1501     {
  1496     PRINT( _L("Camera => CCamPreCaptureViewBase::ReleaseResources") );
  1502     PRINT( _L("Camera => CCamPreCaptureViewBase::ReleaseResources") );
       
  1503     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
       
  1504     if( iStandbyModeActive && !appUi->IsRecoverableStatus() )
       
  1505         {
       
  1506         PRINT( _L("Camera <= CCamPreCaptureViewBase::ReleaseResources Standbymode") );
       
  1507         return;
       
  1508         }
  1497     iContinueInBackground = EFalse;
  1509     iContinueInBackground = EFalse;
  1498     StopViewFinder();
  1510     StopViewFinder();
  1499   
  1511   
  1500     // Make sure that video recording is stopped (if ongoing).
  1512     // Make sure that video recording is stopped (if ongoing).
  1501     iController.StopVideoRecording();
  1513     iController.StopVideoRecording();
  1507         // Do not do softkey update if we are already exiting
  1519         // Do not do softkey update if we are already exiting
  1508         // (AppUi is not available)
  1520         // (AppUi is not available)
  1509         if( iController.IsAppUiAvailable() )
  1521         if( iController.IsAppUiAvailable() )
  1510             {
  1522             {
  1511             // Ensure AppUi has had self-timer mode disabled
  1523             // Ensure AppUi has had self-timer mode disabled
  1512             CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
       
  1513             if ( appUi )
  1524             if ( appUi )
  1514                 {
  1525                 {
  1515                 TRAP_IGNORE( appUi->SelfTimerEnableL( ECamSelfTimerDisabled ) );
  1526                 TRAP_IGNORE( appUi->SelfTimerEnableL( ECamSelfTimerDisabled ) );
  1516                 }
  1527                 }
  1517             }
  1528             }
  1808         PRINT( _L("Camera <= CCamPreCaptureViewBase::HandleTouchGestureL - skipped") );
  1819         PRINT( _L("Camera <= CCamPreCaptureViewBase::HandleTouchGestureL - skipped") );
  1809         return;
  1820         return;
  1810         }
  1821         }
  1811 
  1822 
  1812     MAknTouchGestureFwPinchEvent *pinch = AknTouchGestureFwEventPinch( aEvent );
  1823     MAknTouchGestureFwPinchEvent *pinch = AknTouchGestureFwEventPinch( aEvent );
  1813     if ( pinch && (ECamNoOperation == iController.CurrentOperation()) )
  1824     CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
       
  1825     if ( pinch && (ECamNoOperation == iController.CurrentOperation()) && appUi && !appUi->ZoomPane()->IsVisible() )
  1814         {
  1826         {
  1815         // Determine the direction of pinch: +ve -> pinch outward / zoom / widen VF
  1827         // Determine the direction of pinch: +ve -> pinch outward / zoom / widen VF
  1816         TInt currMove = pinch->Movement();
  1828         TInt currMove = pinch->Movement();
  1817         TBool wide = (currMove > 0) ? ETrue : EFalse;  
  1829         TBool wide = (currMove > 0) ? ETrue : EFalse;  
  1818         PRINT1( _L("Camera <> CCamPreCaptureViewBase::HandleTouchGestureL - pinch, movement:%d"), currMove );
  1830         PRINT1( _L("Camera <> CCamPreCaptureViewBase::HandleTouchGestureL - pinch, movement:%d"), currMove );
  1824             // level between top widescreen and vga levels
  1836             // level between top widescreen and vga levels
  1825             CCamPreCaptureContainerBase* container = static_cast<CCamPreCaptureContainerBase*>( iContainer );
  1837             CCamPreCaptureContainerBase* container = static_cast<CCamPreCaptureContainerBase*>( iContainer );
  1826             container->BlinkResolutionIndicatorOnChange( ETrue );
  1838             container->BlinkResolutionIndicatorOnChange( ETrue );
  1827 
  1839 
  1828             // Hide the zoom pane in case of pinch
  1840             // Hide the zoom pane in case of pinch
  1829             CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
  1841            // CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
  1830             appUi->ZoomPane()->MakeVisible( EFalse, ETrue );
  1842            // appUi->ZoomPane()->MakeVisible( EFalse, ETrue );
  1831 
  1843 
  1832             if ( iController.ToggleWideScreenQuality( wide ) )
  1844             if ( iController.ToggleWideScreenQuality( wide ) )
  1833                 {
  1845                 {
  1834                 iLastMovement = currMove;
  1846                 iLastMovement = currMove;
  1835                 }
  1847                 }