camerauis/cameraapp/generic/src/CamCaptureSetupViewBase.cpp
branchRCL_3
changeset 24 bac7acad7cb3
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Base class for pre capture views*
       
    15 */
       
    16 
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include <eikmenub.h>
       
    20 
       
    21 #include <cameraapp.rsg>
       
    22 #include <vgacamsettings.rsg>
       
    23 
       
    24 #include "CamCaptureSetupViewBase.h"
       
    25 #include "CamAppUiBase.h"
       
    26 #include "CamAppController.h"
       
    27 #include "CamUtility.h"
       
    28 #include "CamCaptureSetupControlHandler.h"
       
    29 #include "CamCaptureSetupContainer.h"
       
    30 #include "CamShootingModeContainer.h"
       
    31 #include "CamInfoListBoxContainer.h"
       
    32 #include "CamPanic.h"
       
    33 #include "Cam.hrh"
       
    34 #include "CamZoomPane.h"
       
    35 #include "CamTimeLapseUtility.h"
       
    36 #include "camactivepalettehandler.h"
       
    37 #include "CamAppUi.h"
       
    38 
       
    39 #include <akntoolbar.h>
       
    40 
       
    41 // ========================= MEMBER FUNCTIONS ================================
       
    42 
       
    43 
       
    44 // ---------------------------------------------------------------------------
       
    45 // CCamPreCaptureViewBase destructor
       
    46 // 
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 CCamCaptureSetupViewBase::~CCamCaptureSetupViewBase()
       
    50   {
       
    51   PRINT( _L("Camera => ~CCamCaptureSetupViewBase") );
       
    52   if( AppUi() )
       
    53     {
       
    54     if ( iCaptureSetupContainer )
       
    55       {
       
    56       AppUi()->RemoveFromStack( iCaptureSetupContainer );
       
    57       delete iCaptureSetupContainer;
       
    58       }
       
    59     if ( iSceneSettingContainer )
       
    60       {
       
    61       AppUi()->RemoveFromStack( iSceneSettingContainer );
       
    62       delete iSceneSettingContainer;
       
    63       iSceneSettingContainer = NULL;
       
    64       }
       
    65     if ( iInfoListBoxContainer )
       
    66       {
       
    67       AppUi()->RemoveFromStack( iInfoListBoxContainer );
       
    68       delete iInfoListBoxContainer;
       
    69       }        
       
    70     }
       
    71   PRINT( _L("Camera <= ~CCamCaptureSetupViewBase") );
       
    72   }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CCamCaptureSetupViewBase::HandleCommandL
       
    76 // Handle commands
       
    77 // -----------------------------------------------------------------------------
       
    78 //
       
    79 void CCamCaptureSetupViewBase::HandleCommandL( TInt aCommand )
       
    80     {
       
    81     PRINT( _L("Camera => CCamCaptureSetupViewBase::HandleCommandL") );
       
    82     TUid view = Id();
       
    83     
       
    84     TBool userSceneActive = ( view.iUid == ECamViewIdPhotoUserSceneSetup );
       
    85     
       
    86     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
       
    87     
       
    88     switch ( aCommand )
       
    89         {
       
    90         case ECamCmdCaptureSetupWhiteBalanceStill: // fallthrough
       
    91         case ECamCmdCaptureSetupColourFilterStill:
       
    92         case ECamCmdCaptureSetupExposureStill:
       
    93         case ECamCmdCaptureSetupWhiteBalanceVideo:
       
    94         case ECamCmdCaptureSetupColourFilterVideo:
       
    95         case ECamCmdCaptureSetupBrightnessStill:
       
    96         case ECamCmdCaptureSetupContrastStill:
       
    97         case ECamCmdCaptureSetupBrightnessVideo:
       
    98         case ECamCmdCaptureSetupContrastVideo:
       
    99         case ECamCmdCaptureSetupImageSharpnessStill:
       
   100         case ECamCmdCaptureSetupFlashStill:
       
   101         case ECamCmdCaptureSetupSelfTimer:
       
   102             {
       
   103             SwitchToCaptureSetupModeL( aCommand );
       
   104             }
       
   105             break;
       
   106         case ECamCmdCaptureSetupSceneStill:
       
   107         case ECamCmdCaptureSetupSceneVideo:
       
   108             {
       
   109             SwitchToSceneSettingModeL();
       
   110             
       
   111              
       
   112             }
       
   113             break;
       
   114         case EAknSoftkeyBack:
       
   115             {
       
   116             if( appUi && appUi->APHandler()->AccessedViaAP() )
       
   117                 {
       
   118                 if( !userSceneActive)
       
   119                 	{
       
   120                 	appUi->APHandler()->APOperationComplete();
       
   121                 	}
       
   122                 
       
   123                 if ( iSceneSettingModeActive )
       
   124                     {
       
   125                     iSceneSettingContainer->SaveSceneSettingIfChangedL();
       
   126                     }
       
   127                 
       
   128                 iChangeButtonPressed = EFalse;
       
   129                 ExitAllModesL();
       
   130                 }
       
   131             else
       
   132                 {
       
   133 				if( iSceneSettingModeActive )
       
   134                	    {
       
   135 	           	   	ExitSceneSettingModeL();
       
   136 	           	    }	
       
   137 	      		else if ( iInfoListBoxActive )
       
   138 	           	    {
       
   139 	           	   	ExitInfoListBoxL();
       
   140 	           		}
       
   141                 }
       
   142             }
       
   143             break;
       
   144         case EAknSoftkeyCancel:
       
   145             {
       
   146             if ( iCaptureSetupModeActive && iCaptureSetupControlHandler )
       
   147                 {
       
   148                 TCamSettingItemIds iSettingItemId = iCaptureSetupControlHandler->SettingType();		
       
   149                 
       
   150                 if ( iSettingItemId == ECamSettingItemDynamicSelfTimer )					//judge if current operation selfTimer
       
   151                   {
       
   152                   iController.SetSlideInSelfTimerPreview(EFalse);
       
   153                   TInt iSelfTimerVal = iController.IntegerSettingValueUnfiltered( ECamSettingItemDynamicSelfTimer );	//get the actual selfTimer value, not the focus one 
       
   154                        
       
   155                   iController.IntSettingChangedL(iSettingItemId, iSelfTimerVal);			//set the actual status to the actual index
       
   156                   }
       
   157 
       
   158                 iController.CancelPreviewChangesL();
       
   159                 // fallthrough to exit CaptureSetup mode
       
   160                 }
       
   161             else if ( iInfoListBoxActive )
       
   162                 {
       
   163                 iController.CancelPreviewChangesL();
       
   164                 ExitAllModesL();
       
   165                 break;
       
   166                 }
       
   167             else if ( iSceneSettingModeActive )
       
   168                 {
       
   169                 iChangeButtonPressed = EFalse;
       
   170                 ExitAllModesL();
       
   171                 break;
       
   172                 }
       
   173             else
       
   174                 {
       
   175                 // do nothing, the command is handled by the framework
       
   176                 break;
       
   177                 }
       
   178             }
       
   179             //lint -fallthrough
       
   180         case EAknSoftkeyOk:
       
   181             {
       
   182             CaptureSetupModeSelection();
       
   183                 
       
   184             }
       
   185             break;
       
   186         case ECamMSKCmdAppChange:
       
   187         case EAknSoftkeySelect:
       
   188             {
       
   189             if ( iCaptureSetupModeActive && iCaptureSetupControlHandler )
       
   190                 {
       
   191                 CaptureSetupModeSelection();
       
   192                 // fallthrough to exit CaptureSetup mode
       
   193                 }
       
   194             else if ( iSceneSettingContainer )
       
   195                 {
       
   196                 
       
   197                 if ( iSceneSettingContainer->UserSceneHighlighted() )
       
   198                     {                  
       
   199                     // use context specific ok options menu if user scene is highlighted
       
   200                     CEikMenuBar* menuBar = MenuBar();            
       
   201                     if ( menuBar )
       
   202                         {
       
   203                         menuBar->SetMenuTitleResourceId( R_CAM_SCENE_SETTING_OK_MENUBAR );
       
   204                         MenuBar()->SetMenuType( CEikMenuBar::EMenuContext );
       
   205                         menuBar->TryDisplayMenuBarL();
       
   206                         menuBar->SetMenuTitleResourceId( R_CAM_SCENE_SETTING_MENUBAR );
       
   207                         //Here we again set back the type of menu to "Options" when pressed LSK
       
   208             			menuBar->SetMenuType( CEikMenuBar::EMenuOptions );
       
   209                         }
       
   210                     break;
       
   211                     }
       
   212                 
       
   213                 } 
       
   214             }
       
   215             //lint -fallthrough
       
   216         case ECamCmdSelect:
       
   217             {
       
   218             if ( iSceneSettingContainer )
       
   219                 {
       
   220                 // If successfully saved the scene change to the settings model
       
   221                 // then exit the scene setting mode.
       
   222                 if ( iSceneSettingContainer->SaveSceneSettingL() )
       
   223                     {
       
   224                     if( appUi && appUi->APHandler()->AccessedViaAP() )
       
   225                         {
       
   226                         if( !userSceneActive)
       
   227 		                	{
       
   228 		                	appUi->APHandler()->APOperationComplete();
       
   229 		                	}
       
   230 		                	
       
   231                         ExitAllModesL();
       
   232                         }
       
   233                     else
       
   234                         {
       
   235                     	ExitSceneSettingModeL();
       
   236                         }
       
   237                     }
       
   238                 }
       
   239             else if( iInfoListBoxContainer )
       
   240             		{
       
   241             		HandleInfoListBoxSelectionL();	
       
   242  					}
       
   243             }
       
   244             break;
       
   245         case ECamCmdEdit:
       
   246             {
       
   247             // If 'change' user scene selected from scene list, exit all
       
   248             // modes in the precapture view and switch view to user scene.
       
   249             if ( iSceneSettingModeActive )
       
   250                 {
       
   251                 iChangeButtonPressed = ETrue;
       
   252             	AppUi()->HandleCommandL( ECamCmdUserScene );
       
   253             	AppUi()->StatusPane()->MakeVisible( ETrue );
       
   254                 }
       
   255             
       
   256             }
       
   257             break;
       
   258         case ECamCmdUserSceneSelected:
       
   259             {
       
   260             // check as a precaution that there is a container and userscene is highlighted
       
   261             if ( iSceneSettingContainer && iSceneSettingContainer->UserSceneHighlighted() )
       
   262                 {
       
   263                                 
       
   264                 // use context specific ok options menu if user scene is highlighted
       
   265                 CEikMenuBar* menuBar = MenuBar();            
       
   266                 if ( menuBar )
       
   267                     {
       
   268                     MenuBar()->SetMenuType( CEikMenuBar::EMenuContext );
       
   269                     menuBar->SetMenuTitleResourceId( R_CAM_SCENE_SETTING_OK_MENUBAR );
       
   270                     menuBar->TryDisplayMenuBarL();
       
   271                     menuBar->SetMenuType( CEikMenuBar::EMenuOptions );
       
   272                     menuBar->SetMenuTitleResourceId( R_CAM_SCENE_SETTING_MENUBAR );
       
   273                     }
       
   274                 }
       
   275             
       
   276             break;
       
   277             }
       
   278         case ECamCmdInternalExit:
       
   279             {
       
   280             if ( appUi )
       
   281                 {
       
   282                 if ( !appUi->ZoomPane()->IsZoomAtMinimum() )
       
   283                     {
       
   284                     appUi->ZoomPane()->ResetZoomTo1x();
       
   285                     }
       
   286                 }
       
   287             ExitAllModesL();
       
   288             CCamViewBase::HandleCommandL( aCommand );
       
   289             }
       
   290             break;
       
   291         case ECamCmdRedrawScreen:
       
   292             {
       
   293             if( iCaptureSetupContainer )
       
   294                 {
       
   295                 iCaptureSetupContainer->DrawDeferred();
       
   296                 }
       
   297             CCamViewBase::HandleCommandL( aCommand );
       
   298             }
       
   299             break;
       
   300         default:
       
   301             {
       
   302             CCamViewBase::HandleCommandL( aCommand );
       
   303             break;
       
   304             }
       
   305         }
       
   306     PRINT( _L("Camera <= CCamCaptureSetupViewBase::HandleCommandL") );
       
   307     }
       
   308 
       
   309 // -----------------------------------------------------------------------------
       
   310 // CCamCaptureSetupViewBase::HandleFocusLossL
       
   311 // Handle focus loss
       
   312 // -----------------------------------------------------------------------------
       
   313 //
       
   314 void CCamCaptureSetupViewBase::HandleFocusLossL()
       
   315     {
       
   316 	// We dont exit any of the modes when we loose focus
       
   317 	// we do it when we gain focus.
       
   318     }
       
   319 
       
   320 // ---------------------------------------------------------------------------
       
   321 // CCamCaptureSetupViewBase::DoDeactivate
       
   322 // From CAknView deactivates the view
       
   323 // ---------------------------------------------------------------------------
       
   324 //
       
   325 void CCamCaptureSetupViewBase::DoDeactivate()
       
   326     {
       
   327     if ( iSceneSettingContainer )
       
   328         {
       
   329         AppUi()->RemoveFromStack( iSceneSettingContainer );
       
   330     
       
   331         delete iSceneSettingContainer;
       
   332         iSceneSettingContainer = NULL;
       
   333         }
       
   334     CCamViewBase::DoDeactivate();
       
   335     }
       
   336 
       
   337 
       
   338 // ---------------------------------------------------------------------------
       
   339 // CCamCaptureSetupViewBase::CCamCaptureSetupViewBase
       
   340 // C++ constructor
       
   341 // ---------------------------------------------------------------------------
       
   342 //
       
   343 CCamCaptureSetupViewBase::CCamCaptureSetupViewBase( CCamAppController& aController )
       
   344     : CCamViewBase( aController ),
       
   345       iForceAvkonCBA(EFalse)
       
   346     {
       
   347     }
       
   348 
       
   349 // ---------------------------------------------------------------------------
       
   350 // CCamCaptureSetupViewBase::CreateCaptureSetupControlHandlerL
       
   351 // Create a control handler for the correct capture setup item
       
   352 // ---------------------------------------------------------------------------
       
   353 //
       
   354 void CCamCaptureSetupViewBase::CreateCaptureSetupControlHandlerL( TInt aSetupCommand )
       
   355     {
       
   356     __ASSERT_DEBUG( !iCaptureSetupControlHandler, CamPanic( ECamPanicInvalidState ) );
       
   357     TCamSettingItemIds settingItemId = ECamSettingItemDynamicPhotoWhiteBalance;
       
   358     switch ( aSetupCommand )
       
   359         {
       
   360         case ECamCmdCaptureSetupWhiteBalanceStill:
       
   361             {
       
   362             settingItemId = ECamSettingItemDynamicPhotoWhiteBalance;
       
   363             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   364             }
       
   365             break;
       
   366         case ECamCmdCaptureSetupColourFilterStill:
       
   367             {
       
   368             settingItemId = ECamSettingItemDynamicPhotoColourFilter;
       
   369             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   370             }
       
   371             break;
       
   372 
       
   373         case ECamCmdCaptureSetupExposureStill:
       
   374             {
       
   375             settingItemId = ECamSettingItemDynamicPhotoExposure;
       
   376             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   377             }
       
   378             break;
       
   379 
       
   380         case ECamCmdCaptureSetupFlashStill:
       
   381             {
       
   382             settingItemId = ECamSettingItemDynamicPhotoFlash;
       
   383             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   384             }
       
   385             break;
       
   386         case ECamCmdCaptureSetupSelfTimer:
       
   387             {
       
   388             settingItemId = ECamSettingItemDynamicSelfTimer;
       
   389             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   390             }
       
   391             break;
       
   392             
       
   393         case ECamCmdCaptureSetupWhiteBalanceVideo:
       
   394             {
       
   395             settingItemId = ECamSettingItemDynamicVideoWhiteBalance;
       
   396             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_VIDEO;
       
   397             }
       
   398             break;
       
   399         case ECamCmdCaptureSetupColourFilterVideo:
       
   400             {
       
   401             settingItemId = ECamSettingItemDynamicVideoColourFilter;
       
   402             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_VIDEO;
       
   403             }
       
   404             break;
       
   405 
       
   406         // User scene settings pages.
       
   407         case ECamCmdCaptureSetupWhiteBalanceUser:
       
   408             {
       
   409             settingItemId = ECamSettingItemUserSceneWhitebalance;
       
   410             iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   411             }
       
   412             break;
       
   413         case ECamCmdCaptureSetupColourFilterUser:
       
   414             {
       
   415             settingItemId = ECamSettingItemUserSceneColourFilter;
       
   416             iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   417             }
       
   418             break;
       
   419         case ECamCmdCaptureSetupExposureUser:
       
   420             {
       
   421             settingItemId = ECamSettingItemUserSceneExposure;
       
   422             iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   423             }
       
   424             break;
       
   425         case ECamCmdCaptureSetupFlashUser:
       
   426             {
       
   427             settingItemId = ECamSettingItemUserSceneFlash;
       
   428             iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   429             }
       
   430             break;
       
   431 
       
   432 		case ECamCmdCaptureSetupBrightnessStill:
       
   433 			{
       
   434 			settingItemId = ECamSettingItemDynamicPhotoBrightness;
       
   435 			iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   436 			}
       
   437 			break;
       
   438 		case ECamCmdCaptureSetupContrastStill:
       
   439 			{
       
   440 			settingItemId = ECamSettingItemDynamicPhotoContrast;
       
   441 			iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   442 			}
       
   443 			break;
       
   444 		case ECamCmdCaptureSetupBrightnessVideo:
       
   445 			{
       
   446 			settingItemId = ECamSettingItemDynamicVideoBrightness;
       
   447 			iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_VIDEO;
       
   448 			}
       
   449 			break;
       
   450         case ECamCmdCaptureSetupContrastVideo:
       
   451 			{
       
   452 			settingItemId = ECamSettingItemDynamicVideoContrast;
       
   453 			iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_VIDEO;
       
   454 			}
       
   455 			break;
       
   456         case ECamCmdCaptureSetupBrightnessUser:
       
   457             {
       
   458             settingItemId = ECamSettingItemUserSceneBrightness;
       
   459 			iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   460             }
       
   461             break;
       
   462         case ECamCmdCaptureSetupContrastUser:
       
   463             {
       
   464             settingItemId = ECamSettingItemUserSceneContrast;
       
   465 			iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   466             }
       
   467             break;
       
   468 
       
   469         case ECamCmdCaptureSetupImageSharpnessStill:
       
   470             {
       
   471             settingItemId = ECamSettingItemDynamicPhotoImageSharpness;
       
   472 			iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   473             }
       
   474             break;
       
   475         case ECamCmdCaptureSetupImageSharpnessUser:
       
   476             {
       
   477             settingItemId = ECamSettingItemUserSceneImageSharpness;
       
   478 			iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   479             }
       
   480             break;
       
   481 
       
   482         case ECamCmdCaptureSetupLightSensitivityStill:
       
   483             {
       
   484             settingItemId = ECamSettingItemDynamicPhotoLightSensitivity;
       
   485             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_STILL;
       
   486             }
       
   487             break;
       
   488         case ECamCmdCaptureSetupLightSensitivityVideo:
       
   489             {
       
   490             settingItemId = ECamSettingItemDynamicVideoLightSensitivity;
       
   491             iSettingModeTitleResourceId = R_CAM_CAPTURE_SETUP_TITLE_VIDEO;
       
   492             }
       
   493             break;
       
   494         case ECamCmdCaptureSetupLightSensitivityUser:
       
   495             {
       
   496             settingItemId = ECamSettingItemUserSceneLightSensitivity;
       
   497             iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   498             }
       
   499             break;
       
   500         case ECamCmdSetUserDefault:
       
   501             { 
       
   502             settingItemId = ECamSettingItemUserSceneDefault;
       
   503             iSettingModeTitleResourceId = R_CAM_USER_SCENE_SETUP_TITLE;
       
   504             }
       
   505             break;
       
   506         default:
       
   507             {
       
   508             User::Leave( KErrNotSupported );
       
   509             }
       
   510             break;
       
   511         }
       
   512 
       
   513     iCaptureSetupControlHandler = new( ELeave )
       
   514         CCamCaptureSetupControlHandler( iController, settingItemId );
       
   515     }
       
   516 
       
   517 // ---------------------------------------------------------------------------
       
   518 // CCamCaptureSetupViewBase::CleanupCaptureSetupContainer
       
   519 // Cleanup the capture setup controls if a leave occurs
       
   520 // ---------------------------------------------------------------------------
       
   521 //
       
   522 void CCamCaptureSetupViewBase::CleanupCaptureSetupContainer( TAny* aAny )
       
   523     {
       
   524     CCamCaptureSetupViewBase* view = static_cast<CCamCaptureSetupViewBase*>( aAny );
       
   525     delete view->iCaptureSetupControlHandler;
       
   526     view->iCaptureSetupControlHandler = NULL;
       
   527 
       
   528     if ( view->iCaptureSetupContainer )
       
   529         {
       
   530         view->AppUi()->RemoveFromStack( view->iCaptureSetupContainer );
       
   531         delete view->iCaptureSetupContainer;
       
   532         view->iCaptureSetupContainer = NULL;
       
   533         }
       
   534     // reset the active flag
       
   535     view->SetCaptureSetupModeActive(EFalse);
       
   536 
       
   537     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( view->AppUi() );
       
   538     appUi->SetPreCaptureMode(ECamPreCapViewfinder);
       
   539     }
       
   540 
       
   541 // ---------------------------------------------------------------------------
       
   542 // CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL
       
   543 // Enter capture setup mode
       
   544 // ---------------------------------------------------------------------------
       
   545 //
       
   546 void CCamCaptureSetupViewBase::SwitchToCaptureSetupModeL( TInt aSetupCommand, TBool aFullScreenVF )
       
   547     {
       
   548     __ASSERT_DEBUG( !iCaptureSetupControlHandler && !iCaptureSetupContainer, CamPanic( ECamPanicResourceLeak ) );
       
   549 
       
   550     CreateCaptureSetupControlHandlerL( aSetupCommand );
       
   551     // Cleanup the view correctly if a leave occurs
       
   552     CleanupStack::PushL( TCleanupItem( CleanupCaptureSetupContainer, this ) );
       
   553     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
       
   554 
       
   555     TRect rect = appUi->ApplicationRect();
       
   556     if ( !CamUtility::IsNhdDevice() ) 
       
   557         {
       
   558         // Space for visible statuspane for non-touch device
       
   559         AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, rect );
       
   560         }
       
   561     iCaptureSetupContainer = CCamCaptureSetupContainer::NewL( iController, 
       
   562                                    *this, *iCaptureSetupControlHandler, rect, aFullScreenVF );
       
   563     appUi->AddToStackL( *this, iCaptureSetupContainer );
       
   564     iCaptureSetupContainer->ActivateL();
       
   565     iCaptureSetupContainer->DrawNow();
       
   566 
       
   567     // UpdateCbaL need this boolean to be set in order
       
   568     // to return the correct CBA
       
   569     SetCaptureSetupModeActive(ETrue);
       
   570     
       
   571     iCaptureSetupContainer->DrawableWindow()->SetOrdinalPosition(
       
   572             KCamPreCaptureWindowOrdinalPos );
       
   573 
       
   574     UpdateCbaL();
       
   575     SetTitlePaneTextL();
       
   576     appUi->PushDefaultNaviPaneL();
       
   577     CleanupStack::Pop(); // CleanupCaptureSetupContainer
       
   578     // after all leaving functions have completed
       
   579     // remove the container from the stack
       
   580     appUi->RemoveFromStack( iContainer );
       
   581     iContainer->MakeVisible( EFalse );
       
   582     }
       
   583 
       
   584 // ---------------------------------------------------------------------------
       
   585 // CCamCaptureSetupViewBase::ExitCaptureSetupModeL
       
   586 // Exit capture setup mode
       
   587 // ---------------------------------------------------------------------------
       
   588 //
       
   589 void CCamCaptureSetupViewBase::ExitCaptureSetupModeL()
       
   590     {
       
   591     PRINT( _L("Camera => CCamCaptureSetupViewBase::ExitCaptureSetupModeL()") );	   
       
   592     if ( !iController.InVideocallOrRinging() )
       
   593         {
       
   594         iController.CancelPreviewChangesL();
       
   595         }
       
   596     if ( !iCaptureSetupModeActive )
       
   597 		{
       
   598         return;
       
   599 		}
       
   600 
       
   601     // Cleanup the view correctly if a leave occurs
       
   602     CleanupStack::PushL( TCleanupItem( CleanupExit, this ) );
       
   603     AppUi()->AddToStackL( *this, iContainer );
       
   604     iContainer->MakeVisible( ETrue );   
       
   605     //Draw already here to prevent the activepalette showing briefly before it is updated
       
   606     if ( !iController.IsTouchScreenSupported() )
       
   607         {
       
   608         iContainer->DrawNow();
       
   609         }
       
   610     SetCaptureSetupModeActive(EFalse);
       
   611 
       
   612     UpdateCbaL();
       
   613 
       
   614     if ( Cba() )
       
   615         {
       
   616         Cba()->DrawNow();
       
   617         }
       
   618 		
       
   619     SetTitlePaneTextL();  
       
   620     CleanupStack::Pop(); // CleanupExit
       
   621 
       
   622     // delete the capture setup controls when all
       
   623     // leaving functions have completed
       
   624     AppUi()->RemoveFromStack( iCaptureSetupContainer );
       
   625     delete iCaptureSetupContainer;
       
   626     iCaptureSetupContainer = NULL;
       
   627     delete iCaptureSetupControlHandler;
       
   628     iCaptureSetupControlHandler = NULL;
       
   629     PRINT( _L("Camera <= CCamCaptureSetupViewBase::ExitCaptureSetupModeL()") );	   
       
   630     }
       
   631 
       
   632 // ---------------------------------------------------------------------------
       
   633 // CCamCaptureSetupViewBase::CleanupSceneSettingContainer
       
   634 // Cleanup the capture setup controls if a leave occurs
       
   635 // ---------------------------------------------------------------------------
       
   636 //
       
   637 void CCamCaptureSetupViewBase::CleanupSceneSettingContainer( TAny* aAny )
       
   638     {
       
   639     CCamCaptureSetupViewBase* view = static_cast<CCamCaptureSetupViewBase*>( aAny );
       
   640     if ( view->iSceneSettingContainer )
       
   641         {
       
   642         view->AppUi()->RemoveFromStack( view->iSceneSettingContainer );
       
   643         delete view->iSceneSettingContainer;
       
   644         view->iSceneSettingContainer = NULL;
       
   645         }
       
   646     // reset the active mode
       
   647     view->SetSceneSettingMode(EFalse);
       
   648     }
       
   649 
       
   650 // ---------------------------------------------------------------------------
       
   651 // CCamCaptureSetupViewBase::CleanupInfoListBox
       
   652 // Cleanup the InfoListBox controls if a leave occurs
       
   653 // ---------------------------------------------------------------------------
       
   654 //
       
   655 void CCamCaptureSetupViewBase::CleanupInfoListBox( TAny* aAny )
       
   656     {
       
   657     CCamCaptureSetupViewBase* view = static_cast<CCamCaptureSetupViewBase*>( aAny );
       
   658     if ( view->iInfoListBoxContainer )
       
   659         {
       
   660         view->AppUi()->RemoveFromStack( view->iInfoListBoxContainer );
       
   661         delete view->iInfoListBoxContainer;
       
   662         view->iInfoListBoxContainer = NULL;
       
   663         }
       
   664     // reset the active mode
       
   665     view->SetInfoListBoxMode(EFalse);
       
   666     }
       
   667 
       
   668 // ---------------------------------------------------------------------------
       
   669 // CCamCaptureSetupViewBase::SwitchToSceneSettingModeL
       
   670 // Enter scene setup mode
       
   671 // ---------------------------------------------------------------------------
       
   672 //
       
   673 void CCamCaptureSetupViewBase::SwitchToSceneSettingModeL()
       
   674     {
       
   675     // Cleanup the view correctly if a leave occurs
       
   676     CleanupStack::PushL( TCleanupItem( CleanupSceneSettingContainer, this ) );
       
   677     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
       
   678     iSceneSettingContainer->SetMopParent( this );  
       
   679     appUi->AddToStackL( *this, iSceneSettingContainer );
       
   680     iSceneSettingContainer->ActivateL();
       
   681     
       
   682     if ( iChangeButtonPressed && iSceneSettingContainer )
       
   683     	{
       
   684     	iSceneSettingContainer->SelectItem( iSceneSettingContainer->IndexForValueId( ECamSceneUser ) );
       
   685     	// iChangeButtonPressed is set to EFalse in SetSceneSettingMode method
       
   686     	}
       
   687     
       
   688     // UpdateCbaL need this boolean to be set in
       
   689     // order to return the correct CBA
       
   690     SetSceneSettingMode(ETrue);
       
   691     
       
   692     appUi->SetToolbarVisibility();
       
   693     
       
   694     iForceAvkonCBA = ETrue;
       
   695     UpdateCbaL();
       
   696     SetTitlePaneTextL();
       
   697     appUi->PushDefaultNaviPaneL();
       
   698     CleanupStack::Pop(); // CleanupSceneSettingContainer
       
   699     // after all leaving functions have completed
       
   700     // remove the container from the stack and
       
   701     // set the capture setup mode active 
       
   702     appUi->RemoveFromStack( iContainer );
       
   703     iContainer->MakeVisible( EFalse );  
       
   704 
       
   705     CEikMenuBar* menuBar = MenuBar();
       
   706     // if menuBar exists
       
   707     if ( menuBar )
       
   708         {
       
   709         menuBar->SetMenuTitleResourceId( ROID(R_CAM_SCENE_SETTING_MENUBAR_ID));
       
   710         }
       
   711     
       
   712     }
       
   713 
       
   714 // ---------------------------------------------------------------------------
       
   715 // CCamCaptureSetupViewBase::SwitchToInfoListBoxL
       
   716 // Show InfoListBox
       
   717 // ---------------------------------------------------------------------------
       
   718 //
       
   719 void CCamCaptureSetupViewBase::SwitchToInfoListBoxL( TCamInfoListBoxMode aMode, TBool aFullySkinned )
       
   720     {
       
   721     // Cleanup the view correctly if a leave occurs
       
   722     CleanupStack::PushL( TCleanupItem( CleanupInfoListBox, this ) );
       
   723     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
       
   724     iInfoListBoxContainer->SetMopParent( this );  
       
   725     appUi->AddToStackL( *this, iInfoListBoxContainer );
       
   726     iInfoListBoxContainer->ActivateL();
       
   727     // UpdateCbaL need this boolean to be set in
       
   728     // order to return the correct CBA
       
   729     SetInfoListBoxMode(ETrue, aFullySkinned);
       
   730     UpdateCbaL();
       
   731     SetTitlePaneTextL();
       
   732     appUi->PushDefaultNaviPaneL();
       
   733     CleanupStack::Pop(); // CleanupSceneSettingContainer
       
   734 
       
   735     // after all leaving functions have completed
       
   736     // remove the container from the stack and
       
   737     // set the capture setup mode active 
       
   738     appUi->RemoveFromStack( iContainer );
       
   739     iContainer->MakeVisible( EFalse );  
       
   740 
       
   741     CEikMenuBar* menuBar = MenuBar();
       
   742     // if menuBar exists
       
   743     if ( menuBar )
       
   744         {
       
   745         // Use same menu resource as scene setting
       
   746         menuBar->SetMenuTitleResourceId( R_CAM_INFOLISTBOX_MENUBAR );
       
   747         }
       
   748     }
       
   749 
       
   750 
       
   751 // ---------------------------------------------------------------------------
       
   752 // CCamCaptureSetupViewBase::HandleInfoListBoxSelectionL()
       
   753 // Handle selection events from InfoListBox
       
   754 // ---------------------------------------------------------------------------
       
   755 //
       
   756 void CCamCaptureSetupViewBase::HandleInfoListBoxSelectionL()
       
   757 		{            		   
       
   758 		CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );            		   
       
   759 		
       
   760 		TUid view = Id();           		   
       
   761 		TBool userSceneActive = ( view.iUid == ECamViewIdPhotoUserSceneSetup );
       
   762 		
       
   763 		if( iInfoListBoxContainer->SettingValueChanged() )
       
   764 				{
       
   765 				// Store the selected setting
       
   766 				switch( iInfoListBoxMode )
       
   767 						{
       
   768 						case EInfoListBoxModeTimeLapse:
       
   769 								{
       
   770   		  				TCamTimeLapse settingValue = static_cast<TCamTimeLapse>( iInfoListBoxContainer->CurrentSettingItemValue() );
       
   771    			 				TInt command = CamTimeLapseUtility::EnumToCommand( settingValue ); 
       
   772 		    				TTimeIntervalMicroSeconds interval = CamTimeLapseUtility::EnumToInterval( settingValue );  
       
   773             		
       
   774 		    				// Update the current mode (single/burst/timelapse)
       
   775   		  				if( appUi )
       
   776     								{
       
   777  		   							TRAP_IGNORE( appUi->HandleCommandL( command ) );            		
       
   778    			     				}
       
   779 						
       
   780 								// Update timelapse interval
       
   781  			       		iController.SetTimeLapseInterval( interval ); 
       
   782   		     			}
       
   783   		     			break;
       
   784        			
       
   785 						case EInfoListBoxModeISO:
       
   786 								{
       
   787 								TInt settingValue = iInfoListBoxContainer->CurrentSettingItemValue();
       
   788 								
       
   789 								// For the light sensitivity setting, PreviewSettingChangeL and CommitPreviewChanges
       
   790 								// must be used, instead of UpdateEngineWithSettingL, in order to actually change
       
   791 								// the setting value.
       
   792 								iController.PreviewSettingChangeL( ECamSettingItemDynamicPhotoLightSensitivity, settingValue );
       
   793 								iController.CommitPreviewChanges();
       
   794 								}            	  
       
   795 								break;
       
   796 						
       
   797 						default:
       
   798 								break;												
       
   799 						}				
       
   800 				}
       
   801         	  
       
   802             	            			
       
   803     if( appUi && appUi->APHandler()->AccessedViaAP() )
       
   804     		{ 
       
   805     		if( !userSceneActive)
       
   806 		    	{
       
   807 		    	// If user scene is active, we aren't yet done
       
   808 		      appUi->APHandler()->APOperationComplete();
       
   809 		      }	
       
   810 		                		                	
       
   811         ExitAllModesL();
       
   812         }
       
   813     else
       
   814     		{
       
   815         	ExitInfoListBoxL();
       
   816         	}                     
       
   817        
       
   818 		}
       
   819 
       
   820 // ---------------------------------------------------------------------------
       
   821 // CCamCaptureSetupViewBase::CleanupExit
       
   822 // Stop the scene setting mode from exiting if a leave occurs
       
   823 // ---------------------------------------------------------------------------
       
   824 //
       
   825 void CCamCaptureSetupViewBase::CleanupExit( TAny* aAny )
       
   826     {
       
   827     CCamCaptureSetupViewBase* view = static_cast<CCamCaptureSetupViewBase*>( aAny );
       
   828     view->AppUi()->RemoveFromStack( view->iContainer );
       
   829     view->iContainer->MakeVisible( EFalse );
       
   830     if ( view->iSceneSettingContainer )
       
   831         {
       
   832         // reset the active mode
       
   833         view->SetSceneSettingMode(ETrue);
       
   834         }
       
   835     if ( view->iCaptureSetupContainer )
       
   836         {
       
   837         // reset the active mode
       
   838         view->SetCaptureSetupModeActive(ETrue);
       
   839         }
       
   840     if ( view->iInfoListBoxContainer )
       
   841         {
       
   842         // reset the active mode
       
   843         view->SetInfoListBoxMode(ETrue);
       
   844         }        
       
   845     }
       
   846 
       
   847 // ---------------------------------------------------------------------------
       
   848 // CCamCaptureSetupViewBase::ExitSceneSettingModeL
       
   849 // Exit scene setup mode
       
   850 // ---------------------------------------------------------------------------
       
   851 //
       
   852 void CCamCaptureSetupViewBase::ExitSceneSettingModeL()
       
   853     {   
       
   854     PRINT( _L( "Camera => CCamCaptureSetupViewBase::ExitSceneSettingModeL" ) );
       
   855     iForceAvkonCBA = EFalse;
       
   856     if ( !iSceneSettingModeActive )
       
   857         {
       
   858         AppUi()->RemoveFromStack( iSceneSettingContainer );  
       
   859 		
       
   860         if ( iSceneSettingContainer )
       
   861         	{
       
   862         	delete iSceneSettingContainer;
       
   863     	    iSceneSettingContainer = NULL;
       
   864         	}
       
   865 		return;
       
   866         }
       
   867     	
       
   868     // Cleanup the view correctly if a leave occurs
       
   869     CleanupStack::PushL( TCleanupItem( CleanupExit, this ) );
       
   870     AppUi()->AddToStackL( *this, iContainer );
       
   871     
       
   872     if ( iChangeButtonPressed == EFalse )
       
   873     	{
       
   874         AppUi()->RemoveFromStack( iSceneSettingContainer );               
       
   875         if ( iSceneSettingContainer )
       
   876         	{
       
   877     	    delete iSceneSettingContainer;
       
   878     	    iSceneSettingContainer = NULL;
       
   879         	} 
       
   880         iContainer->MakeVisible( ETrue );
       
   881     	  //Draw already here to prevent the activepalette showing briefly before it is updated
       
   882         if ( !iController.IsTouchScreenSupported() )
       
   883             {
       
   884             iContainer->DrawNow();
       
   885             }
       
   886       	SetSceneSettingMode(EFalse);
       
   887         UpdateCbaL();
       
   888 
       
   889        if ( Cba() )
       
   890     	    {
       
   891     	    Cba()->DrawNow();
       
   892     	    }
       
   893 	
       
   894         SetTitlePaneTextL();
       
   895         CleanupStack::Pop(); // CleanupExit
       
   896         
       
   897 
       
   898         
       
   899     	}
       
   900     else // iChangeButtonPressed == ETrue
       
   901     	{
       
   902     	iContainer->MakeVisible( EFalse );
       
   903     	SetSceneSettingMode(EFalse);
       
   904         SetTitlePaneTextL();
       
   905         CleanupStack::Pop(); // CleanupExit
       
   906     	}
       
   907     
       
   908     
       
   909     CEikMenuBar* menuBar = MenuBar();
       
   910     // if menuBar exists
       
   911     if ( menuBar )
       
   912         {
       
   913         menuBar->SetMenuTitleResourceId( iPreviousMenuResourceId );
       
   914         }
       
   915 	PRINT( _L( "Camera <= CCamCaptureSetupViewBase::ExitSceneSettingModeL" ) );        
       
   916     }
       
   917 
       
   918 
       
   919 // ---------------------------------------------------------------------------
       
   920 // CCamCaptureSetupViewBase::ExitInfoListBoxL
       
   921 // Exit scene setup mode
       
   922 // ---------------------------------------------------------------------------
       
   923 //
       
   924 void CCamCaptureSetupViewBase::ExitInfoListBoxL()
       
   925     {   
       
   926 	PRINT( _L( "Camera => CCamCaptureSetupViewBase::ExitInfoListBoxL" ) );
       
   927     
       
   928     if ( !iInfoListBoxActive )
       
   929 		{
       
   930         return;
       
   931     } 
       
   932     
       
   933     // Cleanup the view correctly if a leave occurs
       
   934     CleanupStack::PushL( TCleanupItem( CleanupExit, this ) );
       
   935     AppUi()->AddToStackL( *this, iContainer );
       
   936     iController.SetViewfinderWindowHandle( &iContainer->Window() );
       
   937   	PRINT( _L( "Camera => CCamCaptureSetupViewBase::ExitInfoListBoxL removing iInfoListBoxContainer" ) );
       
   938     AppUi()->RemoveFromStack( iInfoListBoxContainer );
       
   939     delete iInfoListBoxContainer;
       
   940     iInfoListBoxContainer = NULL;
       
   941 	PRINT( _L( "Camera => CCamCaptureSetupViewBase::ExitInfoListBoxL removed iInfoListBoxContainer" ) );   
       
   942    
       
   943     iContainer->MakeVisible( ETrue );  
       
   944     //Draw already here to prevent the activepalette showing briefly before it is updated
       
   945     if ( !iController.IsTouchScreenSupported() )
       
   946         {
       
   947         iContainer->DrawNow();
       
   948         }
       
   949     SetInfoListBoxMode(EFalse);
       
   950     UpdateCbaL();
       
   951 
       
   952     if ( Cba() )
       
   953         {
       
   954         Cba()->DrawNow();
       
   955         }
       
   956 		
       
   957     SetTitlePaneTextL();
       
   958     CleanupStack::Pop(); // CleanupExit
       
   959 
       
   960     CEikMenuBar* menuBar = MenuBar();
       
   961     // if menuBar exists
       
   962     if ( menuBar )
       
   963         {
       
   964         menuBar->SetMenuTitleResourceId( iPreviousMenuResourceId );
       
   965         }
       
   966         
       
   967 		iInfoListBoxActive = EFalse;
       
   968 		
       
   969 		// StartViewFinderL();      
       
   970 	PRINT( _L( "Camera <= CCamCaptureSetupViewBase::ExitInfoListBoxL" ) );        
       
   971     }
       
   972 
       
   973 // ---------------------------------------------------------------------------
       
   974 // CCamCaptureSetupViewBase::SetupModeTitlePaneResourceId
       
   975 // Return the resource id for the title pane text while in setup mode
       
   976 // ---------------------------------------------------------------------------
       
   977 //
       
   978 TInt CCamCaptureSetupViewBase::SetupModeTitlePaneResourceId()
       
   979     {
       
   980     return iSettingModeTitleResourceId;
       
   981     }
       
   982 
       
   983 
       
   984 void CCamCaptureSetupViewBase::CaptureSetupModeSelection()
       
   985     {
       
   986     
       
   987     TUid view = Id();
       
   988     
       
   989     TBool userSceneActive = ( view.iUid == ECamViewIdPhotoUserSceneSetup );
       
   990     
       
   991     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
       
   992     
       
   993     if ( iCaptureSetupModeActive && iCaptureSetupControlHandler )
       
   994         {
       
   995         TCamSettingItemIds iSettingItemId = iCaptureSetupControlHandler->SettingType();
       
   996         if ( iSettingItemId == ECamSettingItemDynamicSelfTimer )
       
   997             {
       
   998             iController.SetSlideInSelfTimerPreview(EFalse);
       
   999             }
       
  1000     
       
  1001         iController.CommitPreviewChanges();    
       
  1002         // fallthrough to exit CaptureSetup mode
       
  1003         }
       
  1004     if( appUi && appUi->APHandler()->AccessedViaAP() )
       
  1005        {
       
  1006        if( !userSceneActive)
       
  1007             {
       
  1008             appUi->APHandler()->APOperationComplete();
       
  1009             }
       
  1010        ExitAllModesL();
       
  1011        }
       
  1012     
       
  1013     }
       
  1014 
       
  1015 // ---------------------------------------------------------------------------
       
  1016 // CCamCaptureSetupViewBase::DynInitMenuPaneL
       
  1017 // Dynamically initialise the options menu
       
  1018 // ---------------------------------------------------------------------------
       
  1019 //
       
  1020 void CCamCaptureSetupViewBase::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
       
  1021     {
       
  1022     PRINT( _L("Camera => CCamCaptureSetupViewBase::DynInitMenuPaneL"))
       
  1023     iController.StartIdleTimer();
       
  1024     if( iSceneSettingModeActive && aResourceId == ROID(R_CAM_SCENE_SETTING_MENU_ID))
       
  1025         {
       
  1026         if ( iSceneSettingContainer && !iSceneSettingContainer->UserSceneHighlighted() )
       
  1027             {
       
  1028             aMenuPane->SetItemDimmed( ECamCmdEdit, ETrue );
       
  1029             }
       
  1030         else
       
  1031             {
       
  1032             // do nothing
       
  1033             }
       
  1034         }
       
  1035     else
       
  1036         {
       
  1037         // do nothing
       
  1038         }
       
  1039     PRINT( _L("Camera <= CCamCaptureSetupViewBase::DynInitMenuPaneL"))
       
  1040     }
       
  1041 
       
  1042 // ---------------------------------------------------------------------------
       
  1043 // CCamCaptureSetupViewBase::ExitAllModesL
       
  1044 // Revert to normal mode
       
  1045 // ---------------------------------------------------------------------------
       
  1046 //
       
  1047 void CCamCaptureSetupViewBase::ExitAllModesL()
       
  1048     {
       
  1049     // intentionally doing nothing
       
  1050     PRINT( _L("Camera =><= CCamCaptureSetupViewBase::ExitAllModesL empty impl."))
       
  1051     }
       
  1052 
       
  1053 // ---------------------------------------------------------------------------
       
  1054 // CCamCaptureSetupViewBase::SetSceneSettingMode
       
  1055 // Sets the iSceneSettingModeActive flag
       
  1056 // ---------------------------------------------------------------------------
       
  1057 //
       
  1058 void CCamCaptureSetupViewBase::SetSceneSettingMode(TBool aActive)
       
  1059     {
       
  1060     TUid view = Id();
       
  1061     TBool userSceneActive = ( view.iUid == ECamViewIdPhotoUserSceneSetup );
       
  1062     // This should be the only place iSceneSettingModeActive is set!
       
  1063     // We need to inform the AppUi
       
  1064     iSceneSettingModeActive = aActive;
       
  1065 
       
  1066     CCamAppUi* appUi = static_cast<CCamAppUi*>(AppUi()); //static_cast<CCamAppUiBase*>( AppUi() );
       
  1067     
       
  1068     if ( appUi )
       
  1069         {
       
  1070         if ( aActive )
       
  1071             {
       
  1072             appUi->SetPreCaptureMode(ECamPreCapSceneSetting);
       
  1073             iChangeButtonPressed = EFalse; 
       
  1074             } // userSceneActive to avoit toolbar flicker after back from scene setting
       
  1075         else if ( iChangeButtonPressed || userSceneActive )
       
  1076         	{
       
  1077         	// transfering to user scene setup view
       
  1078         	 appUi->SetPreCaptureMode(ECamPreCapSceneSetting);
       
  1079         	}
       
  1080         else
       
  1081             {
       
  1082            	appUi->SetPreCaptureMode(ECamPreCapViewfinder);
       
  1083             }        
       
  1084         }
       
  1085           
       
  1086     }
       
  1087     
       
  1088 // ---------------------------------------------------------------------------
       
  1089 // CCamCaptureSetupViewBase::SetInfoListBoxMode
       
  1090 // Sets the iInfoListBoxActive flag
       
  1091 // ---------------------------------------------------------------------------
       
  1092 //
       
  1093 void CCamCaptureSetupViewBase::SetInfoListBoxMode( TBool aActive, TBool aFullySkinned )
       
  1094     {
       
  1095     // We need to inform the AppUi
       
  1096     iInfoListBoxActive = aActive;
       
  1097 
       
  1098     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
       
  1099     
       
  1100     if ( appUi)
       
  1101         {
       
  1102         if ( aActive )
       
  1103             {
       
  1104             iPrevCaptureMode = appUi->PreCaptureMode();
       
  1105             appUi->SetPreCaptureMode(ECamPreCapGenericSetting);
       
  1106             }
       
  1107         else
       
  1108             {
       
  1109             appUi->SetPreCaptureMode( iPrevCaptureMode );
       
  1110             }        
       
  1111         }
       
  1112     }    
       
  1113     
       
  1114 // ---------------------------------------------------------------------------
       
  1115 // CCamCaptureSetupViewBase::SetCaptureSetupModeActive
       
  1116 // Sets the iSceneSettingModeActive flag
       
  1117 // ---------------------------------------------------------------------------
       
  1118 //
       
  1119 void CCamCaptureSetupViewBase::SetCaptureSetupModeActive(TBool aActive)
       
  1120     {
       
  1121     // This should be the only place iCaptureSetupModeActive is set!
       
  1122     // We need to inform the AppUi
       
  1123     iCaptureSetupModeActive = aActive;
       
  1124     PRINT1( _L("Camera <> CCamCaptureSetupViewBase::SetCaptureSetupModeActive iCaptureSetupModeActive=%d"),iCaptureSetupModeActive);
       
  1125     CCamAppUiBase* appUi = static_cast<CCamAppUiBase*>( AppUi() );
       
  1126     
       
  1127     if ( appUi)
       
  1128         {
       
  1129         if ( aActive )
       
  1130             {
       
  1131             appUi->SetPreCaptureMode(ECamPreCapCaptureSetup);
       
  1132             }
       
  1133         else
       
  1134             {
       
  1135             appUi->SetPreCaptureMode(ECamPreCapViewfinder);
       
  1136             }        
       
  1137         }
       
  1138     }
       
  1139 // ---------------------------------------------------------------------------
       
  1140 // CCamCaptureSetupViewBase::HandleForegroundEventL
       
  1141 // Called to notify of change of app fore/background state
       
  1142 // ---------------------------------------------------------------------------
       
  1143 //
       
  1144  void CCamCaptureSetupViewBase::HandleForegroundEventL( TBool aForeground )
       
  1145      {
       
  1146      
       
  1147      PRINT1( _L("Camera => CCamCaptureSetupViewBase::HandleForegroundEventL foreground:%d"), aForeground );
       
  1148      
       
  1149      if( aForeground )
       
  1150          {
       
  1151          
       
  1152          if ( iCaptureSetupModeActive && iCaptureSetupContainer )
       
  1153              {
       
  1154              iCaptureSetupContainer->HandleForegroundEventL( aForeground );
       
  1155              }
       
  1156          }
       
  1157      }
       
  1158 //  End of File