|
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: Container class for still image and video post-capture views* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <eikmenub.h> |
|
21 #include <aknview.h> |
|
22 #include <avkon.hrh> |
|
23 #include <gulutil.h> |
|
24 #include <AknUtils.h> |
|
25 #include <AknsFrameBackgroundControlContext.h> |
|
26 #include <AknsDrawUtils.h> |
|
27 #include <cameraapp.rsg> |
|
28 #include <vgacamsettings.rsg> |
|
29 #include <aknlayoutscalable_apps.cdl.h> |
|
30 #include <layoutmetadata.cdl.h> |
|
31 |
|
32 #include "CamPanic.h" |
|
33 #include "CamAppUi.h" |
|
34 #include "CamPostCaptureContainer.h" |
|
35 #include "CamAppController.h" |
|
36 #include "CamLogger.h" |
|
37 #include "CamUtility.h" |
|
38 #include "CamNaviCounterControl.h" |
|
39 #include "CamNaviProgressBarControl.h" |
|
40 #include "OstTraceDefinitions.h" |
|
41 #ifdef OST_TRACE_COMPILER_IN_USE |
|
42 #include "CamPostCaptureContainerTraces.h" |
|
43 #endif |
|
44 |
|
45 |
|
46 |
|
47 // CONSTANTS |
|
48 |
|
49 // ================= MEMBER FUNCTIONS ======================= |
|
50 |
|
51 // --------------------------------------------------------------------------- |
|
52 // CCamPostCaptureContainer::NewL |
|
53 // Symbian OS two-phased constructor |
|
54 // --------------------------------------------------------------------------- |
|
55 // |
|
56 CCamPostCaptureContainer* CCamPostCaptureContainer::NewL( |
|
57 CCamAppController& aController, |
|
58 CAknView& aView, |
|
59 const TRect& aRect ) |
|
60 { |
|
61 CCamPostCaptureContainer* self = new( ELeave ) CCamPostCaptureContainer( |
|
62 aController, aView ); |
|
63 CleanupStack::PushL( self ); |
|
64 self->ConstructL( aRect ); |
|
65 CleanupStack::Pop( self ); |
|
66 // return newly created CCamPostCaptureContainer instance |
|
67 return self; |
|
68 } |
|
69 |
|
70 // Destructor |
|
71 CCamPostCaptureContainer::~CCamPostCaptureContainer() |
|
72 { |
|
73 PRINT( _L("Camera => ~CCamPostCaptureContainer" )) |
|
74 |
|
75 iController.RemoveControllerObserver( this ); |
|
76 delete iBatteryPaneController; |
|
77 PRINT( _L("Camera <= ~CCamPostCaptureContainer" )) |
|
78 } |
|
79 |
|
80 // --------------------------------------------------------- |
|
81 // CCamPostCaptureContainer::ConstructL |
|
82 // Symbian OS 2nd phase constructor |
|
83 // --------------------------------------------------------- |
|
84 // |
|
85 void CCamPostCaptureContainer::ConstructL( const TRect& aRect ) |
|
86 { |
|
87 CCamContainerBase::BaseConstructL( aRect ); |
|
88 iController.AddControllerObserverL( this ); |
|
89 |
|
90 AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, iScreenSize ); |
|
91 CCamAppUi* appUi = static_cast<CCamAppUi*>(CEikonEnv::Static()->AppUi()); |
|
92 // Do not construct battery pane controller, if secondary camera is in use |
|
93 if ( iController.ActiveCamera() != ECamActiveCameraSecondary || |
|
94 appUi->IsQwerty2ndCamera() ) |
|
95 { |
|
96 iBatteryPaneController = CCamBatteryPaneController::NewL( *this, ETrue); |
|
97 } |
|
98 |
|
99 if( ECamControllerImage == iController.CurrentMode() ) |
|
100 { |
|
101 // Still mode - processing text needed |
|
102 PrepareProcessingTextL( ETrue ); |
|
103 } |
|
104 |
|
105 // Make sure fixed toolbar is on top of this window |
|
106 DrawableWindow()->SetOrdinalPosition( KCamPostCaptureWindowOrdinalPos ); |
|
107 } |
|
108 |
|
109 // --------------------------------------------------------------------------- |
|
110 // CCamPostCaptureContainer::CCamPostCaptureContainer |
|
111 // C++ constructor |
|
112 // --------------------------------------------------------------------------- |
|
113 // |
|
114 CCamPostCaptureContainer::CCamPostCaptureContainer( |
|
115 CCamAppController& aController, |
|
116 CAknView& aView ) |
|
117 : CCamContainerBase( aController, aView ), |
|
118 iCheckForFileNameChange( EFalse ) |
|
119 { |
|
120 } |
|
121 |
|
122 // --------------------------------------------------------- |
|
123 // CCamViewFinderContainer::CountComponentControls |
|
124 // Returns the number of controls owned |
|
125 // --------------------------------------------------------- |
|
126 // |
|
127 TInt CCamPostCaptureContainer::CountComponentControls() const |
|
128 { |
|
129 TInt count = 0; |
|
130 if( ( iPaneInUse == ECamPaneCounter ) || ( iPaneInUse == ECamPaneProgress ) ) |
|
131 { |
|
132 count++; |
|
133 } |
|
134 |
|
135 if ( !iController.IsTouchScreenSupported() ) |
|
136 { |
|
137 if(iActivePalette && iActivePalette->CoeControl()->IsVisible()) |
|
138 { |
|
139 count++; //Active Palette |
|
140 } |
|
141 } |
|
142 |
|
143 return count; |
|
144 } |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // CCamPostCaptureContainer::ComponentControl |
|
148 // Return specified control owned by this control |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 CCoeControl* CCamPostCaptureContainer::ComponentControl( TInt aIndex ) const |
|
152 { |
|
153 CCoeControl* con = NULL; |
|
154 switch( aIndex ) |
|
155 { |
|
156 case ECamPostCaptureSubControlNaviPane: |
|
157 { |
|
158 switch( iPaneInUse ) |
|
159 { |
|
160 case ECamPaneCounter: |
|
161 { |
|
162 con = iNaviCounterControl; |
|
163 break; |
|
164 } |
|
165 case ECamPaneProgress: |
|
166 { |
|
167 con = iNaviCounterControl; |
|
168 break; |
|
169 } |
|
170 case ECamPaneUndefined: |
|
171 { |
|
172 break; |
|
173 } |
|
174 } |
|
175 break; |
|
176 } |
|
177 case ECamPostCaptureActivePalette: |
|
178 { |
|
179 if(iActivePalette && iActivePalette->CoeControl()->IsVisible()) |
|
180 { |
|
181 con = iActivePalette->CoeControl(); |
|
182 } |
|
183 break; |
|
184 } |
|
185 |
|
186 default: |
|
187 break; |
|
188 } |
|
189 return con; |
|
190 |
|
191 } |
|
192 |
|
193 // --------------------------------------------------------- |
|
194 // CCamPostCaptureContainer::Draw |
|
195 // Draw control |
|
196 // --------------------------------------------------------- |
|
197 // |
|
198 void CCamPostCaptureContainer::Draw( const TRect& /*aRect*/ ) const |
|
199 { |
|
200 CCamAppUi* appUi = static_cast<CCamAppUi*>(CEikonEnv::Static()->AppUi()); |
|
201 |
|
202 if ( appUi && appUi->Embedding() && !appUi->ReadyToDraw() && |
|
203 iController.ActiveCamera() == ECamActiveCameraPrimary ) |
|
204 { |
|
205 // Flickering can be reduced if view is not drawn due to 'wrong' |
|
206 // orientation change. False redraw events may come if device |
|
207 // orientation is changed - even if camera app is in the background. |
|
208 // |
|
209 // Primary camera does not support other than landscape mode, thus we |
|
210 // must always return to it when embedded application is closed. |
|
211 return; |
|
212 } |
|
213 |
|
214 if ( appUi && iCheckForFileNameChange ) |
|
215 { |
|
216 // whenever we come back from Properties view |
|
217 // we check if the file name has changed already |
|
218 appUi->StartFileNameCheck(); |
|
219 } |
|
220 // Draw the current image - snapshot or thumbnail |
|
221 CWindowGc& gc = SystemGc(); |
|
222 gc.SetFaded( EFalse ); |
|
223 |
|
224 gc.SetBrushColor( KRgbBlack ); |
|
225 gc.Clear(); |
|
226 |
|
227 const CFbsBitmap* snapshot = iController.SnapshotImage(); |
|
228 TRect containerRect = Rect(); |
|
229 |
|
230 // If snapshot contains a bitmap |
|
231 if ( snapshot ) |
|
232 { |
|
233 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMPOSTCAPTURECONTAINER_DRAW, "e_CAM_APP_SNAPSHOT_DRAW 1" ); //CCORAPP_SNAPSHOT_DRAW_START |
|
234 |
|
235 TSize snapshotSize = snapshot->SizeInPixels(); |
|
236 TRect bmCropRect( snapshotSize ); |
|
237 |
|
238 // Get the required snapshot layout rect |
|
239 TRect vfRect( ViewFinderFrameRect() ); |
|
240 |
|
241 |
|
242 // Standard CIF size snapshot, this could be either a video or |
|
243 // still image snapshot. Get the size to display and |
|
244 // crop the bitmap if necessary. |
|
245 |
|
246 if ( iView.Id().iUid == ECamViewIdVideoPostCapture ) |
|
247 { |
|
248 // This is a video snapshot - work out if it needs cropping |
|
249 |
|
250 TInt res = iController.GetCurrentVideoResolution(); |
|
251 |
|
252 if ( res != ECamVideoResolutionNHD ) |
|
253 { |
|
254 // Work out the rectangle of the viewfinder bitmap to draw |
|
255 TInt borderX = ( snapshotSize.iWidth - vfRect.Width() ) / 2; |
|
256 TInt borderY = ( snapshotSize.iHeight - vfRect.Height() ) / 2; |
|
257 bmCropRect.SetRect( borderX, |
|
258 borderY, |
|
259 snapshotSize.iWidth - borderX, |
|
260 snapshotSize.iHeight - borderY ); |
|
261 } |
|
262 } |
|
263 |
|
264 gc.BitBlt( vfRect.iTl, snapshot, bmCropRect ); |
|
265 |
|
266 OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMPOSTCAPTURECONTAINER_DRAW, "e_CAM_APP_SNAPSHOT_DRAW 0" ); //CCORAPP_SNAPSHOT_DRAW_END |
|
267 } |
|
268 |
|
269 TBool lateOperation = ( ECamCapturing == iController.CurrentOperation() |
|
270 || ECamCompleting == iController.CurrentOperation() ); |
|
271 |
|
272 if( iProcessingText && //iProcessingBg && |
|
273 iController.ActiveCamera() != ECamActiveCameraSecondary && |
|
274 lateOperation |
|
275 ) |
|
276 { |
|
277 PRINT( _L("Camera <> CCamPostCaptureContainer: draw processing text..") ); |
|
278 // When iProcessingText exists (and we are in correct state), the processing |
|
279 // image text needs to be drawn. |
|
280 //iProcessingBg->Draw( gc, Rect() ); |
|
281 |
|
282 gc.SetBrushColor( KRgbWhite ); |
|
283 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
284 iProcessingTextLayout.DrawText( gc, *iProcessingText, ETrue, KRgbBlack ); |
|
285 } |
|
286 |
|
287 if( iBatteryPaneController ) |
|
288 { |
|
289 if( iPaneInUse == ECamPaneCounter ) |
|
290 { |
|
291 iNaviCounterControl->DrawNaviCtr( gc ); |
|
292 } |
|
293 // Draw the battery pane |
|
294 iBatteryPaneController->Draw( gc ); |
|
295 } |
|
296 |
|
297 if ( iController.ActiveCamera() == ECamActiveCameraSecondary ) |
|
298 { |
|
299 if( iPaneInUse == ECamPaneCounter ) |
|
300 { |
|
301 iNaviCounterControl->DrawNaviCtr( gc ); |
|
302 } |
|
303 } |
|
304 } |
|
305 |
|
306 // ---------------------------------------------------- |
|
307 // CCamPostCaptureContainer::CheckForFileName |
|
308 // |
|
309 // ---------------------------------------------------- |
|
310 // |
|
311 void CCamPostCaptureContainer::CheckForFileName( TBool aDoCheck ) |
|
312 { |
|
313 iCheckForFileNameChange = aDoCheck; |
|
314 } |
|
315 |
|
316 // ---------------------------------------------------- |
|
317 // CCamPostCaptureContainer::OfferKeyEventL |
|
318 // Handles this application view's command keys. Forwards other |
|
319 // keys to child control(s). |
|
320 // ---------------------------------------------------- |
|
321 // |
|
322 TKeyResponse CCamPostCaptureContainer::OfferKeyEventL( |
|
323 const TKeyEvent& aKeyEvent, |
|
324 TEventCode aType ) |
|
325 { |
|
326 CCamAppUi* appUi = static_cast<CCamAppUi*>(CEikonEnv::Static()->AppUi()); |
|
327 TBool embedded = appUi->IsEmbedded(); |
|
328 |
|
329 if ( appUi && appUi->CheckCourtesyKeyEventL(aKeyEvent, aType, EFalse) == EKeyWasConsumed ) |
|
330 { |
|
331 return EKeyWasConsumed; |
|
332 } |
|
333 |
|
334 // only handle the shutter key if not in embedded mode |
|
335 if ( !embedded ) |
|
336 { |
|
337 if( aType == EEventKeyUp ) |
|
338 { |
|
339 iController.SetDemandKeyRelease( EFalse ); |
|
340 } |
|
341 |
|
342 TBool captureKey = IsCaptureKeyL( aKeyEvent, aType ); |
|
343 |
|
344 // consume the ECameraKey and exit post capture |
|
345 if ( iView.IsForeground() && |
|
346 ( ( captureKey ) || |
|
347 ( IsShutterKeyL( aKeyEvent, aType ) && |
|
348 ( appUi->CamOrientation() == ECamOrientationCamcorder || |
|
349 appUi->CamOrientation() == ECamOrientationCamcorderLeft ) ) ) |
|
350 ) |
|
351 { |
|
352 if ( aType == EEventKeyDown ) |
|
353 { |
|
354 TInt command = ECamCmdNewPhoto; |
|
355 |
|
356 if ( iView.Id().iUid == ECamViewIdVideoPostCapture ) |
|
357 { |
|
358 command = ECamCmdNewVideo; |
|
359 } |
|
360 iView.HandleCommandL( command ); |
|
361 // Demand to relese capture key in pre capture view |
|
362 iController.SetDemandKeyRelease( ETrue ); |
|
363 } |
|
364 return EKeyWasConsumed; |
|
365 } |
|
366 } |
|
367 |
|
368 if ( aType == EEventKey ) |
|
369 { |
|
370 TKeyResponse keyResponse = EKeyWasNotConsumed; |
|
371 // Check for 'C' key, to be taken as a delete event |
|
372 if ( aKeyEvent.iScanCode == EStdKeyBackspace ) |
|
373 { |
|
374 iView.HandleCommandL( ECamCmdDelete ); |
|
375 keyResponse = EKeyWasConsumed; |
|
376 } |
|
377 |
|
378 else if ( aKeyEvent.iScanCode == EStdKeyYes ) |
|
379 { |
|
380 // Only perform the quick send functionality if *not* in |
|
381 // embedded mode. If we are embedded, we are technically |
|
382 // already in the process of sending. |
|
383 // |
|
384 // In touch UI, the send key launches the dialler application. |
|
385 if ( !embedded && !AknLayoutUtils::PenEnabled() ) |
|
386 { |
|
387 iView.HandleCommandL( ECamCmdQuickSend ); |
|
388 } |
|
389 |
|
390 keyResponse = EKeyWasConsumed; |
|
391 } |
|
392 else |
|
393 { |
|
394 // do nothing |
|
395 } |
|
396 |
|
397 if ( !iController.IsTouchScreenSupported() ) |
|
398 { |
|
399 if(iActivePalette && iActivePalette->CoeControl()->OfferKeyEventL(aKeyEvent,aType)==EKeyWasConsumed) |
|
400 { |
|
401 keyResponse = EKeyWasConsumed; |
|
402 } |
|
403 } |
|
404 |
|
405 if ( keyResponse == EKeyWasConsumed ) |
|
406 { |
|
407 return keyResponse; |
|
408 } |
|
409 } |
|
410 return CCamContainerBase::OfferKeyEventL( aKeyEvent, aType ); |
|
411 } |
|
412 |
|
413 // ----------------------------------------------------------------------------- |
|
414 // CCamPostCaptureContainer::HandleControllerEventL |
|
415 // Handle user menu selections |
|
416 // ----------------------------------------------------------------------------- |
|
417 // |
|
418 void CCamPostCaptureContainer::HandleControllerEventL( TCamControllerEvent aEvent, |
|
419 TInt /*aError*/ ) |
|
420 { |
|
421 PRINT( _L("Camera => CCamPostCaptureContainer::HandleControllerEventL") ); |
|
422 // If this is a capture complete event |
|
423 if ( aEvent == ECamEventCaptureComplete ) |
|
424 { |
|
425 DrawNow(); |
|
426 } |
|
427 else if ( aEvent == ECamEventSnapshotReady ) |
|
428 { |
|
429 DrawNow(); |
|
430 } |
|
431 PRINT( _L("Camera <= CCamPostCaptureContainer::HandleControllerEventL") ); |
|
432 } |
|
433 |
|
434 // --------------------------------------------------------------------------- |
|
435 // CCamContainerBase::ShowZoomPaneWithTimer |
|
436 // Makes Zoom Pane visible for the period of the pane timer. |
|
437 // --------------------------------------------------------------------------- |
|
438 // |
|
439 void CCamPostCaptureContainer::ShowZoomPaneWithTimer() |
|
440 { |
|
441 // No implementation: only meaningful in pre-capture modes |
|
442 PRINT(_L("Camera => CCamPostCaptureContainer::ShowZoomPaneWithTimer() - No implementation!")); |
|
443 } |
|
444 |
|
445 // ----------------------------------------------------------------------------- |
|
446 // CCamPostCaptureContainer::Redraw |
|
447 // ----------------------------------------------------------------------------- |
|
448 void CCamPostCaptureContainer::Redraw(const TRect& aArea) |
|
449 { |
|
450 PRINT( _L("Camera => CCamPostCaptureContainer::Redraw") ); |
|
451 CWindowGc& gc = SystemGc(); |
|
452 |
|
453 const CFbsBitmap* snapshot = iController.SnapshotImage(); |
|
454 |
|
455 if( iBatteryPaneController ) |
|
456 { |
|
457 if( iPaneInUse == ECamPaneCounter ) |
|
458 { |
|
459 iNaviCounterControl->DrawNaviCtr( gc ); |
|
460 } |
|
461 } |
|
462 |
|
463 // If snapshot contains a bitmap |
|
464 if ( snapshot ) |
|
465 { |
|
466 TRect ssRect( ViewFinderFrameRect() ); |
|
467 TRect outdatedArea( aArea ); |
|
468 TSize snapshotSize = snapshot->SizeInPixels(); |
|
469 // If necessary, the outdated area (aArea) is moved according to the |
|
470 // cropped bitmap. |
|
471 if ( iView.Id().iUid == ECamViewIdVideoPostCapture && |
|
472 iController.GetCurrentVideoResolution() != |
|
473 ECamVideoResolutionNHD ) |
|
474 { |
|
475 // Get the required snapshot layout |
|
476 // Work out the rectangle of the viewfinder bitmap to draw |
|
477 TInt borderX = |
|
478 ( snapshotSize.iWidth - ssRect.Width() ) / 2; |
|
479 TInt borderY = |
|
480 ( snapshotSize.iHeight - ssRect.Height() ) / 2; |
|
481 |
|
482 if ( borderX < 0 ) //the display zone is reduced |
|
483 { |
|
484 if ( iActivePalette && iActivePalette->CoeControl()->IsVisible() ) //active palette is exist |
|
485 { |
|
486 gc.SetBrushColor( KRgbBlack ); |
|
487 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
488 gc.Clear( outdatedArea ); //Clear the initial whole zone |
|
489 } |
|
490 } |
|
491 |
|
492 outdatedArea.Move( borderX, borderY ); //new zone |
|
493 } |
|
494 |
|
495 if ( iController.ActiveCamera() == ECamActiveCameraSecondary ) |
|
496 { |
|
497 // Secondary camera snapshot image doesn't fill whole screen. |
|
498 // Black stripes are handled here. |
|
499 outdatedArea.Move( 0, -ssRect.iTl.iY ); |
|
500 } |
|
501 |
|
502 if ( outdatedArea.iBr.iX > snapshotSize.iWidth ) |
|
503 { |
|
504 // Draw black background for the tooltip. |
|
505 // Mirrored layout is not supported. |
|
506 TRect blackRect = outdatedArea; |
|
507 blackRect.iTl.iX += snapshotSize.iWidth - outdatedArea.iTl.iX; |
|
508 gc.SetBrushColor( KRgbBlack ); |
|
509 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); |
|
510 gc.SetPenStyle( CGraphicsContext::ESolidPen ); |
|
511 gc.DrawRect( blackRect ); |
|
512 } |
|
513 |
|
514 if ( ssRect.Contains( outdatedArea.iTl ) || !iController.IsTouchScreenSupported() ) |
|
515 { |
|
516 PRINT( _L("Camera <> CCamPostCaptureContainer::Redraw snapshot") ); |
|
517 gc.BitBlt( aArea.iTl, snapshot, outdatedArea); |
|
518 } |
|
519 } |
|
520 |
|
521 if( iBatteryPaneController ) |
|
522 { |
|
523 iBatteryPaneController->Draw( gc ); |
|
524 } |
|
525 PRINT( _L("Camera <= CCamPostCaptureContainer::Redraw") ); |
|
526 } |
|
527 |
|
528 // ----------------------------------------------------------------------------- |
|
529 // CCamPostCaptureContainer::BatteryPaneUpdated |
|
530 // |
|
531 // Called by CCamBatteryPaneController when battery pane content has been updated. |
|
532 // Re-draws background under the battery pane and the battery pane itself. |
|
533 // ----------------------------------------------------------------------------- |
|
534 // |
|
535 void CCamPostCaptureContainer::BatteryPaneUpdated() |
|
536 { |
|
537 CCamAppUi* appUi = static_cast<CCamAppUi*>(CEikonEnv::Static()->AppUi()); |
|
538 |
|
539 // during sequence capture the battery icon is drawn by precapture container |
|
540 // in sequence postcapture there is not battery icon, so there is no need |
|
541 // to redraw battery or processing text here while sequence mode is enabled |
|
542 if ( iBatteryPaneController && appUi && !appUi->IsBurstEnabled() ) |
|
543 { |
|
544 // Get the battery pane rectangle |
|
545 TRect rect = iBatteryPaneController->Rect(); |
|
546 |
|
547 // Activate Gc |
|
548 ActivateGc(); |
|
549 |
|
550 // Invalidate the battery pane area |
|
551 RWindow window = Window(); |
|
552 window.Invalidate( rect ); |
|
553 window.BeginRedraw( rect ); |
|
554 |
|
555 // Redraw the background in that area |
|
556 iUpdatingBatteryPane = ETrue; |
|
557 Redraw( rect ); |
|
558 iUpdatingBatteryPane = EFalse; |
|
559 |
|
560 // Draw the battery pane |
|
561 CWindowGc& gc = SystemGc(); |
|
562 |
|
563 |
|
564 //Redraw the prosessing text before battery icon |
|
565 if ( iProcessingText && appUi && |
|
566 iController.ActiveCamera() != ECamActiveCameraSecondary && |
|
567 ( ECamCapturing == iController.CurrentOperation() || |
|
568 ECamCompleting == iController.CurrentOperation() ) ) |
|
569 { |
|
570 // When iProcessingText exists (and we are in correct state), the processing |
|
571 // image text needs to be drawn. |
|
572 gc.SetBrushColor( KRgbWhite ); |
|
573 gc.SetBrushStyle( CGraphicsContext::ENullBrush ); |
|
574 iProcessingTextLayout.DrawText( gc, *iProcessingText, ETrue, KRgbBlack ); |
|
575 } |
|
576 |
|
577 |
|
578 //iBatteryPaneController->Draw( gc ); |
|
579 |
|
580 // Tell the window redraw is finished and deactivate Gc |
|
581 window.EndRedraw(); |
|
582 DeactivateGc(); |
|
583 } |
|
584 |
|
585 } |
|
586 |
|
587 // ----------------------------------------------------------------------------- |
|
588 // CCamPostCaptureContainer::HandleResourceChange |
|
589 // |
|
590 // Passes resource changes to battery pane controller |
|
591 // ----------------------------------------------------------------------------- |
|
592 // |
|
593 void |
|
594 CCamPostCaptureContainer::HandleResourceChange( TInt aType ) |
|
595 { |
|
596 if( iBatteryPaneController ) |
|
597 { |
|
598 // Inform battery pane of the resource change |
|
599 iBatteryPaneController->HandleResourceChange( aType ); |
|
600 } |
|
601 |
|
602 CCamContainerBase::HandleResourceChange( aType ); |
|
603 } |
|
604 |
|
605 |
|
606 // --------------------------------------------------------------------------- |
|
607 // HandleAppEvent <<virtual>> |
|
608 // |
|
609 // --------------------------------------------------------------------------- |
|
610 // |
|
611 void |
|
612 CCamPostCaptureContainer::HandleAppEvent( const TCamAppEvent& aEvent ) |
|
613 { |
|
614 PRINT( _L("Camera => CCamPostCaptureContainer::HandleAppEvent") ); |
|
615 |
|
616 switch( aEvent ) |
|
617 { |
|
618 case ECamAppEventFocusGained: |
|
619 { |
|
620 iCheckForFileNameChange = ETrue; |
|
621 if( iBatteryPaneController ) |
|
622 iBatteryPaneController->Pause( EFalse ); |
|
623 break; |
|
624 } |
|
625 case ECamAppEventFocusLost: |
|
626 { |
|
627 if( iBatteryPaneController ) |
|
628 iBatteryPaneController->Pause( ETrue ); |
|
629 break; |
|
630 } |
|
631 default: |
|
632 { |
|
633 break; |
|
634 } |
|
635 } |
|
636 |
|
637 PRINT( _L("Camera <= CCamPostCaptureContainer::HandleAppEvent") ); |
|
638 } |
|
639 |
|
640 // End of File |