|
1 /* |
|
2 * Copyright (c) 2007-2009 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: Still image pre-capture view class for Camera application* |
|
15 */ |
|
16 |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "CamAppUi.h" |
|
20 #include "CamAppController.h" |
|
21 #include "CamStillPreCaptureView.h" |
|
22 #include "CamLogger.h" |
|
23 #include "CamUtility.h" |
|
24 #include "CamContainerBase.h" |
|
25 #include "CamAppUiBase.h" |
|
26 #include <eikmenub.h> |
|
27 #include <eikapp.h> |
|
28 #include <avkon.rsg> |
|
29 #include "CamCaptureSetupMenu.h" |
|
30 #include "CamPanic.h" |
|
31 #include "Cam.hrh" |
|
32 #include "CamAppUid.h" |
|
33 #include <csxhelp/lcam.hlp.hrh> |
|
34 #include "CamShootingModeContainer.h" |
|
35 #include "CamInfoListBoxContainer.h" |
|
36 #include "CamStillPreCaptureContainer.h" |
|
37 #include "CamSelfTimer.h" |
|
38 #include "CamTimeLapseUtility.h" |
|
39 #include <CaeEngine.h> |
|
40 #include <cameraapp.rsg> |
|
41 #include <vgacamsettings.rsg> |
|
42 #include <akntoolbar.h> |
|
43 #include <akntoolbarextension.h> |
|
44 #include <aknbutton.h> |
|
45 #include <AknsUtils.h> |
|
46 #include <cameraapp.mbg> |
|
47 #include <AknIconUtils.h> |
|
48 |
|
49 |
|
50 #include "StringLoader.h" |
|
51 #include "camactivepalettehandler.h" |
|
52 #include "CameraUiConfigManager.h" |
|
53 |
|
54 #include "CamLocalViewIds.h" |
|
55 #include "OstTraceDefinitions.h" |
|
56 #ifdef OST_TRACE_COMPILER_IN_USE |
|
57 #include "CamStillPreCaptureViewTraces.h" |
|
58 #endif |
|
59 |
|
60 |
|
61 // ========================= MEMBER FUNCTIONS ================================ |
|
62 |
|
63 // --------------------------------------------------------------------------- |
|
64 // CCamStillPreCaptureView::NewLC |
|
65 // Symbian OS two-phased constructor |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 CCamStillPreCaptureView* CCamStillPreCaptureView::NewLC( CCamAppController& aController ) |
|
69 { |
|
70 CCamStillPreCaptureView* self = |
|
71 new( ELeave ) CCamStillPreCaptureView( aController ); |
|
72 |
|
73 CleanupStack::PushL( self ); |
|
74 self->ConstructL(); |
|
75 |
|
76 return self; |
|
77 } |
|
78 |
|
79 // --------------------------------------------------------------------------- |
|
80 // CCamStillPreCaptureView destructor |
|
81 // |
|
82 // --------------------------------------------------------------------------- |
|
83 // |
|
84 CCamStillPreCaptureView::~CCamStillPreCaptureView() |
|
85 { |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // CCamStillPreCaptureView::Id |
|
90 // Returns UID of view |
|
91 // --------------------------------------------------------------------------- |
|
92 // |
|
93 TUid CCamStillPreCaptureView::Id() const |
|
94 { |
|
95 return TUid::Uid( ECamViewIdStillPreCapture ); |
|
96 } |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // CCamStillPreCaptureView::DoDeactivate |
|
100 // Deactivate this view |
|
101 // --------------------------------------------------------------------------- |
|
102 // |
|
103 void CCamStillPreCaptureView::DoDeactivate() |
|
104 { |
|
105 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMSTILLPRECAPTUREVIEW_DODEACTIVATE, "e_CCamStillPreCaptureView_DoDeactivate 1" ); |
|
106 PERF_EVENT_START_L2( EPerfEventStillPreCaptureViewDeactivation ); |
|
107 PRINT( _L("Camera => CCamStillPreCaptureView::DoDeactivate" ) ) |
|
108 |
|
109 CCamPreCaptureViewBase::DoDeactivate(); |
|
110 PERF_EVENT_END_L2( EPerfEventStillPreCaptureViewDeactivation ); |
|
111 PRINT( _L("Camera <= CCamStillPreCaptureView::DoDeactivate" ) ) |
|
112 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMSTILLPRECAPTUREVIEW_DODEACTIVATE, "e_CCamStillPreCaptureView_DoDeactivate 0" ); |
|
113 } |
|
114 |
|
115 // ----------------------------------------------------------------------------- |
|
116 // CCamStillPreCaptureView::HandleCommandL |
|
117 // Handle commands |
|
118 // ----------------------------------------------------------------------------- |
|
119 // |
|
120 void CCamStillPreCaptureView::HandleCommandL( TInt aCommand ) |
|
121 { |
|
122 CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() ); |
|
123 TCamOrientation orientation = appUi->CamOrientation(); |
|
124 switch ( aCommand ) |
|
125 { |
|
126 case ECamMSKCmdSelect: |
|
127 case ECamMSKCmdAppCapture: |
|
128 { |
|
129 if( orientation == ECamOrientationCamcorder || |
|
130 orientation == ECamOrientationCamcorderLeft || |
|
131 orientation == ECamOrientationPortrait ) |
|
132 { |
|
133 if ( !StartMskCaptureL() ) |
|
134 { |
|
135 // If in the Landscape mode, MSK event is mapped |
|
136 // like a normal selection key so that AP items |
|
137 // are selected and respective setting pages are launched |
|
138 TKeyEvent aKeyEvent; |
|
139 aKeyEvent.iCode = aKeyEvent.iRepeats = aKeyEvent.iModifiers = 0; |
|
140 aKeyEvent.iScanCode = EStdKeyDevice3; |
|
141 static_cast<CCamStillPreCaptureContainer*> |
|
142 ( Container() )->OfferKeyEventL( aKeyEvent, EEventKey ); |
|
143 } |
|
144 } |
|
145 else if ( aCommand == ECamMSKCmdAppCapture ) |
|
146 // if the Camera in the Portrait mode |
|
147 // MSK event is handled like a capture key |
|
148 { |
|
149 if ( iController.IsViewFinding() && appUi->CheckMemoryL() ) |
|
150 { |
|
151 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_SHOT_TO_SNAPSHOT 1" ); |
|
152 OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SNAPSHOT 1" ); |
|
153 OstTrace0( CAMERAAPP_PERFORMANCE, DUP2_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SAVE 1" ); |
|
154 OstTrace0( CAMERAAPP_PERFORMANCE, DUP3_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SHOT_TO_SHOT 1" ); |
|
155 OstTrace0( CAMERAAPP_PERFORMANCE, DUP4_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_SHOT_TO_STILL 1" ); |
|
156 OstTrace0( CAMERAAPP_PERFORMANCE, DUP5_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_CAPTURE_START 1" ); |
|
157 OstTrace0( CAMERAAPP_PERFORMANCE, DUP6_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_PRI_SERIAL_SHOOTING 1" ); |
|
158 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
159 iController.Capture(); |
|
160 } |
|
161 } |
|
162 break; |
|
163 } |
|
164 case ECamCmdCaptureImage: |
|
165 { |
|
166 if ( iController.IsViewFinding() && appUi->CheckMemoryL() && |
|
167 !iController.CaptureModeTransitionInProgress() && |
|
168 !iController.IsProcessingCapture() ) |
|
169 { |
|
170 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
171 |
|
172 // fixed toolbar is used only with touch devices |
|
173 if ( iController.IsTouchScreenSupported() ) |
|
174 { |
|
175 CAknToolbar* fixedToolbar = Toolbar(); |
|
176 if ( fixedToolbar ) |
|
177 { |
|
178 fixedToolbar->SetToolbarVisibility( EFalse ); |
|
179 } |
|
180 } |
|
181 |
|
182 // Start the autofocus operation now, the capture will be queued |
|
183 // after focus completes |
|
184 if ( !appUi->SelfTimerEnabled() |
|
185 && iController.ActiveCamera() != ECamActiveCameraSecondary |
|
186 && iController.UiConfigManagerPtr() |
|
187 && iController.UiConfigManagerPtr()->IsAutoFocusSupported() |
|
188 && !iController.CurrentSceneHasForcedFocus() ) |
|
189 { |
|
190 if( iController.CurrentOperation() == ECamNoOperation ) |
|
191 { |
|
192 iController.SetAfNeeded( ETrue ); |
|
193 } |
|
194 OstTrace0( CAMERAAPP_PERFORMANCE, DUP7_CCAMSTILLPRECAPTUREVIEW_HANDLECOMMANDL, "e_CAM_APP_AF 1" ); |
|
195 iController.StartAutoFocus(); |
|
196 } |
|
197 TKeyEvent keyEvent; |
|
198 appUi->StartCaptureL( keyEvent ); |
|
199 |
|
200 } |
|
201 break; |
|
202 } |
|
203 case ECamCmdTimeLapseSlider: |
|
204 { |
|
205 TCamTimeLapse settingValue = ECamTimeLapseOff; |
|
206 |
|
207 if ( appUi && !appUi->IsBurstEnabled() ) |
|
208 { |
|
209 settingValue = ECamTimeLapseMin; |
|
210 } |
|
211 |
|
212 TInt command = CamTimeLapseUtility::EnumToCommand( settingValue ); |
|
213 TTimeIntervalMicroSeconds interval = CamTimeLapseUtility::EnumToInterval( settingValue ); |
|
214 |
|
215 // Update the current mode (single/burst/timelapse) |
|
216 if( appUi ) |
|
217 { |
|
218 TRAP_IGNORE( appUi->HandleCommandL( command ) ); |
|
219 } |
|
220 |
|
221 // Update timelapse interval |
|
222 iController.SetTimeLapseInterval( interval ); |
|
223 |
|
224 // stop and start the viewfinder in order to update the settings |
|
225 StopViewFinder(); |
|
226 StartViewFinder(); |
|
227 |
|
228 // fixed toolbar is used only with touch devices |
|
229 if ( iController.IsTouchScreenSupported() ) |
|
230 { |
|
231 UpdateToolbarIconsL(); |
|
232 } |
|
233 |
|
234 } |
|
235 break; |
|
236 |
|
237 case ECamCmdCaptureSetupLightSensitivityStill: |
|
238 // case ECamCmdCaptureSetupLightSensitivityVideo: |
|
239 { |
|
240 SwitchToInfoListBoxL( EInfoListBoxModeISO ); |
|
241 } |
|
242 break; |
|
243 |
|
244 case ECamCmdGoToStandby: |
|
245 { |
|
246 // SwitchToStandbyModeL( ECamViewIdStillPreCapture, iStandbyError ); |
|
247 SwitchToStandbyModeL( ECamViewIdStillPreCapture, appUi->StandbyStatus() ); |
|
248 } |
|
249 break; |
|
250 case ECamCmdExitStandby: |
|
251 { |
|
252 ExitStandbyModeL(); |
|
253 } |
|
254 break; |
|
255 case ECamCmdViewfinderGrid: |
|
256 { |
|
257 // Switch grid setting |
|
258 CCamPreCaptureViewBase::HandleCommandL( aCommand ); |
|
259 UpdateToolbarIconsL(); |
|
260 } |
|
261 break; |
|
262 case ECamCmdToggleFacetracking: |
|
263 { |
|
264 // Switch facetracking setting |
|
265 CCamPreCaptureViewBase::HandleCommandL( aCommand ); |
|
266 UpdateToolbarIconsL(); |
|
267 |
|
268 break; |
|
269 } |
|
270 default: |
|
271 { |
|
272 CCamPreCaptureViewBase::HandleCommandL( aCommand ); |
|
273 } |
|
274 } |
|
275 } |
|
276 |
|
277 // ----------------------------------------------------------------------------- |
|
278 // CCamStillPreCaptureView::HandleForegroundEventL |
|
279 // Handle foreground event |
|
280 // ----------------------------------------------------------------------------- |
|
281 // |
|
282 void |
|
283 CCamStillPreCaptureView::HandleForegroundEventL( TBool aForeground ) |
|
284 { |
|
285 PRINT( _L("Camera => CCamStillPreCaptureView::HandleForegroundEventL") ); |
|
286 |
|
287 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
|
288 |
|
289 // ------------------------------------------------------- |
|
290 // Foreground |
|
291 // |
|
292 // reset menu and cba as appropriate |
|
293 if( aForeground ) |
|
294 { |
|
295 PRINT( _L("Camera <> CCamStillPreCaptureView::HandleForegroundEventL: to foreground") ); |
|
296 PRINT1( _L("Camera <> CCamStillPreCaptureView .. Current controller operation [%s]"), KCamCaptureOperationNames[iController.CurrentOperation()] ); |
|
297 PRINT1( _L("Camera <> CCamStillPreCaptureView .. Current controller mode [%s]"), KCamModeNames[iController.CurrentMode()] ); |
|
298 |
|
299 |
|
300 if( iController.SequenceCaptureInProgress() ) |
|
301 { |
|
302 PRINT( _L("Camera <= CCamStillPreCaptureView::HandleForegroundEventL: sequence capture ongoing") ); |
|
303 return; |
|
304 } |
|
305 |
|
306 if ( appUi->IsInPretendExit() ) |
|
307 { |
|
308 PRINT( _L("Camera <= CCamStillPreCaptureView::HandleForegroundEventL: app in pretend exit so not grabbing resources") ) |
|
309 // The view can get a foreground event while the application is |
|
310 // actually in a pretend exit situation. This occurs when the view switch |
|
311 // was called before the exit event, but didn't complete until after the |
|
312 // exit event. In this case the view should not register an interest in |
|
313 // the engine as the application is really in the background and the resources |
|
314 // need to be released |
|
315 return; |
|
316 } |
|
317 // if foreground event is received while in videocall, go to standby with error |
|
318 if ( iController.InVideocallOrRinging() && ECamNoOperation == iController.CurrentOperation() ) |
|
319 { |
|
320 ExitAllModesL(); |
|
321 appUi->SetStandbyStatus( KErrInUse ); |
|
322 appUi->HandleCommandL( ECamCmdGoToStandby ); |
|
323 SetTitlePaneTextL(); |
|
324 return; |
|
325 } |
|
326 |
|
327 // check for silent profile whenever we come to foreground, we dont need it here, |
|
328 // but we keep track of this in appcontroller. |
|
329 iController.IsProfileSilent(); |
|
330 |
|
331 // set embedded flag here |
|
332 iEmbedded = appUi->IsEmbedded(); |
|
333 // make sure CBA is correct |
|
334 UpdateCbaL(); |
|
335 |
|
336 SetMenuBar(); |
|
337 |
|
338 if ( iContinueInBackground ) |
|
339 { |
|
340 // make sure that CCamAppController is in view finder mode |
|
341 if ( iController.CurrentImageMode() == ECamImageCaptureNone ) |
|
342 { |
|
343 StartViewFinder(); |
|
344 } |
|
345 } |
|
346 } |
|
347 // ------------------------------------------------------- |
|
348 // Background |
|
349 // |
|
350 // If going to the background, cancel any current autofocus. |
|
351 // This makes sure that the focus indicator is removed from the side pane |
|
352 // if the key release event is lost. |
|
353 // Cancelling focus does nothing if a capture has already been requested |
|
354 else |
|
355 { |
|
356 PRINT( _L("Camera <> CCamStillPreCaptureView::HandleForegroundEventL: to background") ); |
|
357 // Cancel any outstanding capture |
|
358 iController.CancelFocusAndCapture(); |
|
359 |
|
360 // stop any current sequence capture unless it is only a notification |
|
361 if( iController.SequenceCaptureInProgress() |
|
362 && ( appUi->AppInBackground( EFalse ) |
|
363 || appUi->ForegroundAppIsPhoneApp() |
|
364 ) |
|
365 ) |
|
366 { |
|
367 iController.StopSequenceCaptureL(); |
|
368 } |
|
369 /* |
|
370 // stop any current sequence capture unless it is only an eikon server or AknCapServer window |
|
371 if ( iCoeEnv->WsSession().GetFocusWindowGroup() != iEikonServerWindowGroupId |
|
372 && iController.SequenceCaptureInProgress() ) |
|
373 { |
|
374 TInt groupId = iCoeEnv->WsSession().GetFocusWindowGroup(); |
|
375 if ( !CamUtility::IdMatchesName( groupId, KAknCapServer ) ) |
|
376 { |
|
377 // If AknCapServer has NOT got foreground, (which would possibly |
|
378 // indicate a "charging" note) stop sequence capture |
|
379 iController.StopSequenceCaptureL(); |
|
380 } |
|
381 } |
|
382 */ |
|
383 } |
|
384 |
|
385 CCamPreCaptureViewBase::HandleForegroundEventL( aForeground ); |
|
386 |
|
387 PRINT( _L("Camera <= CCamStillPreCaptureView::HandleForegroundEventL") ); |
|
388 } |
|
389 |
|
390 // ----------------------------------------------------------------------------- |
|
391 // CCamStillPreCaptureView::HandleFocusLossL |
|
392 // Handle change of focus |
|
393 // ----------------------------------------------------------------------------- |
|
394 // |
|
395 void CCamStillPreCaptureView::HandleFocusLossL() |
|
396 { |
|
397 PRINT( _L( "Camera => CCamStillPreCaptureView::HandleFocusLossL" ) ); |
|
398 // if the application was already in the background, but behind an |
|
399 // eikon server window, then handle backgrounding properly now. |
|
400 // Otherwise the backgrounding will be handled in the normal |
|
401 // HandleForeground() method. |
|
402 if ( iContinueInBackground ) |
|
403 { |
|
404 if ( iController.SequenceCaptureInProgress() ) |
|
405 { |
|
406 iController.StopSequenceCaptureL(); |
|
407 } |
|
408 } |
|
409 CCamPreCaptureViewBase::HandleFocusLossL(); |
|
410 PRINT( _L( "Camera <= CCamVideoPreCaptureView::HandleFocusLossL" ) ); |
|
411 } |
|
412 |
|
413 // ----------------------------------------------------------------------------- |
|
414 // CCamStillPreCaptureView::HandleControllerEventL |
|
415 // Handle controller events |
|
416 // ----------------------------------------------------------------------------- |
|
417 // |
|
418 void CCamStillPreCaptureView::HandleControllerEventL( TCamControllerEvent aEvent, |
|
419 TInt aError ) |
|
420 { |
|
421 PRINT( _L("Camera => CCamStillPreCaptureView::HandleControllerEventL") ); |
|
422 |
|
423 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
|
424 if ( ECamEventControllerReady == aEvent ) |
|
425 { |
|
426 iSoftkeyBlankIsNeeded = EFalse; |
|
427 UpdateCbaL(); |
|
428 } |
|
429 else if ( aEvent == ECamEventOperationStateChanged ) |
|
430 { |
|
431 PRINT( _L("Camera <> CCamStillPreCaptureView: ECamEventOperationStateChanged") ); |
|
432 TCamCaptureOperation operation = iController.CurrentOperation(); |
|
433 switch ( operation ) |
|
434 { |
|
435 case ECamCompleting: |
|
436 { |
|
437 UpdateCbaL(); |
|
438 break; |
|
439 } |
|
440 |
|
441 case ECamFocusing: |
|
442 { |
|
443 // Hide the AP during focussing |
|
444 if ( appUi->AlwaysDrawPreCaptureCourtesyUI() |
|
445 && !iController.CurrentSceneHasForcedFocus() ) |
|
446 { |
|
447 appUi->SetActivePaletteVisibility( EFalse ); |
|
448 } |
|
449 break; |
|
450 } |
|
451 |
|
452 case ECamFocused: |
|
453 { |
|
454 // Hide the AP during focussing |
|
455 if ( appUi->AlwaysDrawPreCaptureCourtesyUI() |
|
456 && !iController.CurrentSceneHasForcedFocus() ) |
|
457 { |
|
458 appUi->SetActivePaletteVisibility( EFalse ); |
|
459 } |
|
460 UpdateCbaL(); |
|
461 break; |
|
462 } |
|
463 |
|
464 case ECamNoOperation: |
|
465 { |
|
466 if( iController.IsAppUiAvailable() ) |
|
467 { |
|
468 //Update softkey state. |
|
469 UpdateCbaL(); |
|
470 |
|
471 // Hide the AP if we already have an autofocus request but operation doesn't |
|
472 // have it (likely shutter was half-pressed before precap view opened) |
|
473 if ( iController.PendingAFRequest() != 0 && |
|
474 appUi->AlwaysDrawPreCaptureCourtesyUI() && |
|
475 !iController.CurrentSceneHasForcedFocus() ) |
|
476 { |
|
477 appUi->SetActivePaletteVisibility( EFalse ); |
|
478 UpdateCbaL(); |
|
479 } |
|
480 |
|
481 // Show the AP again if the shutter key is released |
|
482 // without taking a picture, don't show if uiorientationoverride |
|
483 // feature is on and VF not running (prevents AP flashing in startup) |
|
484 if ( iPreviousControllerOperation !=ECamStandby && |
|
485 appUi->CurrentViewState() == ECamViewStatePreCapture && |
|
486 appUi->AlwaysDrawPreCaptureCourtesyUI() && |
|
487 !iSceneSettingModeActive && |
|
488 !( iController.UiConfigManagerPtr() && |
|
489 iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() && |
|
490 !iController.IsViewFinding() ) ) |
|
491 { |
|
492 appUi->SetActivePaletteVisibility( ETrue ); |
|
493 } |
|
494 } |
|
495 |
|
496 break; |
|
497 } |
|
498 |
|
499 case ECamCapturing: |
|
500 { |
|
501 // If in burst, make sure the correct CBA is shown |
|
502 if( appUi->IsBurstEnabled() ) |
|
503 { |
|
504 UpdateCbaL(); |
|
505 // show image counter |
|
506 iContainer->SetupNaviPanesL( CCamContainerBase::ECamPaneCounter ); |
|
507 } |
|
508 break; |
|
509 } |
|
510 default: |
|
511 { |
|
512 // Hide the AP if we already have an autofocus request but operation doesn't |
|
513 // have it (likely shutter was half-pressed before precap view opened) |
|
514 if ( iController.PendingAFRequest() != 0 && |
|
515 appUi->AlwaysDrawPreCaptureCourtesyUI() && |
|
516 !iController.CurrentSceneHasForcedFocus() ) |
|
517 { |
|
518 appUi->SetActivePaletteVisibility( EFalse ); |
|
519 UpdateCbaL(); |
|
520 } |
|
521 break; |
|
522 } |
|
523 } |
|
524 |
|
525 iPreviousControllerOperation = operation; |
|
526 |
|
527 } |
|
528 else |
|
529 { |
|
530 PRINT( _L("Camera <> CCamStillPreCaptureView: call CCamPreCaptureViewBase::HandleControllerEventL") ); |
|
531 CCamPreCaptureViewBase::HandleControllerEventL( aEvent, aError ); |
|
532 } |
|
533 PRINT( _L("Camera <= CCamStillPreCaptureView::HandleControllerEventL") ); |
|
534 } |
|
535 |
|
536 |
|
537 // --------------------------------------------------------------------------- |
|
538 // CCamStillPreCaptureView::CreateCaptureSetupMenuL |
|
539 // Creates a photo capture setup menu |
|
540 // --------------------------------------------------------------------------- |
|
541 // |
|
542 void CCamStillPreCaptureView::CreateCaptureSetupMenuL( ) |
|
543 { |
|
544 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMSTILLPRECAPTUREVIEW_CREATECAPTURESETUPMENUL, "e_CCamStillPreCaptureView_CreateCaptureSetupMenuL 1" ); |
|
545 TInt resource; |
|
546 // check if we are Western or Arabic/Hebrew layout |
|
547 if ( !AknLayoutUtils::LayoutMirrored() ) |
|
548 { |
|
549 // Do we need APAC layout |
|
550 if( AknLayoutUtils::Variant() == EApacVariant ) |
|
551 { |
|
552 resource = ROID(R_CAM_CAPTURE_SETUP_MENU_PHOTO_DATA_APAC_ID); |
|
553 } |
|
554 else |
|
555 { |
|
556 // use Western resource |
|
557 resource = ROID(R_CAM_CAPTURE_SETUP_MENU_PHOTO_DATA_ID); |
|
558 } |
|
559 } |
|
560 else |
|
561 { |
|
562 resource = ROID(R_CAM_CAPTURE_SETUP_MENU_PHOTO_DATA_AH_ID); |
|
563 } |
|
564 |
|
565 // Use capture setup menu for second camera |
|
566 if ( static_cast<CCamAppUiBase*>( AppUi() )->IsSecondCameraEnabled() ) |
|
567 { |
|
568 resource = ROID(R_CAM_CAPTURE_SETUP_MENU_PHOTO_DATA_ID); |
|
569 } |
|
570 |
|
571 iCaptureSetupMenuContainer = |
|
572 CCamCaptureSetupMenu::NewL( iController, *this, AppUi()->ClientRect(), |
|
573 resource, iCaptureSetupMenuLastItemIndex ); |
|
574 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMSTILLPRECAPTUREVIEW_CREATECAPTURESETUPMENUL, "e_CCamStillPreCaptureView_CreateCaptureSetupMenuL 0" ); |
|
575 } |
|
576 |
|
577 // --------------------------------------------------------------------------- |
|
578 // CCamStillPreCaptureView::SetMenuBar() |
|
579 // Sets the menu bar according to camera state |
|
580 // --------------------------------------------------------------------------- |
|
581 // |
|
582 void |
|
583 CCamStillPreCaptureView::SetMenuBar() |
|
584 { |
|
585 PRINT( _L("Camera => CCamStillPreCaptureView::SetMenuBar") ); |
|
586 |
|
587 // update menu bar as required |
|
588 CEikMenuBar* menuBar = MenuBar(); |
|
589 |
|
590 // if menuBar exists |
|
591 if ( menuBar ) |
|
592 { |
|
593 if ( iStandbyModeActive ) //&& iActivateToStandby ) |
|
594 { |
|
595 PRINT( _L("Camera <> CCamStillPreCaptureView::SetMenuBar: setting standby menubar..") ); |
|
596 menuBar->SetMenuTitleResourceId( R_CAM_STANDBY_MENUBAR ); |
|
597 } |
|
598 else if ( iEmbedded && !iSceneSettingModeActive ) |
|
599 { |
|
600 PRINT( _L("Camera <> CCamStillPreCaptureView::SetMenuBar: setting embedded menubar..") ); |
|
601 menuBar->SetMenuTitleResourceId( ROID(R_CAM_STILL_EMBEDDED_PRE_CAPTURE_MENUBAR_ID)); |
|
602 } |
|
603 else |
|
604 { |
|
605 if ( iSceneSettingModeActive ) |
|
606 { |
|
607 PRINT( _L("Camera <> CCamStillPreCaptureView::SetMenuBar: setting scene setting menubar..") ); |
|
608 menuBar->SetMenuTitleResourceId( ROID(R_CAM_SCENE_SETTING_MENUBAR_ID)); |
|
609 } |
|
610 else |
|
611 { |
|
612 PRINT( _L("Camera <> CCamStillPreCaptureView::SetMenuBar: setting normal menubar..") ); |
|
613 menuBar->SetMenuTitleResourceId( ROID(R_CAM_STILL_PRE_CAPTURE_MENUBAR_ID)); |
|
614 } |
|
615 } |
|
616 } |
|
617 PRINT( _L("Camera <= CCamStillPreCaptureView::SetMenuBar") ); |
|
618 } |
|
619 |
|
620 |
|
621 // --------------------------------------------------------------------------- |
|
622 // CCamStillPreCaptureView::CCamStillPreCaptureView |
|
623 // C++ constructor |
|
624 // --------------------------------------------------------------------------- |
|
625 // |
|
626 CCamStillPreCaptureView::CCamStillPreCaptureView( CCamAppController& aController ) |
|
627 : CCamPreCaptureViewBase( aController ),iSoftkeyBlankIsNeeded( EFalse ) |
|
628 { |
|
629 } |
|
630 |
|
631 // --------------------------------------------------------------------------- |
|
632 // CCamStillPreCaptureView::ConstructL |
|
633 // Symbian OS 2nd phase constructor |
|
634 // --------------------------------------------------------------------------- |
|
635 // |
|
636 void CCamStillPreCaptureView::ConstructL() |
|
637 { |
|
638 BaseConstructL( ROID(R_CAM_STILL_PRE_CAPTURE_VIEW_ID)); |
|
639 |
|
640 iPreviousControllerOperation = ECamNoOperation; |
|
641 |
|
642 CCamPreCaptureViewBase::ConstructL(); |
|
643 } |
|
644 |
|
645 |
|
646 // --------------------------------------------------------------------------- |
|
647 // CCamStillPreCaptureView::UpdateCbaL |
|
648 // Update softkeys to reflect current state |
|
649 // --------------------------------------------------------------------------- |
|
650 // |
|
651 void CCamStillPreCaptureView::UpdateCbaL() |
|
652 { |
|
653 PRINT( _L("Camera => CCamStillPreCaptureView::UpdateCbaL") ); |
|
654 |
|
655 CCamAppUi* appui = static_cast<CCamAppUi*>( AppUi() ); |
|
656 TBool burstEnabled = appui->IsBurstEnabled(); |
|
657 |
|
658 TCamCaptureOperation operation = iController.CurrentOperation(); |
|
659 TBool isSecondaryPortrait = appui->IsSecondCameraEnabled() && !appui->IsQwerty2ndCamera(); |
|
660 if ( iSoftkeyBlankIsNeeded ) |
|
661 { |
|
662 isSecondaryPortrait?SetSoftKeysL( R_CAM_SOFTKEYS_BLANK_EXIT_SECONDARY ):SetSoftKeysL( R_CAM_SOFTKEYS_BLANK_EXIT ); |
|
663 } |
|
664 // if video call is active |
|
665 else if ( iController.InVideocallOrRinging() ) |
|
666 { |
|
667 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT ); |
|
668 } |
|
669 // if the view is in capture setup menu mode |
|
670 else if ( iCaptureSetupMenuModeActive && |
|
671 !iCaptureSetupModeActive && |
|
672 !iSceneSettingModeActive ) |
|
673 { |
|
674 SetSoftKeysL( R_AVKON_SOFTKEYS_SELECT_BACK ); |
|
675 } |
|
676 // if the view is in capture setup mode |
|
677 else if ( iCaptureSetupModeActive ) |
|
678 { |
|
679 SetSoftKeysL( R_AVKON_SOFTKEYS_OK_CANCEL__OK ); |
|
680 } |
|
681 // if the view is in scene settings mode |
|
682 else if ( iSceneSettingModeActive ) |
|
683 { |
|
684 SetSoftKeysL( R_AVKON_SOFTKEYS_SELECT_CANCEL ); |
|
685 } |
|
686 else if ( iStandbyModeActive ) |
|
687 { |
|
688 PRINT( _L("Camera <> CCamStillPreCaptureView::UpdateCbaL: Setting standby softkeys..") ); |
|
689 if( KErrNone == appui->StandbyStatus() ) |
|
690 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CONTINUE ); |
|
691 else |
|
692 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT ); |
|
693 } |
|
694 else if( iInfoListBoxActive ) |
|
695 { |
|
696 SetSoftKeysL( R_CAM_SOFTKEYS_SETTINGS_SELECT_BACK__CHANGE ); |
|
697 } |
|
698 else if ( ( operation == ECamFocusing || operation == ECamFocused || operation == ECamFocusFailed ) |
|
699 && !iController.CurrentSceneHasForcedFocus() ) |
|
700 { |
|
701 // If AutoFocus operation in progress. Can occur for still or |
|
702 // burst capture |
|
703 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
704 } |
|
705 // If timelapse capture is ongoing the keys should be blank and cancel |
|
706 else if ( burstEnabled && |
|
707 appui->CurrentBurstMode() == ECamImageCaptureTimeLapse && |
|
708 iController.SequenceCaptureInProgress() ) |
|
709 { |
|
710 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK_STOP ); |
|
711 } |
|
712 // If "Burst" capture is starting |
|
713 else if ( burstEnabled && operation == ECamCapturing ) |
|
714 { |
|
715 |
|
716 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK_STOP ); |
|
717 |
|
718 } |
|
719 // If "Burst" capture is completing |
|
720 else if ( burstEnabled && operation == ECamCompleting ) |
|
721 { |
|
722 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
723 } |
|
724 else if ( appui->SelfTimerEnabled() ) |
|
725 { |
|
726 // If self-timer enabled, check the precise state to show the |
|
727 // correct CBA state. |
|
728 CCamSelfTimer* selftimer = appui->SelfTimer(); |
|
729 if ( selftimer->IsActive() ) |
|
730 { |
|
731 { |
|
732 SetSoftKeysL( R_CAM_SOFTKEYS_SELFTIMER_BLANK_CANCEL ); |
|
733 } |
|
734 } |
|
735 else if( iEmbedded && operation == ECamCompleting ) |
|
736 { |
|
737 isSecondaryPortrait?SetSoftKeysL( R_CAM_SOFTKEYS_BLANK_SECONDARY ):SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
738 } |
|
739 else |
|
740 { |
|
741 SetSoftKeysL( R_CAM_SOFTKEYS_ACTIVATE_CANCEL__SELECT ); |
|
742 } |
|
743 } |
|
744 else // otherwise, show the default softkeys |
|
745 { |
|
746 // options key is disabled if currently in capture mode |
|
747 // transition (i.e. switching to video mode) |
|
748 if ( iController.CaptureModeTransitionInProgress() ) |
|
749 { |
|
750 SetSoftKeysL( iEmbedded |
|
751 ? R_CAM_SOFTKEYS_BACK |
|
752 : R_CAM_SOFTKEYS_BLANK_EXIT ); |
|
753 if(iEmbedded ) |
|
754 { |
|
755 if(isSecondaryPortrait) |
|
756 { |
|
757 SetSoftKeysL(R_CAM_SOFTKEYS_BACK_SECONDARY); |
|
758 } |
|
759 else |
|
760 { |
|
761 SetSoftKeysL(R_CAM_SOFTKEYS_BACK); |
|
762 } |
|
763 } |
|
764 else |
|
765 { |
|
766 if(isSecondaryPortrait) |
|
767 { |
|
768 SetSoftKeysL(R_CAM_SOFTKEYS_BLANK_EXIT_SECONDARY); |
|
769 } |
|
770 else |
|
771 { |
|
772 SetSoftKeysL(R_CAM_SOFTKEYS_BLANK_EXIT); |
|
773 } |
|
774 } |
|
775 } |
|
776 else |
|
777 { |
|
778 if ( iEmbedded ) |
|
779 { |
|
780 if ( operation == ECamCapturing || operation == ECamCompleting ) |
|
781 { |
|
782 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
783 } |
|
784 else |
|
785 { |
|
786 if(appui->IsSecondCameraEnabled() && !appui->IsQwerty2ndCamera()) |
|
787 { |
|
788 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_BACK__CAPTURE_SECONDARY ); |
|
789 } |
|
790 else |
|
791 { |
|
792 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_BACK__CAPTURE ); |
|
793 } |
|
794 |
|
795 } |
|
796 } |
|
797 else |
|
798 { |
|
799 if ( operation != ECamCompleting |
|
800 && ( !appui->ShowPostCaptureView() |
|
801 || iController.IsViewFinding() ) ) |
|
802 { |
|
803 const TCamOrientation orientation = appui->CamOrientation(); |
|
804 if ( iController.IsTouchScreenSupported() |
|
805 && (ECamOrientationCamcorder == orientation |
|
806 || ECamOrientationCamcorderLeft == orientation) ) |
|
807 { |
|
808 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CAPTURE ); |
|
809 } |
|
810 else |
|
811 { |
|
812 if ( !appui->IsToolBarVisible() |
|
813 && appui->IsSecondCameraEnabled() |
|
814 && !iController.IsTouchScreenSupported() ) |
|
815 { |
|
816 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CAPTURE_TXT ); |
|
817 } |
|
818 else |
|
819 { |
|
820 appui->IsSecondCameraEnabled()?SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CAPTURE_SECONDARY ): |
|
821 SetSoftKeysL( R_CAM_SOFTKEYS_OPTIONS_EXIT__CAPTURE ); |
|
822 } |
|
823 } |
|
824 } |
|
825 else // operation == ECamCompleting |
|
826 { |
|
827 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
828 } |
|
829 |
|
830 } |
|
831 } |
|
832 } |
|
833 PRINT( _L("Camera <= CCamStillPreCaptureView::UpdateCbaL") ); |
|
834 } |
|
835 |
|
836 |
|
837 // --------------------------------------------------------------------------- |
|
838 // CCamStillPreCaptureView::SetTitlePaneTextL |
|
839 // Set the view's title text |
|
840 // --------------------------------------------------------------------------- |
|
841 // |
|
842 void CCamStillPreCaptureView::SetTitlePaneTextL() |
|
843 { |
|
844 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
|
845 #ifndef __WINS__ |
|
846 if ( iEmbedded /*&& !appUi->IsInCallSend()*/ ) |
|
847 { |
|
848 // only set the title if the construction is complete |
|
849 // otherwise the application is not yet set up correctly |
|
850 // as embedded |
|
851 if ( appUi->IsConstructionComplete() ) |
|
852 { |
|
853 // set title to name of embedding application |
|
854 appUi->SetTitleEmbeddedL(); |
|
855 } |
|
856 } |
|
857 else |
|
858 #endif |
|
859 { |
|
860 TInt titleResourceId = R_CAM_STILL_PRE_CAPTURE_TITLE_NAME; |
|
861 |
|
862 if ( iCaptureSetupModeActive || iSceneSettingModeActive || iInfoListBoxActive ) |
|
863 { |
|
864 titleResourceId = CCamCaptureSetupViewBase::SetupModeTitlePaneResourceId(); |
|
865 } |
|
866 |
|
867 appUi->SetTitleL( titleResourceId ); |
|
868 } |
|
869 } |
|
870 |
|
871 // --------------------------------------------------------------------------- |
|
872 // CCamStillPreCaptureView::StartViewFinder |
|
873 // Enter viewfinder mode |
|
874 // --------------------------------------------------------------------------- |
|
875 // |
|
876 void CCamStillPreCaptureView::StartViewFinder() |
|
877 { |
|
878 iController.EnterViewfinderMode( ECamControllerImage ); |
|
879 } |
|
880 |
|
881 // --------------------------------------------------------------------------- |
|
882 // CCamStillPreCaptureView::StopViewFinder |
|
883 // Exit viewfinder mode |
|
884 // --------------------------------------------------------------------------- |
|
885 // |
|
886 void CCamStillPreCaptureView::StopViewFinder() |
|
887 { |
|
888 iController.ExitViewfinderMode( ECamControllerImage ); |
|
889 } |
|
890 |
|
891 // --------------------------------------------------------------------------- |
|
892 // CCamStillPreCaptureView::CreateContainerL |
|
893 // Create container control |
|
894 // --------------------------------------------------------------------------- |
|
895 // |
|
896 void CCamStillPreCaptureView::CreateContainerL() |
|
897 { |
|
898 PRINT( _L("Camera => CCamStillPreCaptureView::CreateContainerL" ) ) |
|
899 |
|
900 TRect screen; |
|
901 AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screen ); |
|
902 |
|
903 iContainer = CCamStillPreCaptureContainer::NewL( |
|
904 iController, |
|
905 *this, |
|
906 screen ); |
|
907 iContainer->SetMopParent( this ); |
|
908 PRINT( _L("Camera <= CCamStillPreCaptureView::CreateContainerL" ) ) |
|
909 } |
|
910 |
|
911 // --------------------------------------------------------------------------- |
|
912 // CCamStillPreCaptureView::DynInitMenuPaneL |
|
913 // Changes MenuPane dynamically |
|
914 // --------------------------------------------------------------------------- |
|
915 // |
|
916 void CCamStillPreCaptureView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) |
|
917 { |
|
918 PRINT( _L("Camera => CamStillPreCaptureView::DynInitMenuPaneL")) |
|
919 |
|
920 if ( iContainer ) |
|
921 { |
|
922 iContainer->Window().SetNonFading( ETrue ); |
|
923 } |
|
924 |
|
925 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
|
926 __ASSERT_DEBUG(appUi, CamPanic(ECamPanicNullPointer)); |
|
927 TInt itemPos(0); |
|
928 if( aMenuPane->MenuItemExists(ECamCmdToggleCourtesyUI, itemPos) ) |
|
929 { |
|
930 if ( !appUi->AlwaysDrawPreCaptureCourtesyUI() ) |
|
931 { |
|
932 aMenuPane->SetItemTextL( ECamCmdToggleCourtesyUI, |
|
933 R_CAM_CAPTURE_DISPLAY_ON_TEXT); |
|
934 } |
|
935 } |
|
936 |
|
937 // if menu pane is default still capture menu |
|
938 if ( aResourceId == ROID(R_CAM_STILL_PRE_CAPTURE_MENU_ID)) |
|
939 { |
|
940 DynInitSwitchCameraMenuItemL( aMenuPane ); |
|
941 } |
|
942 // else if ( aResourceId == R_CAM_STANDBY_MENU && iStandbyError != KErrNone ) |
|
943 else if ( aResourceId == R_CAM_STANDBY_MENU ) |
|
944 { |
|
945 if( appUi->StandbyStatus() != KErrNone ) |
|
946 aMenuPane->SetItemDimmed( ECamCmdExitStandby, ETrue ); |
|
947 } |
|
948 |
|
949 else if( aResourceId == ROID(R_CAM_STILL_EMBEDDED_PRE_CAPTURE_MENU_ID)) |
|
950 { |
|
951 DynInitSwitchCameraMenuItemL( aMenuPane ); |
|
952 |
|
953 /*#ifndef __WINS__ |
|
954 // if embedded and not in in-call send |
|
955 if ( !appUi->IsInCallSend() ) |
|
956 #endif |
|
957 { |
|
958 aMenuPane->SetItemDimmed( ECamCmdNewVideo, ETrue ); |
|
959 }*/ |
|
960 aMenuPane->SetItemDimmed( ECamCmdNewVideo, ETrue ); |
|
961 } |
|
962 else // otherwise, not embedded, not in burst mode or menu pane is not default |
|
963 { |
|
964 CCamCaptureSetupViewBase::DynInitMenuPaneL( aResourceId, aMenuPane ); |
|
965 } |
|
966 PRINT( _L("Camera <= CamStillPreCaptureView::DynInitMenuPaneL")) |
|
967 } |
|
968 |
|
969 |
|
970 // --------------------------------------------------------------------------- |
|
971 // CCamPreCaptureViewBase::SwitchToSceneSettingModeL |
|
972 // Switches the current mode to scene setting and activates a |
|
973 // specific control. |
|
974 // --------------------------------------------------------------------------- |
|
975 // |
|
976 void CCamStillPreCaptureView::SwitchToSceneSettingModeL() |
|
977 { |
|
978 if ( !iSceneSettingContainer ) |
|
979 { |
|
980 iSceneSettingContainer = CCamShootingModeContainer::NewL( AppUi()->ApplicationRect(), |
|
981 *this, |
|
982 ECamControllerImage, |
|
983 iController ); |
|
984 iSceneSettingContainer->DrawableWindow()->SetOrdinalPosition(-1); |
|
985 } |
|
986 |
|
987 iSettingModeTitleResourceId = R_CAM_STILL_SCENE_SETTING_TITLE; |
|
988 |
|
989 if ( iEmbedded ) |
|
990 { |
|
991 iPreviousMenuResourceId = ROID(R_CAM_STILL_EMBEDDED_PRE_CAPTURE_MENUBAR_ID); |
|
992 } |
|
993 else |
|
994 { |
|
995 iPreviousMenuResourceId = ROID(R_CAM_STILL_PRE_CAPTURE_MENUBAR_ID); |
|
996 } |
|
997 // Remove the view's main container, and add the capture setup |
|
998 // control associated with the input command to the container stack. |
|
999 //CCamCaptureSetupViewBase::SwitchToSceneSettingModeL(); |
|
1000 |
|
1001 CCamPreCaptureViewBase::SwitchToSceneSettingModeL(); |
|
1002 |
|
1003 |
|
1004 // only remove the capture setup menu container after |
|
1005 // the switch completes successfully |
|
1006 RemoveCaptureSetupMenuContainers(); |
|
1007 |
|
1008 // Stop the viewfinder as it isn't required for scene settings |
|
1009 StopViewFinder(); |
|
1010 } |
|
1011 |
|
1012 |
|
1013 // --------------------------------------------------------------------------- |
|
1014 // CCamPreCaptureViewBase::SwitchToInfoListBoxL |
|
1015 // Switches the current mode to scene setting and activates a |
|
1016 // specific control. |
|
1017 // --------------------------------------------------------------------------- |
|
1018 // |
|
1019 void CCamStillPreCaptureView::SwitchToInfoListBoxL( TCamInfoListBoxMode aMode ) |
|
1020 { |
|
1021 CCamAppUi* appUi = static_cast<CCamAppUi*>( iCoeEnv->AppUi() ); |
|
1022 |
|
1023 TBool modeSelected = EFalse; |
|
1024 TInt listBoxResource; |
|
1025 TInt summaryResource; |
|
1026 TInt initialValue; |
|
1027 TInt titleResource; |
|
1028 |
|
1029 switch( aMode ) |
|
1030 { |
|
1031 case EInfoListBoxModeTimeLapse: |
|
1032 { |
|
1033 // Find out whether we are in burst mode |
|
1034 TBool burstmode = EFalse; |
|
1035 |
|
1036 // if capturing burst with 0 interval then this is normal sequence mode |
|
1037 if ( appUi->IsBurstEnabled() ) |
|
1038 { |
|
1039 burstmode = ETrue; |
|
1040 } |
|
1041 |
|
1042 // Time lapse / sequence mode selector initialization values |
|
1043 initialValue = CamTimeLapseUtility::IntervalToEnum( iController.TimeLapseInterval(), burstmode ); |
|
1044 listBoxResource = R_CAM_CAPTURE_SETUP_LIST_SEQUENCE_MODE; |
|
1045 summaryResource = R_CAM_CAPTURE_SETUP_LIST_SEQUENCE_MODE_SUMMARY; |
|
1046 titleResource = R_CAM_TIME_LAPSE_TITLE; |
|
1047 |
|
1048 modeSelected = ETrue; |
|
1049 } |
|
1050 break; |
|
1051 |
|
1052 case EInfoListBoxModeISO: |
|
1053 { |
|
1054 // Light sensitivity selector initialization values |
|
1055 initialValue = iController.IntegerSettingValue( ECamSettingItemDynamicPhotoLightSensitivity ); |
|
1056 if ( iController.UiConfigManagerPtr()->IsExtendedLightSensitivitySupported() ) |
|
1057 { |
|
1058 listBoxResource = R_CAM_CAPTURE_SETUP_LIST_EXTENDED_LIGHT_SENSITIVITY; |
|
1059 summaryResource = R_CAM_CAPTURE_SETUP_LIST_EXTENDED_LIGHT_SENSITIVITY_SUMMARY; |
|
1060 } |
|
1061 else |
|
1062 { |
|
1063 listBoxResource = R_CAM_CAPTURE_SETUP_LIST_LIGHT_SENSITIVITY; |
|
1064 summaryResource = R_CAM_CAPTURE_SETUP_LIST_LIGHT_SENSITIVITY_SUMMARY; |
|
1065 } |
|
1066 titleResource = R_CAM_LIGHT_SENSITIVITY_TITLE; |
|
1067 modeSelected = ETrue; |
|
1068 } |
|
1069 break; |
|
1070 |
|
1071 default: |
|
1072 break; |
|
1073 } |
|
1074 |
|
1075 if( modeSelected ) |
|
1076 { |
|
1077 iInfoListBoxContainer = CCamInfoListBoxContainer::NewL( AppUi()->ApplicationRect(), |
|
1078 *this, |
|
1079 iController, |
|
1080 listBoxResource, |
|
1081 summaryResource, |
|
1082 initialValue, titleResource ); |
|
1083 iInfoListBoxContainer->DrawableWindow()->SetOrdinalPosition(-1); |
|
1084 iInfoListBoxMode = aMode; |
|
1085 iSettingModeTitleResourceId = titleResource; |
|
1086 |
|
1087 if ( iEmbedded ) |
|
1088 { |
|
1089 iPreviousMenuResourceId = ROID(R_CAM_STILL_EMBEDDED_PRE_CAPTURE_MENUBAR_ID); |
|
1090 } |
|
1091 else |
|
1092 { |
|
1093 iPreviousMenuResourceId = ROID(R_CAM_STILL_PRE_CAPTURE_MENUBAR_ID); |
|
1094 } |
|
1095 // Remove the view's main container, and add the capture setup |
|
1096 // control associated with the input command to the container stack. |
|
1097 CCamCaptureSetupViewBase::SwitchToInfoListBoxL( aMode ); |
|
1098 |
|
1099 // only remove the capture setup menu container after |
|
1100 // the switch completes successfully |
|
1101 RemoveCaptureSetupMenuContainers(); |
|
1102 |
|
1103 // Stop the viewfinder |
|
1104 StopViewFinder(); |
|
1105 } |
|
1106 } |
|
1107 |
|
1108 |
|
1109 // --------------------------------------------------------------------------- |
|
1110 // CCamStillPreCaptureView::DoActivateL |
|
1111 // Activate this view |
|
1112 // --------------------------------------------------------------------------- |
|
1113 // |
|
1114 void CCamStillPreCaptureView::DoActivateL( const TVwsViewId& aPrevViewId, |
|
1115 TUid aCustomMessageId, |
|
1116 const TDesC8& aCustomMessage ) |
|
1117 { |
|
1118 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMSTILLPRECAPTUREVIEW_DOACTIVATEL, "e_CCamStillPreCaptureView_DoActivateL 1" ); |
|
1119 PRINT( _L("Camera => CCamStillPreCaptureView::DoActivateL") ); |
|
1120 PERF_EVENT_START_L2( EPerfEventStillPreCaptureViewActivation ); |
|
1121 // Ensure the correct menu is used for the current mode. |
|
1122 |
|
1123 // If we are coming back from settings plugin wait for the sequence to complete |
|
1124 // during that time, update the softkey with BLANK_EXIT softkey |
|
1125 if ( TUid::Uid ( EAknSoftkeyBack ) == aCustomMessageId ) |
|
1126 { |
|
1127 iSoftkeyBlankIsNeeded = ETrue; |
|
1128 } |
|
1129 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
|
1130 |
|
1131 // fixed toolbar is used only with touch devices |
|
1132 if ( iController.IsTouchScreenSupported() ) |
|
1133 { |
|
1134 if ( appUi && appUi->IsEmbedded() ) |
|
1135 { |
|
1136 CAknToolbar* toolbar = Toolbar(); |
|
1137 toolbar->SetToolbarVisibility(EFalse); |
|
1138 } |
|
1139 |
|
1140 UpdateToolbarIconsL(); |
|
1141 } |
|
1142 else |
|
1143 { |
|
1144 // handled in CamPreCaptureViewBase |
|
1145 } |
|
1146 if ( appUi ) |
|
1147 { |
|
1148 // inform appui of current capture mode |
|
1149 TCamImageCaptureMode mode = appUi->CurrentBurstMode(); |
|
1150 |
|
1151 if ( ECamImageCaptureNone != mode ) |
|
1152 { |
|
1153 appUi->SetCaptureMode( ECamControllerImage, mode ); |
|
1154 } |
|
1155 else |
|
1156 { |
|
1157 appUi->SetCaptureMode( ECamControllerImage, ECamImageCaptureSingle ); |
|
1158 } |
|
1159 } |
|
1160 |
|
1161 |
|
1162 CCamPreCaptureViewBase::DoActivateL( aPrevViewId, |
|
1163 aCustomMessageId, |
|
1164 aCustomMessage ); |
|
1165 |
|
1166 |
|
1167 SetMenuBar(); |
|
1168 |
|
1169 |
|
1170 PERF_EVENT_END_L2( EPerfEventStillPreCaptureViewActivation ); |
|
1171 PRINT( _L("Camera <= CCamStillPreCaptureView::DoActivateL") ); |
|
1172 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMSTILLPRECAPTUREVIEW_DOACTIVATEL, "e_CCamStillPreCaptureView_DoActivateL 0" ); |
|
1173 } |
|
1174 |
|
1175 |
|
1176 // --------------------------------------------------------------------------- |
|
1177 // CCamStillPreCaptureView::GetHelpContext |
|
1178 // Called to identify the help context for this view |
|
1179 // --------------------------------------------------------------------------- |
|
1180 // |
|
1181 void CCamStillPreCaptureView::GetHelpContext( TCoeHelpContext& aContext ) const |
|
1182 { |
|
1183 aContext.iMajor = TUid::Uid( KCameraappUID ); |
|
1184 |
|
1185 // First check to see if the scene settings list is open |
|
1186 if ( iSceneSettingModeActive ) |
|
1187 { |
|
1188 aContext.iContext = KLCAM_HLP_SCENES_PHOTO; |
|
1189 } |
|
1190 else if( iInfoListBoxActive && EInfoListBoxModeTimeLapse == iInfoListBoxMode ) |
|
1191 { |
|
1192 |
|
1193 // aContext.iContext = KLCAM_HLP_SCENES_PHOTO; |
|
1194 aContext.iContext = KLCAM_HLP_ADVANCED_SEQUENCE; |
|
1195 } |
|
1196 else if( iInfoListBoxActive && EInfoListBoxModeISO == iInfoListBoxMode ) |
|
1197 { |
|
1198 |
|
1199 // aContext.iContext = KLCAM_HLP_SCENES_PHOTO; |
|
1200 aContext.iContext = KLCAM_HLP_LIGHT_SENSITIVITY; |
|
1201 } |
|
1202 // Else check for standby mode |
|
1203 else if ( iStandbyModeActive ) |
|
1204 { |
|
1205 // Also check to see if this is embedded standby |
|
1206 if ( iEmbedded ) |
|
1207 { |
|
1208 aContext.iContext = KLCAM_HLP_STANDYBY_EM; |
|
1209 } |
|
1210 else |
|
1211 { |
|
1212 aContext.iContext = KLCAM_HLP_STANDYBY_EM; |
|
1213 } |
|
1214 } |
|
1215 // Else check for embedded mode |
|
1216 else if ( iEmbedded ) |
|
1217 { |
|
1218 aContext.iContext = KLCAM_HLP_VIEWFINDER_PHOTO_EM; |
|
1219 } |
|
1220 // Else this is the plain photo viewfinder |
|
1221 else |
|
1222 { |
|
1223 aContext.iContext = KLCAM_HLP_VIEWFINDER_PHOTO; |
|
1224 } |
|
1225 } |
|
1226 |
|
1227 // --------------------------------------------------------------------------- |
|
1228 // CCamStillPreCaptureView::DynInitToolbarL |
|
1229 // Dynamically initialize toolbar contents |
|
1230 // --------------------------------------------------------------------------- |
|
1231 // |
|
1232 void CCamStillPreCaptureView::DynInitToolbarL( TInt aResourceId, |
|
1233 CAknToolbar* aToolbar ) |
|
1234 { |
|
1235 PRINT2( _L("Camera => CCamStillPreCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar ); |
|
1236 (void)aResourceId; // remove compiler warning |
|
1237 |
|
1238 CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() ); |
|
1239 iController.StartIdleTimer(); |
|
1240 |
|
1241 // fixed toolbar is used only with touch devices |
|
1242 if ( iController.IsTouchScreenSupported() ) |
|
1243 { |
|
1244 UpdateToolbarIconsL(); |
|
1245 if( aToolbar ) |
|
1246 { |
|
1247 if ( iEmbedded && appUi->IsSecondCameraEnabled() ) |
|
1248 { |
|
1249 aToolbar->SetItemDimmed(ECamCmdNewVideo, ETrue, ETrue); |
|
1250 } |
|
1251 CAknToolbarExtension* extension = aToolbar->ToolbarExtension(); |
|
1252 |
|
1253 if( extension ) |
|
1254 { |
|
1255 |
|
1256 if ( iEmbedded ) |
|
1257 { |
|
1258 extension->HideItemL( ECamCmdNewVideo, ETrue ); |
|
1259 extension->HideItemL( ECamCmdTimeLapseSlider, ETrue ); |
|
1260 extension->HideItemL( ECamCmdPhotos, ETrue ); |
|
1261 } |
|
1262 else |
|
1263 { |
|
1264 extension->HideItemL( ECamCmdNewVideo, EFalse ); |
|
1265 extension->HideItemL( ECamCmdToggleFacetracking, EFalse ); |
|
1266 extension->HideItemL( ECamCmdPhotos, EFalse ); |
|
1267 } |
|
1268 if(aResourceId == ECamCmdToolbarExtension) |
|
1269 { |
|
1270 appUi->ZoomPane()->MakeVisible(EFalse,ETrue); |
|
1271 } |
|
1272 } |
|
1273 } |
|
1274 } |
|
1275 |
|
1276 PRINT2( _L("Camera <= CCamStillPreCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar ); |
|
1277 } |
|
1278 |
|
1279 // --------------------------------------------------------------------------- |
|
1280 // CCamStillPreCaptureView::UpdateToolbarIconsL |
|
1281 // Update fixed toolbar icons according to current settings |
|
1282 // --------------------------------------------------------------------------- |
|
1283 // |
|
1284 void CCamStillPreCaptureView::UpdateToolbarIconsL() |
|
1285 { |
|
1286 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, CCAMSTILLPRECAPTUREVIEW_UPDATETOOLBARICONSL, "e_CCamStillPreCaptureView_UpdateToolbarIconsL 1" ); |
|
1287 // fixed toolbar is used only with touch devices |
|
1288 if(!iController.IsTouchScreenSupported()) |
|
1289 return; |
|
1290 UpdateFlashIconsL(); |
|
1291 UpdateLightSensitivityIconsL(); |
|
1292 UpdateColorToneIconsL(); |
|
1293 UpdateWhiteBalanceIconsL(); |
|
1294 UpdateSharpnessIconsL(); |
|
1295 UpdateExposureIconsL(); |
|
1296 UpdateContrastIconsL(); |
|
1297 UpdateSceneModeIconsL(); |
|
1298 UpdateSelfTimerIconsL(); |
|
1299 UpdateVFGridIconsL(); |
|
1300 UpdateBurstModeIconsL(); |
|
1301 UpdateFaceTracKingIconsL(); |
|
1302 RedrawToolBar(); |
|
1303 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMSTILLPRECAPTUREVIEW_UPDATETOOLBARICONSL, "e_CCamStillPreCaptureView_UpdateToolbarIconsL 0" ); |
|
1304 } |
|
1305 |
|
1306 // --------------------------------------------------------------------------- |
|
1307 // CCamStillPreCaptureView::UpdateFlashIconsL |
|
1308 // --------------------------------------------------------------------------- |
|
1309 // |
|
1310 void CCamStillPreCaptureView::UpdateFlashIconsL() |
|
1311 { |
|
1312 CAknButton* button = ToolbarButtonById(ECamCmdCaptureSetupFlashStill); |
|
1313 if(!button) |
|
1314 return; |
|
1315 TCamFlashId flash = static_cast< TCamFlashId > |
|
1316 ( iController.IntegerSettingValue( ECamSettingItemDynamicPhotoFlash ) ); |
|
1317 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1318 TFileName iconFileName; |
|
1319 CamUtility::ResourceFileName( iconFileName ); |
|
1320 switch(flash) |
|
1321 { |
|
1322 case ECamFlashAuto: |
|
1323 { |
|
1324 SetIconL( |
|
1325 button, |
|
1326 iconFileName, |
|
1327 EMbmCameraappQgn_indi_cam4_autoflash, |
|
1328 EMbmCameraappQgn_indi_cam4_autoflash_mask, |
|
1329 skinInstance, |
|
1330 KAknsIIDQgnIndiCam4Autoflash ); |
|
1331 |
|
1332 break; |
|
1333 } |
|
1334 case ECamFlashOff: |
|
1335 { |
|
1336 SetIconL( |
|
1337 button, |
|
1338 iconFileName, |
|
1339 EMbmCameraappQgn_indi_cam4_flash_off, |
|
1340 EMbmCameraappQgn_indi_cam4_flash_off_mask, |
|
1341 skinInstance, |
|
1342 KAknsIIDQgnIndiCam4FlashOff ); |
|
1343 break; |
|
1344 } |
|
1345 case ECamFlashAntiRedEye: |
|
1346 { |
|
1347 SetIconL( |
|
1348 button, |
|
1349 iconFileName, |
|
1350 EMbmCameraappQgn_indi_cam4_antired, |
|
1351 EMbmCameraappQgn_indi_cam4_antired_mask, |
|
1352 skinInstance, |
|
1353 KAknsIIDQgnIndiCam4Antired ); |
|
1354 break; |
|
1355 } |
|
1356 case ECamFlashForced: |
|
1357 { |
|
1358 SetIconL( |
|
1359 button, |
|
1360 iconFileName, |
|
1361 EMbmCameraappQgn_indi_cam4_flash_on, |
|
1362 EMbmCameraappQgn_indi_cam4_flash_on_mask, |
|
1363 skinInstance, |
|
1364 KAknsIIDQgnIndiCam4FlashOn ); |
|
1365 break; |
|
1366 } |
|
1367 default: |
|
1368 break; |
|
1369 } |
|
1370 } |
|
1371 |
|
1372 // --------------------------------------------------------------------------- |
|
1373 // CCamStillPreCaptureView::UpdateContrastIconsL |
|
1374 // --------------------------------------------------------------------------- |
|
1375 // |
|
1376 void CCamStillPreCaptureView::UpdateContrastIconsL() |
|
1377 { |
|
1378 CAknButton* button = ToolbarButtonById(ECamCmdCaptureSetupContrastStill); |
|
1379 if ( button ) |
|
1380 { |
|
1381 if ( !iController.UiConfigManagerPtr()->IsContrastSupported() ) |
|
1382 { |
|
1383 HideButton(ECamCmdCaptureSetupContrastStill); |
|
1384 return; |
|
1385 } |
|
1386 TInt contrast = iController.IntegerSettingValue( ECamSettingItemDynamicPhotoContrast ); |
|
1387 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1388 TFileName iconFileName; |
|
1389 CamUtility::ResourceFileName( iconFileName ); |
|
1390 if (contrast > 0) |
|
1391 { |
|
1392 SetIconL( |
|
1393 button, |
|
1394 iconFileName, |
|
1395 EMbmCameraappQgn_indi_cam4_contrast_plus, |
|
1396 EMbmCameraappQgn_indi_cam4_contrast_plus_mask, |
|
1397 skinInstance, |
|
1398 KAknsIIDQgnIndiCam4ContrastPlus ); |
|
1399 } |
|
1400 else if (contrast < 0) |
|
1401 { |
|
1402 SetIconL( |
|
1403 button, |
|
1404 iconFileName, |
|
1405 EMbmCameraappQgn_indi_cam4_contrast_minus, |
|
1406 EMbmCameraappQgn_indi_cam4_contrast_minus_mask, |
|
1407 skinInstance, |
|
1408 KAknsIIDQgnIndiCam4ContrastMinus ); |
|
1409 } |
|
1410 else |
|
1411 { |
|
1412 SetIconL( |
|
1413 button, |
|
1414 iconFileName, |
|
1415 EMbmCameraappQgn_indi_cam4_contrast, |
|
1416 EMbmCameraappQgn_indi_cam4_contrast_mask, |
|
1417 skinInstance, |
|
1418 KAknsIIDQgnIndiCam4Contrast ); |
|
1419 } |
|
1420 } |
|
1421 } |
|
1422 |
|
1423 |
|
1424 // --------------------------------------------------------------------------- |
|
1425 // CCamStillPreCaptureView::UpdateExposureIconsL |
|
1426 // --------------------------------------------------------------------------- |
|
1427 // |
|
1428 void CCamStillPreCaptureView::UpdateExposureIconsL() |
|
1429 { |
|
1430 CAknButton* button = ToolbarButtonById( ECamCmdCaptureSetupExposureStill ); |
|
1431 if ( button ) |
|
1432 { |
|
1433 if ( !iController.UiConfigManagerPtr()->IsEVSupported() ) |
|
1434 { |
|
1435 HideButton(ECamCmdCaptureSetupExposureStill); |
|
1436 return; |
|
1437 } |
|
1438 TInt exposure = iController.IntegerSettingValue( ECamSettingItemDynamicPhotoExposure ); |
|
1439 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1440 TFileName iconFileName; |
|
1441 CamUtility::ResourceFileName( iconFileName ); |
|
1442 if (exposure > 0) |
|
1443 { |
|
1444 SetIconL( |
|
1445 button, |
|
1446 iconFileName, |
|
1447 EMbmCameraappQgn_indi_cam4_exposure_plus, |
|
1448 EMbmCameraappQgn_indi_cam4_exposure_plus_mask, |
|
1449 skinInstance, |
|
1450 KAknsIIDQgnIndiCam4ExposurePlus ); |
|
1451 } |
|
1452 else if (exposure < 0) |
|
1453 { |
|
1454 SetIconL( |
|
1455 button, |
|
1456 iconFileName, |
|
1457 EMbmCameraappQgn_indi_cam4_exposure_minus, |
|
1458 EMbmCameraappQgn_indi_cam4_exposure_minus_mask, |
|
1459 skinInstance, |
|
1460 KAknsIIDQgnIndiCam4ExposureMinus ); |
|
1461 } |
|
1462 else |
|
1463 { |
|
1464 SetIconL( |
|
1465 button, |
|
1466 iconFileName, |
|
1467 EMbmCameraappQgn_indi_cam4_exposure, |
|
1468 EMbmCameraappQgn_indi_cam4_exposure_mask, |
|
1469 skinInstance, |
|
1470 KAknsIIDQgnIndiCam4Exposure ); |
|
1471 } |
|
1472 } |
|
1473 } |
|
1474 |
|
1475 |
|
1476 // --------------------------------------------------------------------------- |
|
1477 // CCamStillPreCaptureView::UpdateSharpnessIconsL |
|
1478 // --------------------------------------------------------------------------- |
|
1479 // |
|
1480 void CCamStillPreCaptureView::UpdateSharpnessIconsL() |
|
1481 { |
|
1482 CAknButton* button = ToolbarButtonById(ECamCmdCaptureSetupImageSharpnessStill); |
|
1483 if ( button ) |
|
1484 { |
|
1485 if ( !iController.UiConfigManagerPtr()->IsSharpnessFeatureSupported() ) |
|
1486 { |
|
1487 HideButton(ECamCmdCaptureSetupImageSharpnessStill); |
|
1488 return; |
|
1489 } |
|
1490 TCamImageSharpnessId sharpness = |
|
1491 static_cast< TCamImageSharpnessId > |
|
1492 ( iController.IntegerSettingValue( |
|
1493 ECamSettingItemDynamicPhotoImageSharpness ) ); |
|
1494 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1495 TFileName iconFileName; |
|
1496 CamUtility::ResourceFileName( iconFileName ); |
|
1497 static_cast< TCamImageSharpnessId > |
|
1498 ( iController.IntegerSettingValue( |
|
1499 ECamSettingItemDynamicPhotoImageSharpness ) ); |
|
1500 |
|
1501 switch ( sharpness ) |
|
1502 { |
|
1503 case ECamImageSharpnessHard: |
|
1504 { |
|
1505 SetIconL( |
|
1506 button, |
|
1507 iconFileName, |
|
1508 EMbmCameraappQgn_indi_cam4_sharpness_hard, |
|
1509 EMbmCameraappQgn_indi_cam4_sharpness_hard_mask, |
|
1510 skinInstance, |
|
1511 KAknsIIDQgnIndiCam4SharpnessHard ); |
|
1512 break; |
|
1513 } |
|
1514 case ECamImageSharpnessNorm: |
|
1515 { |
|
1516 SetIconL( |
|
1517 button, |
|
1518 iconFileName, |
|
1519 EMbmCameraappQgn_indi_cam4_sharpness_normal, |
|
1520 EMbmCameraappQgn_indi_cam4_sharpness_normal_mask, |
|
1521 skinInstance, |
|
1522 KAknsIIDQgnIndiCam4SharpnessNormal ); |
|
1523 break; |
|
1524 } |
|
1525 case ECamImageSharpnessSoft: |
|
1526 { |
|
1527 SetIconL( |
|
1528 button, |
|
1529 iconFileName, |
|
1530 EMbmCameraappQgn_indi_cam4_sharpness_soft, |
|
1531 EMbmCameraappQgn_indi_cam4_sharpness_soft_mask, |
|
1532 skinInstance, |
|
1533 KAknsIIDQgnIndiCam4SharpnessSoft ); |
|
1534 break; |
|
1535 } |
|
1536 default: |
|
1537 { |
|
1538 break; |
|
1539 } |
|
1540 } |
|
1541 } |
|
1542 |
|
1543 } |
|
1544 |
|
1545 |
|
1546 // --------------------------------------------------------------------------- |
|
1547 // CCamStillPreCaptureView::UpdateWhiteBalanceIconsL |
|
1548 // --------------------------------------------------------------------------- |
|
1549 // |
|
1550 void CCamStillPreCaptureView::UpdateWhiteBalanceIconsL() |
|
1551 { |
|
1552 CAknButton* button = ToolbarButtonById( ECamCmdCaptureSetupWhiteBalanceStill ); |
|
1553 if ( button ) |
|
1554 { |
|
1555 if ( !iController.UiConfigManagerPtr()->IsWhiteBalanceFeatureSupported() ) |
|
1556 { |
|
1557 HideButton(ECamCmdCaptureSetupWhiteBalanceStill); |
|
1558 return; |
|
1559 } |
|
1560 TCamWhiteBalanceId wb = static_cast< TCamWhiteBalanceId > |
|
1561 ( iController.IntegerSettingValue( ECamSettingItemDynamicPhotoWhiteBalance ) ); |
|
1562 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1563 TFileName iconFileName; |
|
1564 CamUtility::ResourceFileName( iconFileName ); |
|
1565 switch ( wb ) |
|
1566 { |
|
1567 case ECamWhiteBalanceAWB: |
|
1568 { |
|
1569 SetIconL( |
|
1570 button, |
|
1571 iconFileName, |
|
1572 EMbmCameraappQgn_indi_cam4_wb_auto, |
|
1573 EMbmCameraappQgn_indi_cam4_wb_auto_mask, |
|
1574 skinInstance, |
|
1575 KAknsIIDQgnIndiCam4WbAuto ); |
|
1576 break; |
|
1577 } |
|
1578 case ECamWhiteBalanceDaylight: |
|
1579 { |
|
1580 SetIconL( |
|
1581 button, |
|
1582 iconFileName, |
|
1583 EMbmCameraappQgn_indi_cam4_wb_sunny, |
|
1584 EMbmCameraappQgn_indi_cam4_wb_sunny_mask, |
|
1585 skinInstance, |
|
1586 KAknsIIDQgnIndiCam4WbSunny ); |
|
1587 break; |
|
1588 } |
|
1589 case ECamWhiteBalanceCloudy: |
|
1590 { |
|
1591 SetIconL( |
|
1592 button, |
|
1593 iconFileName, |
|
1594 EMbmCameraappQgn_indi_cam4_wb_cloudy, |
|
1595 EMbmCameraappQgn_indi_cam4_wb_cloudy_mask, |
|
1596 skinInstance, |
|
1597 KAknsIIDQgnIndiCam4WbCloudy ); |
|
1598 break; |
|
1599 } |
|
1600 case ECamWhiteBalanceTungsten: |
|
1601 { |
|
1602 SetIconL( |
|
1603 button, |
|
1604 iconFileName, |
|
1605 EMbmCameraappQgn_indi_cam4_wb_tungsten, |
|
1606 EMbmCameraappQgn_indi_cam4_wb_tungsten_mask, |
|
1607 skinInstance, |
|
1608 KAknsIIDQgnIndiCam4WbTungsten ); |
|
1609 break; |
|
1610 } |
|
1611 case ECamWhiteBalanceFlourescent: |
|
1612 { |
|
1613 SetIconL( |
|
1614 button, |
|
1615 iconFileName, |
|
1616 EMbmCameraappQgn_indi_cam4_wb_fluorecent, |
|
1617 EMbmCameraappQgn_indi_cam4_wb_fluorecent_mask, |
|
1618 skinInstance, |
|
1619 KAknsIIDQgnIndiCam4WbFluorecent ); |
|
1620 break; |
|
1621 } |
|
1622 default: |
|
1623 break; |
|
1624 } |
|
1625 } |
|
1626 |
|
1627 } |
|
1628 |
|
1629 |
|
1630 // --------------------------------------------------------------------------- |
|
1631 // CCamStillPreCaptureView::UpdateColorToneIconsL |
|
1632 // --------------------------------------------------------------------------- |
|
1633 // |
|
1634 void CCamStillPreCaptureView::UpdateColorToneIconsL() |
|
1635 { |
|
1636 CAknButton* button = ToolbarButtonById( ECamCmdCaptureSetupColourFilterStill ); |
|
1637 if ( button ) |
|
1638 { |
|
1639 if ( !iController.UiConfigManagerPtr()->IsColorToneFeatureSupported() ) |
|
1640 { |
|
1641 HideButton(ECamCmdCaptureSetupColourFilterStill); |
|
1642 return; |
|
1643 } |
|
1644 TCamColourFilterId color = static_cast< TCamColourFilterId > |
|
1645 ( iController.IntegerSettingValue( ECamSettingItemDynamicPhotoColourFilter ) ); |
|
1646 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1647 TFileName iconFileName; |
|
1648 CamUtility::ResourceFileName( iconFileName ); |
|
1649 switch ( color ) |
|
1650 { |
|
1651 case ECamColourFilterColour: |
|
1652 { |
|
1653 SetIconL( |
|
1654 button, |
|
1655 iconFileName, |
|
1656 EMbmCameraappQgn_indi_cam4_colour_normal, |
|
1657 EMbmCameraappQgn_indi_cam4_colour_normal_mask, |
|
1658 skinInstance, |
|
1659 KAknsIIDQgnIndiCam4ColourNormal ); |
|
1660 break; |
|
1661 } |
|
1662 case ECamColourFilterBlackAndWhite: |
|
1663 { |
|
1664 SetIconL( |
|
1665 button, |
|
1666 iconFileName, |
|
1667 EMbmCameraappQgn_indi_cam4_colour_bw, |
|
1668 EMbmCameraappQgn_indi_cam4_colour_bw_mask, |
|
1669 skinInstance, |
|
1670 KAknsIIDQgnIndiCam4ColourBw ); |
|
1671 break; |
|
1672 } |
|
1673 case ECamColourFilterSepia: |
|
1674 { |
|
1675 SetIconL( |
|
1676 button, |
|
1677 iconFileName, |
|
1678 EMbmCameraappQgn_indi_cam4_colour_sepia, |
|
1679 EMbmCameraappQgn_indi_cam4_colour_sepia_mask, |
|
1680 skinInstance, |
|
1681 KAknsIIDQgnIndiCam4ColourSepia ); |
|
1682 break; |
|
1683 } |
|
1684 case ECamColourFilterNegative: |
|
1685 { |
|
1686 SetIconL( |
|
1687 button, |
|
1688 iconFileName, |
|
1689 EMbmCameraappQgn_indi_cam4_colour_negative, |
|
1690 EMbmCameraappQgn_indi_cam4_colour_negative_mask, |
|
1691 skinInstance, |
|
1692 KAknsIIDQgnIndiCam4ColourNegative ); |
|
1693 break; |
|
1694 } |
|
1695 case ECamColourFilterVivid: |
|
1696 { |
|
1697 SetIconL( |
|
1698 button, |
|
1699 iconFileName, |
|
1700 EMbmCameraappQgn_indi_cam4_colour_vivid, |
|
1701 EMbmCameraappQgn_indi_cam4_colour_vivid_mask, |
|
1702 skinInstance, |
|
1703 KAknsIIDQgnIndiCam4ColourVivid ); |
|
1704 break; |
|
1705 } |
|
1706 default: |
|
1707 break; |
|
1708 } |
|
1709 } |
|
1710 } |
|
1711 |
|
1712 // --------------------------------------------------------------------------- |
|
1713 // CCamStillPreCaptureView::UpdateLightSensitivityIconsL |
|
1714 // --------------------------------------------------------------------------- |
|
1715 // |
|
1716 void CCamStillPreCaptureView::UpdateLightSensitivityIconsL() |
|
1717 { |
|
1718 CAknButton* button = ToolbarButtonById( ECamCmdCaptureSetupLightSensitivityStill ); |
|
1719 if ( button ) |
|
1720 { |
|
1721 if (!iController.UiConfigManagerPtr()->IsISOSupported()) |
|
1722 { |
|
1723 HideButton(ECamCmdCaptureSetupLightSensitivityStill); |
|
1724 return; |
|
1725 } |
|
1726 TCamLightSensitivityId iso = static_cast< TCamLightSensitivityId > |
|
1727 ( iController.IntegerSettingValue( ECamSettingItemDynamicPhotoLightSensitivity ) ); |
|
1728 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1729 TFileName iconFileName; |
|
1730 CamUtility::ResourceFileName( iconFileName ); |
|
1731 switch ( iso ) |
|
1732 { |
|
1733 case ECamLightSensitivityAuto: |
|
1734 { |
|
1735 SetIconL( |
|
1736 button, |
|
1737 iconFileName, |
|
1738 EMbmCameraappQgn_indi_cam4_iso_auto, |
|
1739 EMbmCameraappQgn_indi_cam4_iso_auto_mask, |
|
1740 skinInstance, |
|
1741 KAknsIIDQgnIndiCam4IsoAuto ); |
|
1742 break; |
|
1743 } |
|
1744 case ECamLightSensitivityLow: |
|
1745 //case ECamLightSensitivityLowMed: |
|
1746 { |
|
1747 SetIconL( |
|
1748 button, |
|
1749 iconFileName, |
|
1750 EMbmCameraappQgn_indi_cam4_iso_low, |
|
1751 EMbmCameraappQgn_indi_cam4_iso_low_mask, |
|
1752 skinInstance, |
|
1753 KAknsIIDQgnIndiCam4IsoLow ); |
|
1754 break; |
|
1755 } |
|
1756 case ECamLightSensitivityMed: |
|
1757 //case ECamLightSensitivityMedHigh: |
|
1758 { |
|
1759 SetIconL( |
|
1760 button, |
|
1761 iconFileName, |
|
1762 EMbmCameraappQgn_indi_cam4_iso_medium, |
|
1763 EMbmCameraappQgn_indi_cam4_iso_medium_mask, |
|
1764 skinInstance, |
|
1765 KAknsIIDQgnIndiCam4IsoMedium ); |
|
1766 break; |
|
1767 } |
|
1768 case ECamLightSensitivityHigh: |
|
1769 { |
|
1770 SetIconL( |
|
1771 button, |
|
1772 iconFileName, |
|
1773 EMbmCameraappQgn_indi_cam4_iso_high, |
|
1774 EMbmCameraappQgn_indi_cam4_iso_high_mask, |
|
1775 skinInstance, |
|
1776 KAknsIIDQgnIndiCam4IsoHigh ); |
|
1777 break; |
|
1778 } |
|
1779 default: |
|
1780 break; |
|
1781 } |
|
1782 } |
|
1783 |
|
1784 } |
|
1785 |
|
1786 // --------------------------------------------------------------------------- |
|
1787 // CCamStillPreCaptureView::StartMskCapture() |
|
1788 // Try to start the capture with MSK command. Return true if started. |
|
1789 // --------------------------------------------------------------------------- |
|
1790 // |
|
1791 TBool CCamStillPreCaptureView::StartMskCaptureL() |
|
1792 { |
|
1793 PRINT( _L("Camera => CCamStillPreCaptureView::StartMskCapture") ); |
|
1794 CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() ); |
|
1795 TCamOrientation orientation = appUi->CamOrientation(); |
|
1796 TBool startedCapture(EFalse); |
|
1797 if( orientation == ECamOrientationCamcorder || |
|
1798 orientation == ECamOrientationCamcorderLeft || |
|
1799 orientation == ECamOrientationPortrait ) |
|
1800 { |
|
1801 // In case of MSK if no AP on screen, it should work as capture |
|
1802 // If optical joystic is not available, we will start the |
|
1803 // capturing with auto-focusing here. Otherwise it is handled |
|
1804 // in CCamStillPreCaptureContainer |
|
1805 if ( appUi && !appUi->IsToolBarVisible() |
|
1806 && iController.UiConfigManagerPtr() |
|
1807 && !iController.UiConfigManagerPtr()->IsOpticalJoyStickSupported() ) |
|
1808 { |
|
1809 if ( iController.IsViewFinding() && appUi->CheckMemoryL() && |
|
1810 !iController.CaptureModeTransitionInProgress() ) |
|
1811 { |
|
1812 SetSoftKeysL( R_CAM_SOFTKEYS_BLANK ); |
|
1813 |
|
1814 // fixed toolbar is used only with touch devices |
|
1815 if ( iController.IsTouchScreenSupported() ) |
|
1816 { |
|
1817 CAknToolbar* fixedToolbar = Toolbar(); |
|
1818 if ( fixedToolbar ) |
|
1819 { |
|
1820 fixedToolbar->SetToolbarVisibility( EFalse ); |
|
1821 } |
|
1822 } |
|
1823 // Start the autofocus operation now, the capture will be queued |
|
1824 // after focus completes |
|
1825 if ( !appUi->SelfTimerEnabled() ) |
|
1826 { |
|
1827 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMSTILLPRECAPTUREVIEW_STARTMSKCAPTUREL, "e_CAM_APP_AF 1" ); |
|
1828 iController.StartAutoFocus(); |
|
1829 } |
|
1830 |
|
1831 TKeyEvent keyEvent; |
|
1832 appUi->StartCaptureL( keyEvent ); |
|
1833 startedCapture = ETrue; |
|
1834 } |
|
1835 } |
|
1836 // else let the calling function take care of capturing |
|
1837 } |
|
1838 PRINT( _L("Camera <= CCamStillPreCaptureView::StartMskCapture") ); |
|
1839 return startedCapture; |
|
1840 } |
|
1841 |
|
1842 // --------------------------------------------------------------------------- |
|
1843 // CCamStillPreCaptureView::UpdateSelfTimerIconsL |
|
1844 // --------------------------------------------------------------------------- |
|
1845 // |
|
1846 void CCamStillPreCaptureView::UpdateSelfTimerIconsL() |
|
1847 { |
|
1848 CAknButton* button = ToolbarButtonById( ECamCmdCaptureSetupSelfTimer ); |
|
1849 if ( button ) |
|
1850 { |
|
1851 TCamSelfTimerId selftimer = static_cast< TCamSelfTimerId > |
|
1852 ( iController.IntegerSettingValue( ECamSettingItemDynamicSelfTimer ) ); |
|
1853 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1854 TFileName iconFileName; |
|
1855 CamUtility::ResourceFileName( iconFileName ); |
|
1856 switch ( selftimer ) |
|
1857 { |
|
1858 case ECamSelfTimerOff: |
|
1859 { |
|
1860 SetIconL( |
|
1861 button, |
|
1862 iconFileName, |
|
1863 EMbmCameraappQgn_indi_cam4_selftimer_off, |
|
1864 EMbmCameraappQgn_indi_cam4_selftimer_off_mask, |
|
1865 skinInstance, |
|
1866 KAknsIIDQgnIndiCam4SelftimerOff ); |
|
1867 break; |
|
1868 } |
|
1869 case ECamSelfTimer2: |
|
1870 { |
|
1871 SetIconL( |
|
1872 button, |
|
1873 iconFileName, |
|
1874 EMbmCameraappQgn_indi_cam4_selftimer_2sec, |
|
1875 EMbmCameraappQgn_indi_cam4_selftimer_2sec_mask, |
|
1876 skinInstance, |
|
1877 KAknsIIDQgnIndiCam4Selftimer2sec ); |
|
1878 break; |
|
1879 } |
|
1880 case ECamSelfTimer10: |
|
1881 { |
|
1882 SetIconL( |
|
1883 button, |
|
1884 iconFileName, |
|
1885 EMbmCameraappQgn_indi_cam4_selftimer_10s, |
|
1886 EMbmCameraappQgn_indi_cam4_selftimer_10s_mask, |
|
1887 skinInstance, |
|
1888 KAknsIIDQgnIndiCam4Selftimer10s ); |
|
1889 break; |
|
1890 } |
|
1891 case ECamSelfTimer20: |
|
1892 { |
|
1893 SetIconL( |
|
1894 button, |
|
1895 iconFileName, |
|
1896 EMbmCameraappQgn_indi_cam4_selftimer_20s, |
|
1897 EMbmCameraappQgn_indi_cam4_selftimer_20s_mask, |
|
1898 skinInstance, |
|
1899 KAknsIIDQgnIndiCam4Selftimer20s ); |
|
1900 break; |
|
1901 } |
|
1902 default: |
|
1903 break; |
|
1904 } |
|
1905 } |
|
1906 |
|
1907 } |
|
1908 |
|
1909 // --------------------------------------------------------------------------- |
|
1910 // CCamStillPreCaptureView::UpdateSceneModeIconsL |
|
1911 // --------------------------------------------------------------------------- |
|
1912 // |
|
1913 void CCamStillPreCaptureView::UpdateSceneModeIconsL() |
|
1914 { |
|
1915 CAknButton* button = ToolbarButtonById( ECamCmdCaptureSetupSceneStill ); |
|
1916 |
|
1917 if ( button ) |
|
1918 { |
|
1919 TCamSceneId scene = static_cast< TCamSceneId > ( |
|
1920 iController.IntegerSettingValue( ECamSettingItemDynamicPhotoScene ) ); |
|
1921 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
1922 TFileName iconFileName; |
|
1923 CamUtility::ResourceFileName( iconFileName ); |
|
1924 |
|
1925 switch ( scene ) |
|
1926 { |
|
1927 case ECamSceneAuto: |
|
1928 { |
|
1929 SetIconL( |
|
1930 button, |
|
1931 iconFileName, |
|
1932 EMbmCameraappQgn_indi_cam4_mode_auto, |
|
1933 EMbmCameraappQgn_indi_cam4_mode_auto_mask, |
|
1934 skinInstance, |
|
1935 KAknsIIDQgnIndiCam4ModeAuto ); |
|
1936 break; |
|
1937 } |
|
1938 case ECamSceneUser: |
|
1939 { |
|
1940 SetIconL( |
|
1941 button, |
|
1942 iconFileName, |
|
1943 EMbmCameraappQgn_indi_cam4_mode_userscene, |
|
1944 EMbmCameraappQgn_indi_cam4_mode_userscene_mask, |
|
1945 skinInstance, |
|
1946 KAknsIIDQgnIndiCam4ModeUserscene ); |
|
1947 break; |
|
1948 } |
|
1949 case ECamSceneMacro: |
|
1950 { |
|
1951 SetIconL( |
|
1952 button, |
|
1953 iconFileName, |
|
1954 EMbmCameraappQgn_indi_cam4_mode_closeup, |
|
1955 EMbmCameraappQgn_indi_cam4_mode_closeup_mask, |
|
1956 skinInstance, |
|
1957 KAknsIIDQgnIndiCam4ModeCloseup ); |
|
1958 break; |
|
1959 } |
|
1960 case ECamScenePortrait: |
|
1961 { |
|
1962 SetIconL( |
|
1963 button, |
|
1964 iconFileName, |
|
1965 EMbmCameraappQgn_indi_cam4_mode_portrait, |
|
1966 EMbmCameraappQgn_indi_cam4_mode_portrait_mask, |
|
1967 skinInstance, |
|
1968 KAknsIIDQgnIndiCam4ModePortrait ); |
|
1969 break; |
|
1970 } |
|
1971 case ECamSceneScenery: |
|
1972 { |
|
1973 SetIconL( |
|
1974 button, |
|
1975 iconFileName, |
|
1976 EMbmCameraappQgn_indi_cam4_mode_landscape, |
|
1977 EMbmCameraappQgn_indi_cam4_mode_landscape_mask, |
|
1978 skinInstance, |
|
1979 KAknsIIDQgnIndiCam4ModeLandscape ); |
|
1980 break; |
|
1981 } |
|
1982 case ECamSceneNight: |
|
1983 { |
|
1984 SetIconL( |
|
1985 button, |
|
1986 iconFileName, |
|
1987 EMbmCameraappQgn_indi_cam4_mode_night, |
|
1988 EMbmCameraappQgn_indi_cam4_mode_night_mask, |
|
1989 skinInstance, |
|
1990 KAknsIIDQgnIndiCam4ModeNight ); |
|
1991 break; |
|
1992 } |
|
1993 case ECamSceneSports: |
|
1994 { |
|
1995 SetIconL( |
|
1996 button, |
|
1997 iconFileName, |
|
1998 EMbmCameraappQgn_indi_cam4_mode_sport, |
|
1999 EMbmCameraappQgn_indi_cam4_mode_sport_mask, |
|
2000 skinInstance, |
|
2001 KAknsIIDQgnIndiCam4ModeSport ); |
|
2002 break; |
|
2003 } |
|
2004 case ECamSceneNightScenery: |
|
2005 case ECamSceneNightPortrait: |
|
2006 { |
|
2007 SetIconL( |
|
2008 button, |
|
2009 iconFileName, |
|
2010 EMbmCameraappQgn_indi_cam4_mode_portrait_night, |
|
2011 EMbmCameraappQgn_indi_cam4_mode_portrait_night_mask, |
|
2012 skinInstance, |
|
2013 KAknsIIDQgnIndiCam4ModePortraitNight ); |
|
2014 break; |
|
2015 } |
|
2016 case ECamSceneCandlelight: |
|
2017 default: |
|
2018 break; |
|
2019 } |
|
2020 } |
|
2021 |
|
2022 } |
|
2023 |
|
2024 // --------------------------------------------------------------------------- |
|
2025 // CCamStillPreCaptureView::UpdateVFGridIconsL |
|
2026 // --------------------------------------------------------------------------- |
|
2027 // |
|
2028 void CCamStillPreCaptureView::UpdateVFGridIconsL() |
|
2029 { |
|
2030 CAknButton* button = ToolbarButtonById( ECamCmdViewfinderGrid ); |
|
2031 if ( button ) |
|
2032 { |
|
2033 CAknButtonState* state = button->State(); |
|
2034 if ( state ) |
|
2035 { |
|
2036 TInt grid = iController.IntegerSettingValue( ECamSettingItemViewfinderGrid ); |
|
2037 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
2038 TFileName iconFileName; |
|
2039 CamUtility::ResourceFileName( iconFileName ); |
|
2040 |
|
2041 if ( grid == ECamViewfinderGridOn ) |
|
2042 { |
|
2043 SetIconL( |
|
2044 button, |
|
2045 iconFileName, |
|
2046 EMbmCameraappQgn_indi_cam4_viewfinder_off, |
|
2047 EMbmCameraappQgn_indi_cam4_viewfinder_off_mask, |
|
2048 skinInstance, |
|
2049 KAknsIIDQgnIndiCam4ViewfinderOff ); |
|
2050 HBufC* buttonText = StringLoader::LoadLC( R_QTN_LCAM_TB_HIDE_VIEWFINDER_GRID ); |
|
2051 state->SetTextL( *buttonText ); |
|
2052 CleanupStack::PopAndDestroy( buttonText ); |
|
2053 } |
|
2054 else |
|
2055 { |
|
2056 SetIconL( |
|
2057 button, |
|
2058 iconFileName, |
|
2059 EMbmCameraappQgn_indi_cam4_viewfinder_on, |
|
2060 EMbmCameraappQgn_indi_cam4_viewfinder_on_mask, |
|
2061 skinInstance, |
|
2062 KAknsIIDQgnIndiCam4ViewfinderOn ); |
|
2063 HBufC* buttonText = StringLoader::LoadLC( R_QTN_LCAM_TB_SHOW_VIEWFINDER_GRID ); |
|
2064 state->SetTextL( *buttonText ); |
|
2065 CleanupStack::PopAndDestroy( buttonText ); |
|
2066 } |
|
2067 } |
|
2068 } |
|
2069 |
|
2070 } |
|
2071 |
|
2072 // --------------------------------------------------------------------------- |
|
2073 // CCamStillPreCaptureView::UpdateVFGridIconsL |
|
2074 // --------------------------------------------------------------------------- |
|
2075 // |
|
2076 void CCamStillPreCaptureView::UpdateBurstModeIconsL() |
|
2077 { |
|
2078 if (!iController.UiConfigManagerPtr()->IsBurstModeSupported()) |
|
2079 { |
|
2080 HideButton( ECamCmdTimeLapseSlider ); |
|
2081 return; |
|
2082 } |
|
2083 CAknButton* button = ToolbarButtonById( ECamCmdTimeLapseSlider ); |
|
2084 if ( button ) |
|
2085 { |
|
2086 CAknButtonState* state = button->State(); |
|
2087 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
2088 TFileName iconFileName; |
|
2089 CamUtility::ResourceFileName( iconFileName ); |
|
2090 if ( state ) |
|
2091 { |
|
2092 TCamImageCaptureMode captureMode = iController.CurrentImageModeSetup(); |
|
2093 if ( captureMode == ECamImageCaptureSingle ) |
|
2094 { |
|
2095 SetIconL( |
|
2096 button, |
|
2097 iconFileName, |
|
2098 EMbmCameraappQgn_indi_cam4_sequence_burst, |
|
2099 EMbmCameraappQgn_indi_cam4_sequence_burst_mask, |
|
2100 skinInstance, |
|
2101 KAknsIIDQgnIndiCam4Sequence ); |
|
2102 |
|
2103 HBufC* buttonText = StringLoader::LoadLC( R_QTN_LCAM_TB_SEQUENCE ); |
|
2104 state->SetTextL( *buttonText ); |
|
2105 CleanupStack::PopAndDestroy( buttonText ); |
|
2106 } |
|
2107 else if ( captureMode == ECamImageCaptureBurst ) |
|
2108 { |
|
2109 SetIconL( |
|
2110 button, |
|
2111 iconFileName, |
|
2112 EMbmCameraappQgn_indi_cam4_sequence, |
|
2113 EMbmCameraappQgn_indi_cam4_sequence, |
|
2114 skinInstance, |
|
2115 KAknsIIDQgnIndiCam4SequenceBurst ); |
|
2116 |
|
2117 HBufC* buttonText = StringLoader::LoadLC( R_QTN_LCAM_TB_TURN_SEQUENCE_OFF ); |
|
2118 state->SetTextL( *buttonText ); |
|
2119 CleanupStack::PopAndDestroy( buttonText ); |
|
2120 |
|
2121 } |
|
2122 else |
|
2123 { |
|
2124 // pass |
|
2125 } |
|
2126 } |
|
2127 } |
|
2128 } |
|
2129 |
|
2130 // --------------------------------------------------------------------------- |
|
2131 // CCamStillPreCaptureView::UpdateFaceTrackingIconsL |
|
2132 // --------------------------------------------------------------------------- |
|
2133 // |
|
2134 void CCamStillPreCaptureView::UpdateFaceTracKingIconsL() |
|
2135 { |
|
2136 CAknButton* button = ToolbarButtonById( ECamCmdToggleFacetracking ); |
|
2137 |
|
2138 if ( button ) |
|
2139 { |
|
2140 CAknButtonState* state = button->State(); |
|
2141 if ( state ) |
|
2142 { |
|
2143 TInt face = iController.IntegerSettingValue( ECamSettingItemFaceTracking ); |
|
2144 |
|
2145 MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); |
|
2146 TFileName iconFileName; |
|
2147 CamUtility::ResourceFileName( iconFileName ); |
|
2148 if ( face == ECamSettOn ) |
|
2149 { |
|
2150 PRINT( _L( "Camera => UpdateFaceTrackingIconL on" ) ); |
|
2151 SetIconL ( |
|
2152 button, |
|
2153 iconFileName, |
|
2154 EMbmCameraappQgn_indi_cam4_tb_facedet_off, |
|
2155 EMbmCameraappQgn_indi_cam4_tb_facedet_off_mask, |
|
2156 skinInstance, |
|
2157 KAknsIIDQgnIndiCam4TbFacedetOff ); |
|
2158 |
|
2159 } |
|
2160 else |
|
2161 { |
|
2162 PRINT( _L( "Camera => UpdateFaceTrackingIconL off" ) ); |
|
2163 SetIconL ( |
|
2164 button, |
|
2165 iconFileName, |
|
2166 EMbmCameraappQgn_indi_cam4_tb_facedet, |
|
2167 EMbmCameraappQgn_indi_cam4_tb_facedet_mask, |
|
2168 skinInstance, |
|
2169 KAknsIIDQgnIndiCam4TbFacedet ); |
|
2170 } |
|
2171 } |
|
2172 } |
|
2173 |
|
2174 |
|
2175 |
|
2176 } |
|
2177 |
|
2178 // End of File |