644 |
644 |
645 iCheckOperationInProgress = EFalse; |
645 iCheckOperationInProgress = EFalse; |
646 iLostFocusToNewWindow = EFalse; |
646 iLostFocusToNewWindow = EFalse; |
647 iFirstVFStart = ETrue; |
647 iFirstVFStart = ETrue; |
648 |
648 |
649 iInternalStorage = iController.ExistMassStorage()?ECamMediaStorageMassStorage:ECamMediaStoragePhone; |
|
650 |
|
651 if ( !uiOrientationOverride ) |
649 if ( !uiOrientationOverride ) |
652 { |
650 { |
653 iUiConstructionComplete = ETrue; |
651 iUiConstructionComplete = ETrue; |
654 } |
652 } |
655 iMemoryMonitor->StartMonitoring( iController.UiConfigManagerPtr()->CriticalLevelRamMemoryFocusGained(), |
653 iMemoryMonitor->StartMonitoring( iController.UiConfigManagerPtr()->CriticalLevelRamMemoryFocusGained(), |
2192 //We need to blank the precapture view CBA here to prevent |
2190 //We need to blank the precapture view CBA here to prevent |
2193 //blinking when changing back to precapture from postcapture |
2191 //blinking when changing back to precapture from postcapture |
2194 UpdateCba(); |
2192 UpdateCba(); |
2195 } |
2193 } |
2196 } |
2194 } |
|
2195 } |
|
2196 if ( iInSelfTimerMode != ECamSelfTimerDisabled ) |
|
2197 { |
|
2198 // This is set to false when StartCaptureL() is run |
|
2199 iSelfTimedCapture = ETrue; |
2197 } |
2200 } |
2198 } |
2201 } |
2199 |
2202 |
2200 // Always switch to post capture view if self timer is enabled |
2203 // Always switch to post capture view if self timer is enabled |
2201 else if ( iInSelfTimerMode != ECamSelfTimerDisabled ) |
2204 else if ( iInSelfTimerMode != ECamSelfTimerDisabled ) |
2678 static_cast<CCamViewBase*>( iView )->HandleCommandL( ECamCmdRedrawScreen ); |
2679 static_cast<CCamViewBase*>( iView )->HandleCommandL( ECamCmdRedrawScreen ); |
2679 } |
2680 } |
2680 else |
2681 else |
2681 { |
2682 { |
2682 PRINT( _L( "Camera <> CCamAppUi::HandleStandbyEventL: call iView->ExitAllModesL") ); |
2683 PRINT( _L( "Camera <> CCamAppUi::HandleStandbyEventL: call iView->ExitAllModesL") ); |
2683 PRINT1( _L( "Camera <> CCamAppUi::HandleStandbyEventL: iView = 0x%x"), iView ); |
2684 PRINT2( _L( "Camera <> CCamAppUi::HandleStandbyEventL: iView = 0x%x, iViewId = %d"), iView, iView->Id().iUid ); |
2684 // Exit any special modes. |
2685 // Exit any special modes. |
2685 // If AppUI construction is not finished, do it first, otherwise |
2686 // If AppUI construction is not finished, do it first, otherwise |
2686 // the view has not been created yet |
2687 // the view has not been created yet |
2687 if ( iController.UiConfigManagerPtr() && |
2688 if ( iController.UiConfigManagerPtr() && |
2688 iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() && |
2689 iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() && |
4855 TKeyResponse |
4860 TKeyResponse |
4856 CCamAppUi::StartCaptureL( const TKeyEvent& /*aKeyEvent*/ ) |
4861 CCamAppUi::StartCaptureL( const TKeyEvent& /*aKeyEvent*/ ) |
4857 { |
4862 { |
4858 PRINT( _L("Camera => CCamAppUi::StartCaptureL") ); |
4863 PRINT( _L("Camera => CCamAppUi::StartCaptureL") ); |
4859 iLensCoverExit = EFalse; |
4864 iLensCoverExit = EFalse; |
|
4865 iSelfTimedCapture = EFalse; |
4860 if ( iMode != ECamControllerVideo ) |
4866 if ( iMode != ECamControllerVideo ) |
4861 { |
4867 { |
4862 // Check for active viewfinder before proceeding with capture |
4868 // Check for active viewfinder before proceeding with capture |
4863 if ( !iController.IsViewFinding() ) |
4869 if ( !iController.IsViewFinding() ) |
4864 { |
4870 { |
5147 else |
5153 else |
5148 { |
5154 { |
5149 // this will exit when any current process completes |
5155 // this will exit when any current process completes |
5150 iController.EnterShutdownMode( EFalse ); |
5156 iController.EnterShutdownMode( EFalse ); |
5151 } |
5157 } |
|
5158 |
|
5159 if( iController.IntegerSettingValue( ECamSettingItemPhotoMediaStorage ) == ECamMediaStorageNone ) |
|
5160 { |
|
5161 iController.SetIntegerSettingValueL(ECamSettingItemPhotoMediaStorage, iInternalStorage ); |
|
5162 } |
|
5163 |
|
5164 if( iController.IntegerSettingValue( ECamSettingItemVideoMediaStorage ) == ECamMediaStorageNone ) |
|
5165 { |
|
5166 iController.SetIntegerSettingValueL(ECamSettingItemVideoMediaStorage, iInternalStorage ); |
|
5167 } |
|
5168 |
|
5169 |
5152 PRINT( _L("Camera <= CCamAppUi::CloseAppL") ) |
5170 PRINT( _L("Camera <= CCamAppUi::CloseAppL") ) |
5153 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP_CCAMAPPUI_CLOSEAPPL, "e_CCamAppUi_CloseAppL 0" ); |
5171 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP_CCAMAPPUI_CLOSEAPPL, "e_CCamAppUi_CloseAppL 0" ); |
5154 |
5172 |
5155 } |
5173 } |
5156 |
5174 |
7377 // Sets the current pre-capture mode |
7395 // Sets the current pre-capture mode |
7378 // --------------------------------------------------------------------------- |
7396 // --------------------------------------------------------------------------- |
7379 // |
7397 // |
7380 void CCamAppUi::SetPreCaptureModeL(TCamPreCaptureMode aMode) |
7398 void CCamAppUi::SetPreCaptureModeL(TCamPreCaptureMode aMode) |
7381 { |
7399 { |
7382 PRINT(_L("Camera=>CCamAppUi::SetPreCaptureMode")) |
7400 PRINT1(_L("Camera=>CCamAppUi::SetPreCaptureMode aMode=%d"), aMode); |
7383 iPreCaptureMode = aMode; |
7401 iPreCaptureMode = aMode; |
7384 |
7402 |
7385 CCamViewBase* precapView = NULL; |
7403 CCamViewBase* precapView = NULL; |
7386 if ( iView == iStillCaptureView || |
7404 if ( iView == iStillCaptureView || |
7387 iView == iVideoCaptureView ) |
7405 iView == iVideoCaptureView ) |
7835 } |
7853 } |
7836 |
7854 |
7837 |
7855 |
7838 // --------------------------------------------------------------------------- |
7856 // --------------------------------------------------------------------------- |
7839 // CCamAppUi::IsSelfTimedCapture |
7857 // CCamAppUi::IsSelfTimedCapture |
7840 // Whether the current capture was selftimer initiated |
7858 // Whether the latest capture was selftimer initiated |
7841 // --------------------------------------------------------------------------- |
7859 // --------------------------------------------------------------------------- |
7842 // |
7860 // |
7843 TBool CCamAppUi::IsSelfTimedCapture() const |
7861 TBool CCamAppUi::IsSelfTimedCapture() const |
7844 { |
7862 { |
7845 return iSelfTimedCapture; |
7863 return iSelfTimedCapture; |
8384 PRINT( _L("Camera => CCamAppUi::CompleteAppUIConstructionL") ) |
8402 PRINT( _L("Camera => CCamAppUi::CompleteAppUIConstructionL") ) |
8385 iUiConstructionComplete = ETrue; |
8403 iUiConstructionComplete = ETrue; |
8386 // Load the settings model static settings |
8404 // Load the settings model static settings |
8387 PRINT( _L("Camera <> call CCamAppController::LoadStaticSettingsL..") ) |
8405 PRINT( _L("Camera <> call CCamAppController::LoadStaticSettingsL..") ) |
8388 iController.LoadStaticSettingsL( IsEmbedded() ); |
8406 iController.LoadStaticSettingsL( IsEmbedded() ); |
|
8407 |
|
8408 iInternalStorage = static_cast<TCamMediaStorage>(iController.IntegerSettingValue( ECamSettingItemPhotoMediaStorage )); |
8389 // store the userscene settings |
8409 // store the userscene settings |
8390 iController.StoreUserSceneSettingsL(); |
8410 iController.StoreUserSceneSettingsL(); |
8391 |
8411 |
8392 /*#ifndef __WINSCW__ |
8412 /*#ifndef __WINSCW__ |
8393 if ( !iSFIUtils ) |
8413 if ( !iSFIUtils ) |
8574 CCamStartupLogoController* CCamAppUi::StartupLogoController() |
8594 CCamStartupLogoController* CCamAppUi::StartupLogoController() |
8575 { |
8595 { |
8576 return iStartupLogoController; |
8596 return iStartupLogoController; |
8577 } |
8597 } |
8578 |
8598 |
|
8599 |
|
8600 // ----------------------------------------------------------------------------- |
|
8601 // CCamAppUi::IsRecoverableStatus |
|
8602 // ----------------------------------------------------------------------------- |
|
8603 // |
|
8604 TBool CCamAppUi::IsRecoverableStatus() |
|
8605 { |
|
8606 TBool ret = ETrue; |
|
8607 switch(iStandbyStatus) |
|
8608 { |
|
8609 case ECamErrMassStorageMode: |
|
8610 case ECamErrMemoryCardNotInserted: |
|
8611 ret = EFalse; |
|
8612 break; |
|
8613 default: |
|
8614 break; |
|
8615 } |
|
8616 return ret; |
|
8617 } |
|
8618 |
|
8619 // ----------------------------------------------------------------------------- |
|
8620 // CCamAppUi::ChangeStandbyStatusL |
|
8621 // ----------------------------------------------------------------------------- |
|
8622 // |
|
8623 TBool CCamAppUi::ChangeStandbyStatusL( TInt aError ) |
|
8624 { |
|
8625 PRINT( _L("Camera => CCamAppUi::ChangeStandbyStatusL") ); |
|
8626 TBool ret = ETrue; |
|
8627 if( ECamViewStateStandby == iViewState ) |
|
8628 { |
|
8629 CCamViewBase* view = static_cast<CCamViewBase*>( iView ); |
|
8630 if( view ) |
|
8631 { |
|
8632 PRINT( _L("Camera <> CCamAppUi::ChangeStandbyStatusL ECamViewStateStandby") ); |
|
8633 view->SetStandbyStatusL( aError ); |
|
8634 } |
|
8635 else |
|
8636 { |
|
8637 ret = EFalse; |
|
8638 } |
|
8639 } |
|
8640 else if( ECamViewStatePreCapture == iViewState ) |
|
8641 { |
|
8642 CCamPreCaptureViewBase* view = static_cast<CCamPreCaptureViewBase*>( iView ); |
|
8643 PRINT( _L("Camera <> CCamAppUi::ChangeStandbyStatusL ECamViewStatePreCapture") ); |
|
8644 if( view ) |
|
8645 { |
|
8646 if( TBool(ETrue) == view->IsSetupModeActive() ) // Boolean corruption |
|
8647 { |
|
8648 ret = ETrue; |
|
8649 } |
|
8650 else |
|
8651 { |
|
8652 ret = EFalse; |
|
8653 } |
|
8654 } |
|
8655 } |
|
8656 else |
|
8657 { |
|
8658 if( ECamViewStatePreCapture == iTargetViewState || ECamPreCapViewfinder == iPreCaptureMode) |
|
8659 { |
|
8660 ret = EFalse; |
|
8661 } |
|
8662 PRINT3( _L("Camera <> CCamAppUi::ChangeStandbyStatusL iViewState=%d iTargetViewState=%d iPreCaptureMode=%d"), iViewState, iTargetViewState, iPreCaptureMode ); |
|
8663 } |
|
8664 PRINT1( _L("Camera <= CCamAppUi::ChangeStandbyStatusL ret=%d"), ret); |
|
8665 return ret; |
|
8666 } |
|
8667 |
|
8668 // ----------------------------------------------------------------------------- |
|
8669 // CCamAppUi::PreCaptureMode |
|
8670 // ----------------------------------------------------------------------------- |
|
8671 // |
|
8672 TCamPreCaptureMode CCamAppUi::PreCaptureMode() |
|
8673 { |
|
8674 PRINT1( _L("Camera <> CCamAppUi::PreCaptureMode %d"), iPreCaptureMode); |
|
8675 return iPreCaptureMode; |
|
8676 } |
|
8677 |
8579 // End of File |
8678 // End of File |