camerauis/cameraapp/generic/src/CamPreCaptureContainerBase.cpp
branchRCL_3
changeset 16 d486e5e3cc9a
parent 11 792dfc98fb3b
child 20 38fb6f7eacd5
equal deleted inserted replaced
12:8c55c525d5d7 16:d486e5e3cc9a
    59 #ifdef OST_TRACE_COMPILER_IN_USE
    59 #ifdef OST_TRACE_COMPILER_IN_USE
    60 #include "CamPreCaptureContainerBaseTraces.h"
    60 #include "CamPreCaptureContainerBaseTraces.h"
    61 #endif
    61 #endif
    62 #include "camconfiguration.h"
    62 #include "camconfiguration.h"
    63 #include "CameraUiConfigManager.h"
    63 #include "CameraUiConfigManager.h"
       
    64 #include "camstartuplogo.h"
    64 
    65 
    65 
    66 
    66 // CONSTANTS
    67 // CONSTANTS
    67 const TInt KZoomPanelTimeout = 4000000;     // 4s 
    68 const TInt KZoomPanelTimeout = 4000000;     // 4s 
    68 const TInt KReticuleFlashTimeout = 250000;  // Quarter of a second (in microseconds).
    69 const TInt KReticuleFlashTimeout = 250000;  // Quarter of a second (in microseconds).
   104     {    
   105     {    
   105     iZoomTimer->Cancel();
   106     iZoomTimer->Cancel();
   106     }
   107     }
   107   delete iZoomTimer;
   108   delete iZoomTimer;
   108   delete iVfGridDrawer;
   109   delete iVfGridDrawer;
       
   110 
       
   111   delete iStartupLogo;
   109 
   112 
   110   if ( iController.UiConfigManagerPtr() && 
   113   if ( iController.UiConfigManagerPtr() && 
   111        iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
   114        iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
   112       {
   115       {
   113       iAfIcons.ResetAndDestroy();
   116       iAfIcons.ResetAndDestroy();
   292     DrawableWindow()->SetOrdinalPosition( KCamPreCaptureWindowOrdinalPos );
   295     DrawableWindow()->SetOrdinalPosition( KCamPreCaptureWindowOrdinalPos );
   293 
   296 
   294   iController.SetViewfinderWindowHandle( &Window() );
   297   iController.SetViewfinderWindowHandle( &Window() );
   295   appUi->SetViewFinderInTransit(EFalse);
   298   appUi->SetViewFinderInTransit(EFalse);
   296   iController.StartIdleTimer();
   299   iController.StartIdleTimer();
   297   
   300 
       
   301   if (appUi->StartupLogoController())
       
   302     {
       
   303     TRAP_IGNORE(iStartupLogo = CCamStartupLogo::NewL(*appUi->StartupLogoController(), aRect));
       
   304     }
       
   305 
   298   PRINT( _L("Camera <= CCamPreCaptureContainerBase::BaseConstructL ") );
   306   PRINT( _L("Camera <= CCamPreCaptureContainerBase::BaseConstructL ") );
   299   }
   307   }
   300 
   308 
   301 // ---------------------------------------------------------------------------
   309 // ---------------------------------------------------------------------------
   302 // CCamPreCaptureContainerBase::CCamPreCaptureContainerBase
   310 // CCamPreCaptureContainerBase::CCamPreCaptureContainerBase
  1162             // -----------------------------------------
  1170             // -----------------------------------------
  1163             }
  1171             }
  1164           else
  1172           else
  1165             {
  1173             {
  1166             PRINT_FRQ( _L("Camera <> CCamPreCaptureContainerBase: iBitmapGc == NULL"));
  1174             PRINT_FRQ( _L("Camera <> CCamPreCaptureContainerBase: iBitmapGc == NULL"));
       
  1175             //in DSA case draw snapshot already here if available
       
  1176             const CFbsBitmap* snapshot = iController.SnapshotImage();
       
  1177             if (snapshot)
       
  1178               {
       
  1179               TSize snapshotSize = snapshot->SizeInPixels();
       
  1180               TRect bmCropRect( snapshotSize );
       
  1181         
       
  1182               // Get the required snapshot layout rect
       
  1183               TRect vfRect( ViewFinderFrameRect() ); 
       
  1184 
       
  1185               RWindow window = Window();
       
  1186               window.Invalidate( Rect() );
       
  1187               window.BeginRedraw( Rect() ); 
       
  1188               gc.BitBlt( vfRect.iTl, snapshot, bmCropRect );
       
  1189               
       
  1190               TBool lateOperation = ( ECamCapturing == iController.CurrentOperation() 
       
  1191                                      || ECamCompleting == iController.CurrentOperation() );
       
  1192 
       
  1193               if( iProcessingText &&
       
  1194                   iController.ActiveCamera() != ECamActiveCameraSecondary && 
       
  1195                   lateOperation )
       
  1196                 {  
       
  1197                 gc.SetBrushColor( KRgbWhite );
       
  1198                 gc.SetBrushStyle( CGraphicsContext::ENullBrush );
       
  1199                 iProcessingTextLayout.DrawText( gc, *iProcessingText, ETrue, KRgbBlack ); 
       
  1200                 }
       
  1201               
       
  1202               if( iBatteryPaneController )
       
  1203                 {
       
  1204                 iBatteryPaneController->Draw( gc );
       
  1205                 }
       
  1206               window.EndRedraw();
       
  1207               }   
  1167             }
  1208             }
  1168           }
  1209           }
  1169         DeactivateGc();
  1210         DeactivateGc();
  1170         PRINT_FRQ( _L("Camera <= CCamPreCaptureContainerBase::HandleCameraEventL") );
  1211         PRINT_FRQ( _L("Camera <= CCamPreCaptureContainerBase::HandleCameraEventL") );
  1171         }
  1212         }