camerauis/cameraapp/generic/src/CamPreCaptureViewBase.cpp
branchRCL_3
changeset 31 8f559c47d7fd
parent 27 53c8aa5d97a3
child 35 e32fcfe0045f
equal deleted inserted replaced
27:53c8aa5d97a3 31:8f559c47d7fd
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   207                 }
   207                 }
   208             }
   208             }
   209             break;
   209             break;
   210        case ECamCmdPopUpMenuZoom: 
   210        case ECamCmdPopUpMenuZoom: 
   211             {
   211             {
   212             iContainer->ShowZoomPaneWithTimer();
   212             if ( iContainer )
       
   213                 {
       
   214                 iContainer->ShowZoomPaneWithTimer();
       
   215                 }
   213             }     
   216             }     
   214             break;
   217             break;
   215         case ECamCmdCaptureSetupFlashStill:
   218         case ECamCmdCaptureSetupFlashStill:
   216             {
   219             {
   217             iToolbarExtensionInvisible = ETrue;
   220             iToolbarExtensionInvisible = ETrue;
   245                         }
   248                         }
   246                     }
   249                     }
   247                 }
   250                 }
   248             }     
   251             }     
   249             break;
   252             break;
       
   253         case ECamCmdSettings:
       
   254             // Hide the capture button
       
   255             if ( iContainer )
       
   256                 {
       
   257                 iContainer->SetFocus( EFalse );
       
   258                 }
       
   259             // fall-through
   250         default:
   260         default:
   251             {                                       
   261             {                                       
   252             CCamCaptureSetupViewBase::HandleCommandL( aCommand );                            
   262             CCamCaptureSetupViewBase::HandleCommandL( aCommand );                            
   253             }
   263             }
   254         }
   264         }
   659         }
   669         }
   660     else
   670     else
   661         {
   671         {
   662         StatusPane()->MakeVisible( EFalse );
   672         StatusPane()->MakeVisible( EFalse );
   663         }
   673         }
       
   674     
   664     if ( iController.IsTouchScreenSupported() )
   675     if ( iController.IsTouchScreenSupported() )
   665         {
   676         {
       
   677         // Make sure that icons are upto date
       
   678         UpdateToolbarIconsL();
       
   679     
   666         CAknToolbar* fixedToolbar = Toolbar();
   680         CAknToolbar* fixedToolbar = Toolbar();
   667         if ( fixedToolbar )
   681         if ( fixedToolbar )
   668             {
   682             {
   669             // If video call is active, toolbar is set to dimmed, that user cannot use it
   683             // If video call is active, toolbar is set to dimmed, that user cannot use it
   670             TInt callType( EPSCTsyCallTypeUninitialized );
   684             TInt callType( EPSCTsyCallTypeUninitialized );
   788 // ---------------------------------------------------------------------------
   802 // ---------------------------------------------------------------------------
   789 //
   803 //
   790 void CCamPreCaptureViewBase::DoDeactivate()
   804 void CCamPreCaptureViewBase::DoDeactivate()
   791     {                              
   805     {                              
   792     PRINT( _L( "Camera => CCamPreCaptureViewBase::DoDeactivate" ) );
   806     PRINT( _L( "Camera => CCamPreCaptureViewBase::DoDeactivate" ) );
       
   807     
       
   808     delete iGestureFw;
       
   809     iGestureFw = NULL;
       
   810 
   793     CCamCaptureSetupViewBase::DoDeactivate();
   811     CCamCaptureSetupViewBase::DoDeactivate();
   794                                
   812                                
   795     iController.RemoveControllerObserver( this );
   813     iController.RemoveControllerObserver( this );
   796     
   814     
   797     if ( iController.IsTouchScreenSupported() )
   815     if ( iController.IsTouchScreenSupported() )
  1862         PRINT( _L("Camera <> double tap event") );
  1880         PRINT( _L("Camera <> double tap event") );
  1863         CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
  1881         CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
  1864         CCamZoomPane *zoomPane = appUi->ZoomPane();
  1882         CCamZoomPane *zoomPane = appUi->ZoomPane();
  1865         
  1883         
  1866         CCamPreCaptureContainerBase* container = static_cast<CCamPreCaptureContainerBase*>( iContainer );
  1884         CCamPreCaptureContainerBase* container = static_cast<CCamPreCaptureContainerBase*>( iContainer );
  1867         container->ShowZoomPaneWithTimer();
  1885         if ( container && zoomPane )
  1868 
  1886             {
  1869         // Zoom to min (if not already at min) zoom level, otherwise zoom in to max level
  1887             container->ShowZoomPaneWithTimer();
  1870         if ( !zoomPane->IsZoomAtMinimum() )
  1888 
  1871             {
  1889             // Zoom to min (if not already at min) zoom level, otherwise zoom in to max level
  1872             PRINT( _L("Camera <> Zooming out to min level") );
  1890             if ( !zoomPane->IsZoomAtMinimum() )
  1873             zoomPane->ZoomToMinimum();
  1891                 {
  1874             }
  1892                 PRINT( _L("Camera <> Zooming out to min level") );
  1875         else
  1893                 zoomPane->ZoomToMinimum();
  1876             {
  1894                 }
  1877             PRINT( _L("Camera <> Zooming to max level") );
  1895             else
  1878             zoomPane->ZoomToMaximum();
  1896                 {
       
  1897                 PRINT( _L("Camera <> Zooming to max level") );
       
  1898                 zoomPane->ZoomToMaximum();
       
  1899                 }
  1879             }
  1900             }
  1880         }
  1901         }
  1881     else
  1902     else
  1882         {
  1903         {
  1883         PRINT1( _L("Camera <> HandleTouchGestureL - gesture not used, type:%d"), aEvent.Type() );
  1904         PRINT1( _L("Camera <> HandleTouchGestureL - gesture not used, type:%d"), aEvent.Type() );