46 #ifdef OST_TRACE_COMPILER_IN_USE |
46 #ifdef OST_TRACE_COMPILER_IN_USE |
47 #include "CamVideoPreCaptureContainerTraces.h" |
47 #include "CamVideoPreCaptureContainerTraces.h" |
48 #endif |
48 #endif |
49 |
49 |
50 |
50 |
51 // CONSTANTS |
|
52 _LIT(KCamBitmapFile, "z:\\resource\\apps\\cameraapp.mif"); |
|
53 const TSize KIconSize(35, 35); |
|
54 |
|
55 |
51 |
56 // ================= MEMBER FUNCTIONS ======================= |
52 // ================= MEMBER FUNCTIONS ======================= |
57 |
53 |
58 // --------------------------------------------------------------------------- |
54 // --------------------------------------------------------------------------- |
59 // CCamVideoPreCaptureContainer::NewL |
55 // CCamVideoPreCaptureContainer::NewL |
82 if ( iFeedback ) |
78 if ( iFeedback ) |
83 { |
79 { |
84 iFeedback->RemoveFeedbackForControl( this ); |
80 iFeedback->RemoveFeedbackForControl( this ); |
85 } |
81 } |
86 delete iFileTypeIndicator; |
82 delete iFileTypeIndicator; |
87 |
|
88 if ( iCaptureIcon ) |
|
89 { |
|
90 delete iCaptureIcon; |
|
91 delete iCaptureMask; |
|
92 } |
|
93 PRINT( _L("Camera <= ~CCamVideoPreCaptureContainer") ); |
83 PRINT( _L("Camera <= ~CCamVideoPreCaptureContainer") ); |
94 } |
84 } |
95 |
85 |
96 // --------------------------------------------------------- |
86 // --------------------------------------------------------- |
97 // CCamVideoPreCaptureContainer::ConstructL |
87 // CCamVideoPreCaptureContainer::ConstructL |
99 // --------------------------------------------------------- |
89 // --------------------------------------------------------- |
100 // |
90 // |
101 void CCamVideoPreCaptureContainer::ConstructL( const TRect& aRect ) |
91 void CCamVideoPreCaptureContainer::ConstructL( const TRect& aRect ) |
102 { |
92 { |
103 PRINT( _L("Camera => CCamVideoPreCaptureContainer::ConstructL")) |
93 PRINT( _L("Camera => CCamVideoPreCaptureContainer::ConstructL")) |
104 PRINT( _L("Camera => CCamVideoPreCaptureContainer::ConstructL C")) |
|
105 TCamVideoResolution res = iController.GetCurrentVideoResolution(); |
94 TCamVideoResolution res = iController.GetCurrentVideoResolution(); |
106 PRINT( _L("Camera => CCamVideoPreCaptureContainer::ConstructL D")) |
|
107 iVFRes = iController.VideoViewFinderResourceId( res ); |
95 iVFRes = iController.VideoViewFinderResourceId( res ); |
108 PRINT( _L("Camera => CCamVideoPreCaptureContainer::ConstructL E")) |
|
109 |
96 |
110 BaseConstructL( aRect ); |
97 BaseConstructL( aRect ); |
111 iShowReticule = EFalse; |
98 iShowReticule = EFalse; |
112 |
99 |
113 iSidePane->SetCaptureMode( ECamControllerVideo ); |
100 iSidePane->SetCaptureMode( ECamControllerVideo ); |
159 // Get pointer of touch feedback instance |
146 // Get pointer of touch feedback instance |
160 iFeedback = MTouchFeedback::Instance(); |
147 iFeedback = MTouchFeedback::Instance(); |
161 if ( !iFeedback ) |
148 if ( !iFeedback ) |
162 iFeedback = MTouchFeedback::CreateInstanceL(); |
149 iFeedback = MTouchFeedback::CreateInstanceL(); |
163 } |
150 } |
164 |
|
165 // Load record icon |
|
166 AknIconUtils::CreateIconL( |
|
167 iCaptureIcon, |
|
168 iCaptureMask, |
|
169 KCamBitmapFile(), |
|
170 EMbmCameraappQgn_indi_cam4_video, |
|
171 EMbmCameraappQgn_indi_cam4_video_mask ); |
|
172 AknIconUtils::SetSize( iCaptureIcon, KIconSize, EAspectRatioPreserved ); |
|
173 AknIconUtils::SetSize( iCaptureMask, KIconSize, EAspectRatioPreserved ); |
|
174 } |
151 } |
175 |
152 |
176 // --------------------------------------------------------------------------- |
153 // --------------------------------------------------------------------------- |
177 // CCamVideoPreCaptureContainer::CCamVideoPreCaptureContainer |
154 // CCamVideoPreCaptureContainer::CCamVideoPreCaptureContainer |
178 // C++ constructor |
155 // C++ constructor |
436 } |
413 } |
437 else |
414 else |
438 { |
415 { |
439 CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() ); |
416 CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() ); |
440 |
417 |
|
418 if ( iController.UiConfigManagerPtr() |
|
419 && !iController.UiConfigManagerPtr()->IsAutoFocusSupported() |
|
420 && iController.IsTouchScreenSupported() ) |
|
421 { |
|
422 CAknToolbar* fixedToolbar = appUi->CurrentFixedToolbar(); |
|
423 if ( fixedToolbar ) |
|
424 { |
|
425 CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension(); |
|
426 if ( extension ) |
|
427 { |
|
428 extension->SetShown( EFalse ); |
|
429 } |
|
430 } |
|
431 } |
441 // neither recording nor paused |
432 // neither recording nor paused |
442 // so attempt to start recording |
433 // so attempt to start recording |
443 PRINT( _L("Camera <> starting capture") ); |
434 PRINT( _L("Camera <> starting capture") ); |
444 keyResponse = appUi->StartCaptureL( aKeyEvent ); |
435 keyResponse = appUi->StartCaptureL( aKeyEvent ); |
445 |
436 |
446 // Hide the toolbar if we are capturing |
437 // Hide the toolbar if we are capturing |
447 if( EKeyWasConsumed == keyResponse ) |
438 if( EKeyWasConsumed == keyResponse ) |
448 { |
439 { |
449 // Hide capture button if we are capturing |
|
450 iCaptureButtonShown = CaptureButtonActive(); |
|
451 DrawNow( iCaptureRect ); |
|
452 |
|
453 // Repeated key events (MSK) are ignored. |
440 // Repeated key events (MSK) are ignored. |
454 iController.SetDemandKeyRelease( ETrue ); |
441 iController.SetDemandKeyRelease( ETrue ); |
455 |
442 |
456 // fixed toolbar is used only with touch devices |
443 // fixed toolbar is used only with touch devices |
457 if ( iController.IsTouchScreenSupported() ) |
444 if ( iController.IsTouchScreenSupported() ) |