camerauis/cameraapp/generic/src/CamStillPreCaptureView.cpp
branchRCL_3
changeset 10 8c55c525d5d7
parent 9 792dfc98fb3b
child 11 d486e5e3cc9a
equal deleted inserted replaced
9:792dfc98fb3b 10:8c55c525d5d7
   162           		}
   162           		}
   163             break;
   163             break;
   164         	}
   164         	}
   165         case ECamCmdCaptureImage:
   165         case ECamCmdCaptureImage:
   166             {
   166             {
   167       	    OstTrace0( CAMERAAPP_PERFORMANCE, DUP9_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_AF_LOCK 1" );
       
   168       	    OstTrace0( CAMERAAPP_PERFORMANCE, DUP10_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHUTTER_RELEASE_LAG 1" );
   167       	    OstTrace0( CAMERAAPP_PERFORMANCE, DUP10_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHUTTER_RELEASE_LAG 1" );
   169       	    if ( iController.IsViewFinding() && appUi->CheckMemoryL() &&
   168       	    if ( iController.IsViewFinding() && appUi->CheckMemoryL() &&
   170                 !iController.CaptureModeTransitionInProgress() &&
   169                 !iController.CaptureModeTransitionInProgress() &&
   171                 !iController.IsProcessingCapture() ) 
   170                 !iController.IsProcessingCapture() ) 
   172             	{
   171             	{
   188                     && iController.ActiveCamera() != ECamActiveCameraSecondary
   187                     && iController.ActiveCamera() != ECamActiveCameraSecondary
   189                     && iController.UiConfigManagerPtr()
   188                     && iController.UiConfigManagerPtr()
   190                     && iController.UiConfigManagerPtr()->IsAutoFocusSupported()
   189                     && iController.UiConfigManagerPtr()->IsAutoFocusSupported()
   191                     && !iController.CurrentSceneHasForcedFocus() )
   190                     && !iController.CurrentSceneHasForcedFocus() )
   192                     {
   191                     {
       
   192                     // Next trace should be just before "e_CAM_PRI_SHUTTER_RELEASE_LAG 1", but only when AF is supported
       
   193                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP9_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_AF_LOCK 1" );
   193                     if( iController.CurrentOperation() == ECamNoOperation )
   194                     if( iController.CurrentOperation() == ECamNoOperation )
   194                         {
   195                         {
   195                         iController.SetAfNeeded( ETrue );
   196                         iController.SetAfNeeded( ETrue );
   196                         }    
   197                         }    
   197                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP7_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_AF 1" );
   198                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP7_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_AF 1" );
   198                     iController.StartAutoFocus();
   199                     iController.StartAutoFocus();
       
   200                     }
       
   201                 else // AF not needed, capture will start next
       
   202                     {
       
   203                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP11_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_SHOT_TO_SNAPSHOT 1" );
       
   204                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP12_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SNAPSHOT 1" );
       
   205                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP13_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SAVE 1" );
       
   206                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP14_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SHOT 1" );
       
   207                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP15_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_SHOT_TO_STILL 1" );
       
   208                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP16_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_CAPTURE_START 1" );
       
   209                     OstTrace0( CAMERAAPP_PERFORMANCE, DUP17_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SERIAL_SHOOTING 1" );
   199                     }
   210                     }
   200             	TKeyEvent keyEvent;
   211             	TKeyEvent keyEvent;
   201             	appUi->StartCaptureL( keyEvent );
   212             	appUi->StartCaptureL( keyEvent );
   202 
   213 
   203             	}
   214             	}
   336     // make sure CBA is correct
   347     // make sure CBA is correct
   337     UpdateCbaL();
   348     UpdateCbaL();
   338 
   349 
   339     SetMenuBar();
   350     SetMenuBar();
   340     
   351     
   341     if ( iContinueInBackground )
   352     if ( iContinueInBackground && !iStandbyModeActive )
   342         {
   353         {
   343         // make sure that CCamAppController is in view finder mode
   354         // make sure that CCamAppController is in view finder mode
   344         if ( iController.CurrentImageMode() == ECamImageCaptureNone )
   355         if ( iController.CurrentImageMode() == ECamImageCaptureNone )
   345             {
   356             {
   346             StartViewFinder();
   357             StartViewFinder();
   677       SetSoftKeysL( R_AVKON_SOFTKEYS_SELECT_BACK );
   688       SetSoftKeysL( R_AVKON_SOFTKEYS_SELECT_BACK );
   678       }          
   689       }          
   679   // if the view is in capture setup mode
   690   // if the view is in capture setup mode
   680   else if ( iCaptureSetupModeActive )
   691   else if ( iCaptureSetupModeActive )
   681       {
   692       {
   682       SetSoftKeysL( R_AVKON_SOFTKEYS_OK_CANCEL__OK );
   693       SetSoftKeysL( R_CAM_SOFTKEYS_SELECT_CANCEL );
   683       }
   694       }
   684   // if the view is in scene settings mode
   695   // if the view is in scene settings mode
   685   else if ( iSceneSettingModeActive )
   696   else if ( iSceneSettingModeActive )
   686       {
   697       {
   687       SetSoftKeysL( R_AVKON_SOFTKEYS_SELECT_CANCEL );
   698       SetSoftKeysL( R_AVKON_SOFTKEYS_SELECT_CANCEL );
   694     else
   705     else
   695       SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT );
   706       SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT );
   696     }
   707     }
   697   else if( iInfoListBoxActive )
   708   else if( iInfoListBoxActive )
   698   	{
   709   	{
   699   	SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE );
   710     if( !iForceAvkonCBA )
       
   711         {
       
   712         SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE_TRANSPARENT );    
       
   713         }
       
   714     else
       
   715         {
       
   716         SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE );    
       
   717         }    
   700   	}
   718   	}
   701   else if (  ( operation == ECamFocusing || operation == ECamFocused  || operation == ECamFocusFailed )
   719   else if (  ( operation == ECamFocusing || operation == ECamFocused  || operation == ECamFocusFailed )
   702          && !iController.CurrentSceneHasForcedFocus() )
   720          && !iController.CurrentSceneHasForcedFocus() )
   703       {
   721       {
   704       // If AutoFocus operation in progress.  Can occur for still or
   722       // If AutoFocus operation in progress.  Can occur for still or
  1029     TBool modeSelected = EFalse;
  1047     TBool modeSelected = EFalse;
  1030     TInt listBoxResource;
  1048     TInt listBoxResource;
  1031     TInt summaryResource;
  1049     TInt summaryResource;
  1032     TInt initialValue;
  1050     TInt initialValue;
  1033     TInt titleResource;
  1051     TInt titleResource;
       
  1052     TBool skinnedbackground = EFalse;
  1034     
  1053     
  1035     switch( aMode )
  1054     switch( aMode )
  1036     		{
  1055     		{
  1037     		case EInfoListBoxModeTimeLapse:	
  1056     		case EInfoListBoxModeTimeLapse:	
  1038     	 			{
  1057     	 			{
  1069         				listBoxResource = R_CAM_CAPTURE_SETUP_LIST_LIGHT_SENSITIVITY;
  1088         				listBoxResource = R_CAM_CAPTURE_SETUP_LIST_LIGHT_SENSITIVITY;
  1070         				summaryResource = R_CAM_CAPTURE_SETUP_LIST_LIGHT_SENSITIVITY_SUMMARY;
  1089         				summaryResource = R_CAM_CAPTURE_SETUP_LIST_LIGHT_SENSITIVITY_SUMMARY;
  1071     				    }
  1090     				    }
  1072     				titleResource = R_CAM_LIGHT_SENSITIVITY_TITLE;   					    				
  1091     				titleResource = R_CAM_LIGHT_SENSITIVITY_TITLE;   					    				
  1073  					modeSelected = ETrue;
  1092  					modeSelected = ETrue;
       
  1093  					skinnedbackground = EFalse;
  1074     				}
  1094     				}
  1075     				break;
  1095     				break;
  1076     		
  1096     		
  1077     		default: 
  1097     		default: 
  1078     				break;
  1098     				break;
  1083 				iInfoListBoxContainer = CCamInfoListBoxContainer::NewL( AppUi()->ApplicationRect(),
  1103 				iInfoListBoxContainer = CCamInfoListBoxContainer::NewL( AppUi()->ApplicationRect(),
  1084                                                              		*this,                                                            
  1104                                                              		*this,                                                            
  1085                                                              		iController,
  1105                                                              		iController,
  1086                                                              		listBoxResource,
  1106                                                              		listBoxResource,
  1087                                                              		summaryResource,
  1107                                                              		summaryResource,
  1088                                                              		initialValue, titleResource );		
  1108                                                              		initialValue, titleResource,
       
  1109                                                              		skinnedbackground );		
       
  1110 				
  1089 				iInfoListBoxContainer->DrawableWindow()->SetOrdinalPosition(-1); 
  1111 				iInfoListBoxContainer->DrawableWindow()->SetOrdinalPosition(-1); 
       
  1112 				iInfoListBoxContainer->SetMopParent( this ); 
  1090 				iInfoListBoxMode = aMode;          
  1113 				iInfoListBoxMode = aMode;          
  1091 				iSettingModeTitleResourceId = titleResource;                                                   					
  1114 				iSettingModeTitleResourceId = titleResource;                                                   					
  1092 
  1115 
  1093     		if ( iEmbedded )
  1116     		if ( iEmbedded )
  1094         		{
  1117         		{
  1098         		{
  1121         		{
  1099         		iPreviousMenuResourceId = ROID(R_CAM_STILL_PRE_CAPTURE_MENUBAR_ID);
  1122         		iPreviousMenuResourceId = ROID(R_CAM_STILL_PRE_CAPTURE_MENUBAR_ID);
  1100         		}
  1123         		}
  1101     		// Remove the view's main container, and add the capture setup 
  1124     		// Remove the view's main container, and add the capture setup 
  1102     		// control associated with the input command to the container stack.
  1125     		// control associated with the input command to the container stack.
  1103     		CCamCaptureSetupViewBase::SwitchToInfoListBoxL( aMode );
  1126     		CCamCaptureSetupViewBase::SwitchToInfoListBoxL( aMode, skinnedbackground );
  1104 
  1127 
  1105     		// only remove the capture setup menu container after 
  1128     		// only remove the capture setup menu container after 
  1106     		// the switch completes successfully
  1129     		// the switch completes successfully
  1107     		RemoveCaptureSetupMenuContainers();
  1130     		RemoveCaptureSetupMenuContainers();
  1108 
  1131     		if( skinnedbackground )
       
  1132     		    {
  1109     		// Stop the viewfinder
  1133     		// Stop the viewfinder
  1110     		StopViewFinder();    		    	        
  1134     		StopViewFinder();    		    	        
       
  1135     		    }
  1111     		}
  1136     		}
  1112     }
  1137     }
  1113 
  1138 
  1114 
  1139 
  1115 // ---------------------------------------------------------------------------
  1140 // ---------------------------------------------------------------------------