camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp
changeset 0 1ddebce53859
child 3 8b2d6d0384b0
equal deleted inserted replaced
-1:000000000000 0:1ddebce53859
       
     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 pre-capture view*
       
    15 */
       
    16 
       
    17 // INCLUDE FILES
       
    18 #include <AknIconUtils.h>
       
    19 #include <cameraapp.mbg>
       
    20 
       
    21 #include <cameraapp.rsg>
       
    22 #include <vgacamsettings.rsg>
       
    23 #include <akntoolbar.h>
       
    24 #include <aknlayoutscalable_apps.cdl.h>
       
    25 
       
    26 #include "CamStillPreCaptureContainer.h"
       
    27 #include "CamLogger.h"
       
    28 #include "CamPreCaptureViewBase.h"
       
    29 #include "CamAppUi.h"
       
    30 #include "CamSidePane.h"
       
    31 #include "CamSelfTimer.h"
       
    32 #include "CamUtility.h"
       
    33 #include "camactivepalettehandler.h"
       
    34 #include "CameraUiConfigManager.h"
       
    35 #include "OstTraceDefinitions.h"
       
    36 #include "CamIndicator.h"
       
    37 #ifdef OST_TRACE_COMPILER_IN_USE
       
    38 #include "CamStillPreCaptureContainerTraces.h"
       
    39 #endif
       
    40 
       
    41 #include "camvfgridinterface.h"
       
    42 #include "camlinevfgriddrawer.h"
       
    43 #include "campanic.h"
       
    44 
       
    45 // Constants
       
    46 const TUid KGridDrawerUid = { KCamLineDrawVfGridUid };
       
    47 const TInt KGridHrzLines  = 2;
       
    48 const TInt KGridVrtLines  = 2;
       
    49 const TInt KGridThickness = 2;
       
    50 const TRgb KGridColor     = KRgbGray;
       
    51 const CGraphicsContext::TPenStyle KGridStyle = CGraphicsContext::ESolidPen;
       
    52 
       
    53 
       
    54 // ================= MEMBER FUNCTIONS =======================
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // CCamStillPreCaptureContainer::NewL
       
    58 // Symbian OS two-phased constructor
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 CCamStillPreCaptureContainer* CCamStillPreCaptureContainer::NewL(
       
    62         CCamAppController& aController,
       
    63         CAknView& aView,
       
    64         const TRect& aRect )
       
    65     {
       
    66     CCamStillPreCaptureContainer* self = new( ELeave ) CCamStillPreCaptureContainer(
       
    67         aController, aView );
       
    68 
       
    69     CleanupStack::PushL( self );
       
    70     self->ConstructL( aRect );
       
    71     CleanupStack::Pop( self );
       
    72     // Return newly created CCamStillPreCaptureContainer instance
       
    73     return self;
       
    74     }
       
    75 
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // CCamStillPreCaptureContainer::~CCamStillPreCaptureContainer
       
    79 // Destructor
       
    80 // ---------------------------------------------------------------------------
       
    81 //
       
    82 CCamStillPreCaptureContainer::~CCamStillPreCaptureContainer()
       
    83   {
       
    84   PRINT( _L("Camera => ~CCamStillPreCaptureContainer" ))
       
    85 
       
    86   if ( iAPCreateAO )
       
    87       {
       
    88       iAPCreateAO->Cancel();
       
    89       delete iAPCreateAO;
       
    90       }
       
    91 
       
    92   if ( iXenonFlashSupported )
       
    93       {
       
    94       // Unsubscribe blink events
       
    95       if( CCamFlashStatus* flashStatus = iController.FlashStatus() )
       
    96         flashStatus->Subscribe( NULL );
       
    97 
       
    98       delete iFlashBitmap;
       
    99       delete iFlashBitmapMask;
       
   100       }
       
   101   PRINT( _L("Camera <= ~CCamStillPreCaptureContainer" ))
       
   102   }
       
   103 
       
   104 // ---------------------------------------------------------
       
   105 // CCamStillPreCaptureContainer::ConstructL
       
   106 // Symbian OS 2nd phase constructor
       
   107 // ---------------------------------------------------------
       
   108 //
       
   109 void CCamStillPreCaptureContainer::ConstructL( const TRect& aRect )
       
   110   {
       
   111   PRINT( _L("Camera => CCamStillPreCaptureContainer::ConstructL" ))
       
   112   BaseConstructL( aRect );
       
   113 
       
   114   if ( iController.UiConfigManagerPtr() &&
       
   115        iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() )
       
   116       {
       
   117       iAPCreateAO = CIdle::NewL(CActive::EPriorityStandard);
       
   118       }
       
   119 
       
   120   if ( iController.UiConfigManagerPtr() &&
       
   121        iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
       
   122       {
       
   123       if( iController.IntegerSettingValue( ECamSettingItemPhotoShowFocusPoint ) )
       
   124         {
       
   125         iShowReticule = EFalse;
       
   126         }
       
   127       else
       
   128         {
       
   129         iShowReticule = ETrue;
       
   130         }
       
   131     }
       
   132 
       
   133   iSidePane->SetCaptureMode( ECamControllerImage );
       
   134 
       
   135 
       
   136   iXenonFlashSupported = iController.UiConfigManagerPtr()->IsXenonFlashSupported();
       
   137   if ( iXenonFlashSupported )
       
   138       {
       
   139       InitFlashIconL();
       
   140       LayoutFlashIcon();
       
   141       }
       
   142 
       
   143   PrepareProcessingTextL( ETrue );
       
   144 
       
   145   if ( !( iController.UiConfigManagerPtr() &&
       
   146        iController.UiConfigManagerPtr()->IsUIOrientationOverrideSupported() ) )
       
   147       {
       
   148       OstTrace0( CAMERAAPP_PERFORMANCE, CCAMSTILLPRECAPTURECONTAINER_CONSTRUCTL, "e_CAM_APP_AP_SETUP 1" );
       
   149       static_cast<CCamPreCaptureContainerBase*>( this )
       
   150           ->SetupActivePaletteL( static_cast<CCamViewBase*>(&iView) );
       
   151       OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMSTILLPRECAPTURECONTAINER_CONSTRUCTL, "e_CAM_APP_AP_SETUP 0" );
       
   152       }
       
   153   PRINT( _L("Camera <= CCamStillPreCaptureContainer::ConstructL" ))
       
   154   }
       
   155 
       
   156 // ---------------------------------------------------------
       
   157 // CCamContainerBase::BaseConstructL
       
   158 // Symbian OS 2nd phase constructor
       
   159 // ---------------------------------------------------------
       
   160 //
       
   161 void CCamStillPreCaptureContainer::BaseConstructL( const TRect& aRect )
       
   162     {
       
   163     CCamPreCaptureContainerBase::BaseConstructL( aRect );
       
   164     // Layout the reticule.
       
   165     if ( iController.UiConfigManagerPtr() &&
       
   166          iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
       
   167         {
       
   168         SizeChanged(); // Init layout
       
   169         }
       
   170     }
       
   171 
       
   172 // ---------------------------------------------------------------------------
       
   173 // CCamStillPreCaptureContainer::CCamStillPreCaptureContainer
       
   174 // C++ constructor
       
   175 // ---------------------------------------------------------------------------
       
   176 //
       
   177 
       
   178 CCamStillPreCaptureContainer::CCamStillPreCaptureContainer(
       
   179         CCamAppController& aController,
       
   180         CAknView& aView )
       
   181 : CCamPreCaptureContainerBase( aController, aView )
       
   182     {
       
   183     }
       
   184 
       
   185 
       
   186 // ---------------------------------------------------------
       
   187 // CCamStillPreCaptureContainer::HandleControllerEventL
       
   188 // Receives notifications about changes in recording state from the controller
       
   189 // ---------------------------------------------------------
       
   190 //
       
   191 void CCamStillPreCaptureContainer::HandleControllerEventL( TCamControllerEvent aEvent, TInt aError )
       
   192   {
       
   193   PRINT1( _L("Camera => CCamStillPreCaptureContainer::HandleControllerEventL aEvent:%d" ), aEvent )
       
   194   CCamAppUi* appUi = static_cast<CCamAppUi*>(CEikonEnv::Static()->AppUi());
       
   195 
       
   196   switch( aEvent )
       
   197     {
       
   198     // ---------------------------------------------------
       
   199   	case ECamEventImageQualityChanged:
       
   200       {
       
   201       PRINT( _L("Camera <> CCamStillPreCaptureContainer - ECamEventImageQualityChanged") );
       
   202       // If our viewfinder area is already set and image quality changes,
       
   203       // do re-layout.
       
   204       if( !iRect.IsEmpty() )
       
   205         {
       
   206         const TRect r( ViewFinderFrameRect() );
       
   207         if( iRect != r )
       
   208           {
       
   209           PRINT( _L("Camera <> CCamStillPreCaptureContainer - doing re-layout..") );
       
   210           iRect = r;
       
   211           SizeChanged();
       
   212           }
       
   213         }
       
   214       SetResolutionIndicator();
       
   215       break;
       
   216       }
       
   217     // ---------------------------------------------------
       
   218   	case ECamEventLocationSettingChanged:
       
   219       {
       
   220       // If the location setting was changed on, then the indicator should be visible
       
   221       SetLocationIndicatorVisibility();
       
   222       break;
       
   223       }
       
   224     // ---------------------------------------------------
       
   225   	case ECamEventCameraChanged:
       
   226       {
       
   227       break;
       
   228       }
       
   229     // ---------------------------------------------------
       
   230   	case ECamEventOperationStateChanged:
       
   231   	  {
       
   232       if( ECamCapturing == iController.CurrentOperation() )
       
   233         {
       
   234         // If capture has just begun, and it's burst capture,
       
   235         // will need to set the softkeys to Blank/Cancel (via UpdateCbaL call)
       
   236         if ( appUi->IsBurstEnabled() )
       
   237             {
       
   238             // Burst *is* enabled, so force the update of the CBA
       
   239             static_cast<CCamViewBase&>(iView).UpdateCbaL();
       
   240             }
       
   241         else // if burst is not enabled show the saving image wait note
       
   242        	    {
       
   243 			Window().Invalidate();
       
   244        	    }
       
   245         }
       
   246       else
       
   247        	{
       
   248        	}
       
   249       break;
       
   250   	  }
       
   251     // ---------------------------------------------------
       
   252     case ECamEventSetupStateChanged:
       
   253       {
       
   254       appUi->APHandler()->UpdateActivePaletteL();
       
   255       break;
       
   256       }
       
   257     // ---------------------------------------------------
       
   258     case ECamEventEngineStateChanged:
       
   259         {
       
   260         if( iController.CurrentImageModeSetup() == ECamImageCaptureBurst &&
       
   261             !iController.SequenceCaptureInProgress() )
       
   262             {
       
   263             // Burst mode - processing text needed
       
   264             PrepareBurstProcessingTextL();
       
   265             }
       
   266          break;
       
   267          }
       
   268     // ---------------------------------------------------
       
   269     case ECamEventInitReady:
       
   270         {
       
   271         // event only received if UIOrientationOverride feature is supported
       
   272         if( iAPCreateAO->IsActive() )
       
   273             {
       
   274             iAPCreateAO->Cancel();
       
   275             }
       
   276 		iAPCreateAO->Start( TCallBack( BackgroundAPL,this ) );
       
   277         break;
       
   278         }
       
   279     // ---------------------------------------------------
       
   280     default:
       
   281       {
       
   282       // otherwise, do nothing
       
   283       break;
       
   284       }
       
   285     // ---------------------------------------------------
       
   286     }
       
   287     CCamPreCaptureContainerBase::HandleControllerEventL( aEvent, aError );
       
   288     PRINT( _L("Camera <= CCamStillPreCaptureContainer::HandleControllerEventL" ) )
       
   289     }
       
   290 
       
   291 
       
   292 //----------------------------------------------
       
   293 // BackgroundAPL
       
   294 // Create AP ItemActive object Callback
       
   295 //----------------------------------------------
       
   296 TInt CCamStillPreCaptureContainer::BackgroundAPL( TAny *aparam )
       
   297     {
       
   298     CCamStillPreCaptureContainer* camStillCaptureContainer = reinterpret_cast<CCamStillPreCaptureContainer*> (aparam);
       
   299     return camStillCaptureContainer->SetupActivePaletteCallbackL();
       
   300     }
       
   301 
       
   302 
       
   303 //----------------------------------------------
       
   304 // SetupActivePaletteCallbackL
       
   305 // Initializes ActivePalette
       
   306 //----------------------------------------------
       
   307 TInt CCamStillPreCaptureContainer::SetupActivePaletteCallbackL()
       
   308     {
       
   309     PRINT( _L("Camera => CCamStillPreCaptureContainer::SetupActivePaletteCallbackL" ) )
       
   310     CCamAppUi* appUi = static_cast<CCamAppUi*>(CEikonEnv::Static()->AppUi());
       
   311     if ( !iController.IsTouchScreenSupported() &&
       
   312          iController.CurrentMode()== ECamControllerImage )
       
   313         {
       
   314         if ( appUi )
       
   315             {
       
   316             appUi->SetActivePaletteVisibility( EFalse);
       
   317             if ( !appUi->ActivePalette() )
       
   318                 {
       
   319                 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMSTILLPRECAPTURECONTAINER_HANDLECONTROLLEREVENTL, "e_CAM_APP_AP_SETUP 1" );
       
   320                 static_cast<CCamPreCaptureContainerBase*>( this )
       
   321                     ->SetupActivePaletteL( static_cast<CCamViewBase*>(&iView) );
       
   322                 OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMSTILLPRECAPTURECONTAINER_HANDLECONTROLLEREVENTL, "e_CAM_APP_AP_SETUP 0" );
       
   323                 }
       
   324             else
       
   325                 {
       
   326                 OstTrace0( CAMERAAPP_PERFORMANCE, DUP2_CCAMSTILLPRECAPTURECONTAINER_HANDLECONTROLLEREVENTL, "e_CAM_APP_AP_UPDATE 1" );
       
   327                 appUi->APHandler()->UpdateActivePaletteL();
       
   328                 OstTrace0( CAMERAAPP_PERFORMANCE, DUP3_CCAMSTILLPRECAPTURECONTAINER_HANDLECONTROLLEREVENTL, "e_CAM_APP_AP_UPDATE 0" );
       
   329                 }
       
   330             appUi->SetActivePaletteVisibility( ETrue );
       
   331             }
       
   332         else
       
   333             {
       
   334             }
       
   335         }
       
   336     PRINT( _L("Camera <= CCamStillPreCaptureContainer::SetupActivePaletteCallbackL" ) )
       
   337     return EFalse;
       
   338     }
       
   339 
       
   340 // ---------------------------------------------------------
       
   341 // CCamStillPreCaptureContainer::OfferKeyEventL
       
   342 // Handle key events
       
   343 // ---------------------------------------------------------
       
   344 //
       
   345 TKeyResponse
       
   346 CCamStillPreCaptureContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
   347                                                     TEventCode aType )
       
   348     {
       
   349     // if the cancel softkey is pressed
       
   350 
       
   351     // If currently capturing a burst
       
   352     if ( iController.SequenceCaptureInProgress() )
       
   353         {
       
   354         if ( aKeyEvent.iScanCode == EStdKeyDevice1 )
       
   355             {
       
   356             // Just return so the key press does not pass up to the base
       
   357             // class This will now be handled in HandleCommandL()
       
   358             return EKeyWasNotConsumed;
       
   359             }
       
   360         }
       
   361     return CCamPreCaptureContainerBase::OfferKeyEventL( aKeyEvent, aType );
       
   362     }
       
   363 
       
   364 // ---------------------------------------------------------
       
   365 // CCamStillPreCaptureContainer::ViewFinderLayoutResourceIds
       
   366 // Return the layout resource id for the viewfinder
       
   367 // ---------------------------------------------------------
       
   368 //
       
   369 void CCamStillPreCaptureContainer::ViewFinderLayoutResourceIds(
       
   370                                                 TInt& aViewFinderLayoutId,
       
   371                                                 TInt& aReticuleLayoutId ) const
       
   372     {
       
   373         {
       
   374         aViewFinderLayoutId = ROID(R_CAM_VIEWFINDER_RECT_STILL_ID);
       
   375         CCamAppUiBase* appui = static_cast<CCamAppUiBase*>( iEikonEnv->AppUi() );
       
   376         if ( appui->IsSecondCameraEnabled() )
       
   377             {
       
   378             aViewFinderLayoutId = ROID(R_CAM_STILL_DISPLAYED_RECT_SECONDARY_ID);
       
   379             }
       
   380         }
       
   381     if ( iController.UiConfigManagerPtr() &&
       
   382          iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
       
   383         {
       
   384         // set the layouts for the still capture viewfinder and reticule
       
   385         aReticuleLayoutId = R_CAM_IMG_PRECAP_RETICULE;
       
   386         }
       
   387     else
       
   388         {
       
   389         aReticuleLayoutId = 0;
       
   390         }
       
   391     }
       
   392 
       
   393 // ---------------------------------------------------------
       
   394 // CCamStillPreCaptureContainer::SetResolutionIndicator
       
   395 // Sets the resolution indicator to the required icon
       
   396 // ---------------------------------------------------------
       
   397 //
       
   398 void CCamStillPreCaptureContainer::SetResolutionIndicator()
       
   399     {
       
   400     // The setting stored is an index into the array of supported qualities,
       
   401     // and since this matches the array of supported quality icons, we do
       
   402     // not need to do any further lookup on this value.
       
   403     iCurrentIndicator = iController.IntegerSettingValue( ECamSettingItemPhotoQuality );
       
   404     }
       
   405 
       
   406 // ---------------------------------------------------------
       
   407 // CCamStillPreCaptureContainer::SetLocationIndicatorVisibility
       
   408 // Sets the resolution indicator visibility, if it is set or not
       
   409 // ---------------------------------------------------------
       
   410 //
       
   411 void CCamStillPreCaptureContainer::SetLocationIndicatorVisibility()
       
   412     {
       
   413     // The setting stored is an index of whether the location setting is on or off
       
   414     iLocationIndicatorVisible = (/*TCamLocationId::ECamLocationOn*/1 == iController.IntegerSettingValue( ECamSettingItemRecLocation ));
       
   415     }
       
   416 
       
   417 // ----------------------------------------------------
       
   418 // CCamStillPreCaptureContainer::IncreaseFlashSettingL
       
   419 // Move up through the flash settings
       
   420 // ----------------------------------------------------
       
   421 //
       
   422 void CCamStillPreCaptureContainer::IncreaseFlashSettingL()
       
   423     {
       
   424     if ( iZoomPane->IsVisible()
       
   425          || static_cast<CCamAppUiBase*>( iEikonEnv->AppUi() )->IsSecondCameraEnabled()
       
   426         )
       
   427         {
       
   428         return;
       
   429         }
       
   430     // get current setting
       
   431     TInt setting =
       
   432             iController.IntegerSettingValue( ECamSettingItemDynamicPhotoFlash );
       
   433 
       
   434     // Max/Min settings are ECamFlashAuto/ECamFlashOff
       
   435     // and navi-key right moves down the list of settings
       
   436     if ( setting == ECamFlashOff )
       
   437         {
       
   438         setting = ECamFlashAuto;
       
   439         }
       
   440     else if ( setting >= ECamFlashAuto )
       
   441         {
       
   442         setting++;
       
   443         }
       
   444     else
       
   445         {
       
   446         // remove Lint warning
       
   447         }
       
   448 
       
   449     // only update if setting is invalid
       
   450     if ( setting >= ECamFlashAuto && setting <= ECamFlashOff )
       
   451         {
       
   452         iController.SetIntegerSettingValueL(
       
   453                                 ECamSettingItemDynamicPhotoFlash, ( setting ) );
       
   454         }
       
   455     }
       
   456 
       
   457 // ----------------------------------------------------
       
   458 // CCamStillPreCaptureContainer::DecreaseFlashSettingL
       
   459 // Move down through the flash settings
       
   460 // ----------------------------------------------------
       
   461 //
       
   462 void CCamStillPreCaptureContainer::DecreaseFlashSettingL()
       
   463     {
       
   464     if ( iZoomPane->IsVisible()
       
   465          || static_cast<CCamAppUiBase*>( iEikonEnv->AppUi() )->IsSecondCameraEnabled()
       
   466         )
       
   467         {
       
   468         return;
       
   469         }
       
   470     // get current setting
       
   471     TInt setting =
       
   472             iController.IntegerSettingValue( ECamSettingItemDynamicPhotoFlash );
       
   473 
       
   474     // Max/Min settings are ECamFlashAuto/ECamFlashOff
       
   475     // and navi-key left moves up the list of settings
       
   476     if ( setting == ECamFlashAuto )
       
   477         {
       
   478         setting = ECamFlashOff;
       
   479         }
       
   480     else if ( setting > ECamFlashAuto )
       
   481         {
       
   482         setting--;
       
   483         }
       
   484     else
       
   485         {
       
   486         // remove Lint warning
       
   487         }
       
   488 
       
   489     // only update if setting is invalid
       
   490     if ( setting >= ECamFlashAuto && setting <= ECamFlashOff )
       
   491         {
       
   492         iController.SetIntegerSettingValueL(
       
   493                                 ECamSettingItemDynamicPhotoFlash, ( setting ) );
       
   494         }
       
   495     }
       
   496 
       
   497 // ----------------------------------------------------
       
   498 // CCamStillPreCaptureContainer::HandleCaptureKeyEventL
       
   499 // Change the current capture state
       
   500 // ----------------------------------------------------
       
   501 //
       
   502 TKeyResponse
       
   503 CCamStillPreCaptureContainer::HandleCaptureKeyEventL( const TKeyEvent& aKeyEvent )
       
   504   {
       
   505   PRINT( _L("Camera => CCamStillPreCaptureContainer::HandleCaptureKeyEventL"))
       
   506   TKeyResponse keyResponse = EKeyWasNotConsumed;
       
   507   CCamAppUi* appui = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
       
   508   __ASSERT_DEBUG(appui, CamPanic(ECamPanicNullPointer));
       
   509   TBool MSKCapture(EFalse);
       
   510   // First handle middle softkey and enter key capture event
       
   511   if ( !appui->IsToolBarVisible()
       
   512        && ( aKeyEvent.iScanCode == EStdKeyDevice3
       
   513             || aKeyEvent.iScanCode == EStdKeyEnter ) )
       
   514     {
       
   515     if ( iController.UiConfigManagerPtr() )
       
   516         {
       
   517         if ( iController.UiConfigManagerPtr()->IsOpticalJoyStickSupported() )
       
   518             {
       
   519             MSKCapture = ETrue;
       
   520             }
       
   521         else
       
   522             {
       
   523             if ( iController.UiConfigManagerPtr()->IsXenonFlashSupported() )
       
   524                 {
       
   525                 if ( iController.CheckFlash()
       
   526                        && static_cast<CCamPreCaptureViewBase*>( &iView )
       
   527                            ->StartMskCaptureL() )
       
   528                     {
       
   529                     return EKeyWasConsumed;
       
   530                     }
       
   531                 }
       
   532              else if ( static_cast<CCamPreCaptureViewBase*>( &iView )->StartMskCaptureL() )
       
   533                 {
       
   534                 return EKeyWasConsumed;
       
   535                 }
       
   536             }
       
   537         }
       
   538     }
       
   539 
       
   540   TBool selfTimerEnabled = appui->SelfTimerEnabled();
       
   541   TBool timeLapseEnabled = appui->CurrentBurstMode() == ECamImageCaptureTimeLapse;
       
   542 
       
   543   // if currently capturing a sequence
       
   544   if ( iController.SequenceCaptureInProgress() )
       
   545     {
       
   546     // if capturing an advanced timelapse under the press to start, press to stop rules
       
   547     // (i.e. not selftimer which captures 6 images)
       
   548     if ( timeLapseEnabled && !selfTimerEnabled )
       
   549       {
       
   550       // Stop the capture now
       
   551       iController.StopSequenceCaptureL();
       
   552       // Update CBA for setup pane usage
       
   553       TRAP_IGNORE( static_cast<CCamPreCaptureViewBase*>( &iView )->UpdateCbaL() );
       
   554       PRINT( _L("Camera <= CCamStillPreCaptureContainer: sequence capture stopped"))
       
   555       return EKeyWasConsumed;
       
   556       }
       
   557     else
       
   558       {
       
   559       // For certain products normal sequence capture, if we
       
   560       // are already capturing a burst, just consume but ignore it.
       
   561       PRINT( _L("Camera <= CCamStillPreCaptureContainer: ignored during sequence"))
       
   562       return EKeyWasConsumed;
       
   563       }
       
   564     }
       
   565 
       
   566   if ( iController.UiConfigManagerPtr() &&
       
   567        iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
       
   568       {
       
   569       // If the shutter key has continued to a full press OR
       
   570       // we are already focussed (as scene is a forced focus mode)
       
   571       if ( iKeyShutter
       
   572         || !iPhotoSceneUsesReticule
       
   573          )
       
   574         {
       
   575         iKeyShutter = EFalse;
       
   576 
       
   577         // Check if we are in Burst Mode with the controller not currently focussed.
       
   578         if ( appui->IsBurstEnabled()
       
   579           && iController.CurrentOperation() != ECamFocused &&
       
   580              iController.CurrentOperation() != ECamFocusFailed )
       
   581           {
       
   582           // We want to start focus if in multishot and NOT in self-timer mode
       
   583           // and current scene allows autofocus (ie if it's not forced)
       
   584           if ( !selfTimerEnabled
       
   585             && iPhotoSceneUsesReticule
       
   586              )
       
   587             {
       
   588             if( iXenonFlashSupported && timeLapseEnabled && !iController.CheckFlash() )
       
   589               {
       
   590               // In time lapse mode, do not start focusing with full press if
       
   591               // Xenon flash is not ready. This is not the case for normal
       
   592               // burst mode, because flash is not used there.
       
   593               iKeyShutter = ETrue;
       
   594               PRINT( _L("Camera <= CCamStillPreCaptureContainer: Flash not ready in timelapse mode, ignore key"))
       
   595               return EKeyWasConsumed;
       
   596               }
       
   597             // Below code commented out - fast capture should be supported also
       
   598             // in burst/sequence capture mode. Also, in case focusing is already
       
   599             // in progress, the call won't do anything.
       
   600             // iController.StartAutoFocus();
       
   601             }
       
   602           }
       
   603         }
       
   604 #ifndef __WINS__
       
   605       else
       
   606         {
       
   607         // This means we've received a full press without a half press -
       
   608         // probably because the half press was consumed by the post capture view
       
   609         // and triggered a switch to this view.  In this case, we don't want to
       
   610         // take a picture, therefore ignore the event.
       
   611         if ( !appui->IsSecondCameraEnabled()
       
   612              && !MSKCapture )
       
   613           {
       
   614           PRINT( _L("Camera <= CCamStillPreCaptureContainer: full press without half press ignored"))
       
   615           return EKeyWasConsumed;
       
   616           }
       
   617         }
       
   618 #endif // __WINS__
       
   619     }
       
   620 
       
   621   if( iXenonFlashSupported
       
   622    && !appui->IsSecondCameraEnabled()
       
   623    && !MSKCapture
       
   624    && !iController.CheckFlash() )
       
   625     {
       
   626     if( !appui->IsBurstEnabled() || (timeLapseEnabled && selfTimerEnabled) )
       
   627       {
       
   628       // For non-burst case, or time lapse captures with self timer,
       
   629       // we do not allow primary camera capture if flash is required,
       
   630       // but not ready.
       
   631       iKeyShutter = ETrue;
       
   632       PRINT( _L("Camera <= CCamStillPreCaptureContainer: Flash not ready, ignore key"))
       
   633       return EKeyWasNotConsumed;
       
   634       }
       
   635     }
       
   636 
       
   637   // Go straight to capture
       
   638   keyResponse = appui->StartCaptureL( aKeyEvent );
       
   639 
       
   640   // Blank out the softkeys if we are capturing
       
   641   if ( EKeyWasConsumed == keyResponse
       
   642     && !iController.SequenceCaptureInProgress()
       
   643     && !iController.CaptureModeTransitionInProgress()
       
   644      )
       
   645     {
       
   646     // Only blank the cba if self timer is not enabled
       
   647     // or it is enabled but not counting down
       
   648     if ( !selfTimerEnabled
       
   649       || (  selfTimerEnabled && !appui->SelfTimer()->IsActive() )
       
   650        )
       
   651       {
       
   652       static_cast<CCamViewBase*>( &iView )->BlankSoftkeysL();
       
   653       }
       
   654      if ( iController.IsTouchScreenSupported() )
       
   655          {
       
   656          CAknToolbar* fixedToolbar = appui->CurrentFixedToolbar();
       
   657          if ( fixedToolbar )
       
   658              {
       
   659              fixedToolbar->SetToolbarVisibility( EFalse );
       
   660              }
       
   661          }
       
   662     }
       
   663 
       
   664   if ( iController.IsTouchScreenSupported() )
       
   665       {
       
   666       // Hide the toolbar in case full press in burstmode
       
   667       if ( appui->IsBurstEnabled() )
       
   668           {
       
   669           CAknToolbar* fixedToolbar = appui->CurrentFixedToolbar();
       
   670           if ( fixedToolbar )
       
   671               {
       
   672               fixedToolbar->SetToolbarVisibility( EFalse );
       
   673               }
       
   674           }
       
   675       }
       
   676 
       
   677   PRINT( _L("Camera <= CCamStillPreCaptureContainer::HandleCaptureKeyEventL"))
       
   678   return keyResponse;
       
   679   }
       
   680 
       
   681 
       
   682 // ----------------------------------------------------
       
   683 // CCamStillPreCaptureContainer::HandleShutterKeyEventL
       
   684 // Change the current capture state following shutter
       
   685 // key events
       
   686 // ----------------------------------------------------
       
   687 //
       
   688 TKeyResponse
       
   689 CCamStillPreCaptureContainer::HandleShutterKeyEventL( const TKeyEvent& aKeyEvent,
       
   690                                                             TEventCode aType )
       
   691   {
       
   692   CCamAppUi* appui = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
       
   693   __ASSERT_DEBUG(appui, CamPanic(ECamPanicNullPointer));
       
   694   TBool MSKCapture(EFalse);
       
   695   if ( !appui->IsToolBarVisible()
       
   696        && aKeyEvent.iScanCode == EStdKeyDevice3
       
   697        && iController.UiConfigManagerPtr()
       
   698        && iController.UiConfigManagerPtr()->IsOpticalJoyStickSupported() )
       
   699     {
       
   700     MSKCapture = ETrue;
       
   701     }
       
   702 
       
   703   // If the key is a half-press and down
       
   704 #ifndef __WINS__
       
   705     if ( aKeyEvent.iScanCode == iPrimaryCameraAFKeys[0]
       
   706 #else
       
   707     if ( aKeyEvent.iScanCode == EProductKeyCaptureHalf &&
       
   708          !( aKeyEvent.iModifiers & EModifierShift )
       
   709 #endif //__WINS__
       
   710         && iController.UiConfigManagerPtr()
       
   711         && iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
       
   712     {
       
   713     if ( aType == EEventKeyDown )
       
   714       {
       
   715       PRINT( _L("Camera => CCamStillPreCaptureContainer::HandleHalfKeyEventL DOWN"))
       
   716       PERF_MESSAGE_L2( EPerfMessageCaptureKeyHalfPressed );
       
   717       // If the shutter key has been half pressed
       
   718       iKeyShutter = ETrue; // Shutter key - first stage press -> start focussing...
       
   719 
       
   720       // check for active viewfinder and available space before proceeding with capture
       
   721       if ( !iController.IsViewFinding() || !appui->CheckMemoryL() )
       
   722         {
       
   723         // no memory available - stop capture
       
   724         return EKeyWasConsumed;
       
   725         }
       
   726 
       
   727       if ( iController.UiConfigManagerPtr()
       
   728            && iController.UiConfigManagerPtr()->IsAutoFocusSupported()
       
   729            && !appui->SelfTimerEnabled()
       
   730            && iPhotoSceneUsesReticule )
       
   731         {
       
   732         OstTrace0( CAMERAAPP_PERFORMANCE, CCAMSTILLPRECAPTURECONTAINER_HANDLESHUTTERKEYEVENTL, "e_CAM_APP_AF 1" );  //CCORAPP_AF_START
       
   733         iController.StartAutoFocus();
       
   734         }
       
   735 
       
   736       return EKeyWasConsumed;
       
   737       }
       
   738     else if ( aType == EEventKeyUp && !MSKCapture )
       
   739       {
       
   740       PRINT( _L("Camera => CCamStillPreCaptureContainer::HandleKeyEventL EProductKeyCaptureHalf up "))
       
   741       // If full shutter press is released
       
   742       // The order of conditions is important here as half shutter only release resets the
       
   743       // value of iKeyShutter
       
   744       if ( !iKeyShutter )
       
   745         {
       
   746         // Cancelling of a press-and-hold burst is handled
       
   747         // when the full-press is released, so nothing to
       
   748         // do when release the half-press apart from consume it
       
   749         PRINT( _L("Camera <= CCamStillPreCaptureContainer::HandleKeyEventL no action, return EKeyWasConsumed"))
       
   750         return EKeyWasConsumed;
       
   751         }
       
   752       else
       
   753         {
       
   754         // if half shutter only is released
       
   755         iKeyShutter = EFalse;
       
   756         TCamCaptureOperation operation = iController.CurrentOperation();
       
   757         // if not in self timer mode or about to start a capture
       
   758         if ( !appui->SelfTimerEnabled()
       
   759           && !iController.CapturePending()
       
   760           || ECamFocusing == operation
       
   761            )
       
   762           {
       
   763           // In timelapse mode, when stopping with capture key,
       
   764           // need this condition to avoid unnecessary entering
       
   765           // to no-operation while already completing.
       
   766           if( ECamCompleting != operation )
       
   767             {
       
   768             iController.CancelFocusAndCapture();
       
   769             }
       
   770 
       
   771           // if not currently capturing
       
   772           if ( ECamCapturing != operation )
       
   773             {
       
   774             appui->UpdateCba();
       
   775             }
       
   776           }
       
   777         return EKeyWasConsumed;
       
   778         }
       
   779       }
       
   780     else
       
   781       {
       
   782       // Removal of warning
       
   783       }
       
   784     }
       
   785   return EKeyWasNotConsumed;
       
   786   }
       
   787 
       
   788 
       
   789 
       
   790 // ---------------------------------------------------------------------------
       
   791 // DrawAdditionalIcons
       
   792 //
       
   793 // ---------------------------------------------------------------------------
       
   794 //
       
   795 void
       
   796 CCamStillPreCaptureContainer::DrawAdditionalIcons( CBitmapContext& aGc ) const
       
   797   {
       
   798   if( iXenonFlashSupported && iFlashIconVisible && ECamActiveCameraSecondary != iController.ActiveCamera() )
       
   799     {
       
   800     DrawFlashIcon( aGc );
       
   801     }
       
   802   }
       
   803 
       
   804 // ----------------------------------------------------
       
   805 // CCamStillPreCaptureContainer::ResolutionIndicatorIconPsiKey
       
   806 // Returns the PSI key relating to the array of resolution
       
   807 // indicator bitmaps.
       
   808 // ----------------------------------------------------
       
   809 //
       
   810 TCamPsiKey CCamStillPreCaptureContainer::ResolutionIndicatorIconPsiKey() const
       
   811     {
       
   812     return ECamPsiPrecapStillQualityIconIds;
       
   813     }
       
   814 
       
   815 // ---------------------------------------------------------------------------
       
   816 // virtual GetAPResourceId
       
   817 // (From CCamPreCaptureContainerBase)
       
   818 //
       
   819 // Helper method to select the AP resource used to set AP items.
       
   820 // ---------------------------------------------------------------------------
       
   821 //
       
   822 TInt CCamStillPreCaptureContainer::GetAPResourceId() const
       
   823     {
       
   824     CCamAppUi* appUi =  static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
       
   825     TBool embedded   = appUi->IsEmbedded();
       
   826     TInt resId = 0;
       
   827     if( embedded )
       
   828         {
       
   829         if ( !appUi->IsSecondCameraEnabled() )
       
   830             {
       
   831             resId = R_CAM_EMB_STILL_PRE_CAPTURE_AP_ITEMS_ADVANCED;
       
   832             }
       
   833         }
       
   834     else
       
   835         {
       
   836         if ( !appUi->IsSecondCameraEnabled() )
       
   837             {
       
   838             resId = R_CAM_STILL_PRE_CAPTURE_AP_ITEMS_ADVANCED;
       
   839             }
       
   840         else
       
   841             {
       
   842             resId = R_CAM_STILL_PRE_CAPTURE_AP_ITEMS_SECONDARY;
       
   843             }
       
   844         }
       
   845     return resId;
       
   846     }
       
   847 
       
   848 // ---------------------------------------------------------------------------
       
   849 // CCamStillPreCaptureContainer::SizeChanged
       
   850 // Called by framework when the component size is changed
       
   851 // ---------------------------------------------------------------------------
       
   852 //
       
   853 void CCamStillPreCaptureContainer::SizeChanged()
       
   854   {
       
   855   CCamPreCaptureContainerBase::SizeChanged();
       
   856   if ( iXenonFlashSupported )
       
   857       {
       
   858       LayoutFlashIcon();
       
   859       }
       
   860   }
       
   861 
       
   862 
       
   863 // ---------------------------------------------------------------------------
       
   864 // HandleForegroundEventL
       
   865 // ---------------------------------------------------------------------------
       
   866 //
       
   867 void
       
   868 CCamStillPreCaptureContainer::HandleForegroundEventL( TBool aForeground )
       
   869   {
       
   870   PRINT( _L("Camera => CCamStillPreCaptureContainer::HandleForegroundEventL") )
       
   871 
       
   872   CCamPreCaptureContainerBase::HandleForegroundEventL( aForeground );
       
   873   if ( iXenonFlashSupported )
       
   874       {
       
   875 
       
   876       // Subscribe / unsubscribe from flash related events
       
   877       // When going to background -> unsubscribe
       
   878       // Otherwise -> subscribe
       
   879       SubscribeFlashEvents( aForeground );
       
   880       }
       
   881 
       
   882   PRINT( _L("Camera => CCamStillPreCaptureContainer::HandleForegroundEventL") )
       
   883   }
       
   884 
       
   885 
       
   886 
       
   887 // ---------------------------------------------------------------------------
       
   888 // CCamStillPreCaptureContainer::FlashIconVisible
       
   889 // Called when Xenon flash icon visibility changes
       
   890 // ---------------------------------------------------------------------------
       
   891 //
       
   892 void CCamStillPreCaptureContainer::FlashIconVisible( TBool aVisible )
       
   893   {
       
   894   PRINT( _L("Camera => CCamStillPreCaptureContainer::FlashIconVisible") )
       
   895   if( ECamActiveCameraSecondary == iController.ActiveCamera() )
       
   896     {
       
   897     // Do not draw the flash icon even if visible, if using secondary
       
   898     // camera, as it does not use the flash at all.
       
   899     return;
       
   900     }
       
   901 
       
   902 
       
   903   if( ECamCapturing  == iController.CurrentOperation() ||
       
   904       ECamCompleting == iController.CurrentOperation() )
       
   905     {
       
   906     if ( !iFlashIconVisible && aVisible  )
       
   907       {
       
   908       // During capture, if flash icon is currently invisible,
       
   909       // do not make it visible. Also if the state has not changed,
       
   910       // we don't need to redraw anything
       
   911       return;
       
   912       }
       
   913     }
       
   914 
       
   915   if( iFlashIconVisible != aVisible )
       
   916     {
       
   917     // Icon state has changed. Redraw.
       
   918 
       
   919     iFlashIconVisible = aVisible;
       
   920 
       
   921     // State changed, need to redraw
       
   922     ActivateGc();
       
   923 
       
   924     // Invalidate the flash icon area
       
   925     RWindow window = Window();
       
   926     window.Invalidate( iFlashIconRect );
       
   927     window.BeginRedraw( iFlashIconRect );
       
   928 
       
   929     // Redraw the background in that area
       
   930     Redraw( iFlashIconRect );
       
   931 
       
   932     // Draw the flash icon itself
       
   933     CWindowGc& gc = SystemGc();
       
   934     if( aVisible )
       
   935       {
       
   936       DrawFlashIcon( gc );
       
   937       }
       
   938 
       
   939     // Tell the window redraw is finished and deactivate Gc
       
   940     window.EndRedraw();
       
   941     DeactivateGc();
       
   942     }
       
   943   PRINT( _L("Camera <= CCamStillPreCaptureContainer::FlashIconVisible") )
       
   944   }
       
   945 
       
   946 
       
   947 
       
   948 // ---------------------------------------------------------------------------
       
   949 // CCamStillPreCaptureContainer::FlashError
       
   950 // Called when there was an error while recharging
       
   951 // the Xenon flash.
       
   952 // ---------------------------------------------------------------------------
       
   953 //
       
   954 void CCamStillPreCaptureContainer::FlashError()
       
   955   {
       
   956   }
       
   957 
       
   958 
       
   959 // ---------------------------------------------------------------------------
       
   960 // CCamStillPreCaptureContainer::InitFlashIconL
       
   961 //
       
   962 // ---------------------------------------------------------------------------
       
   963 //
       
   964 void CCamStillPreCaptureContainer::InitFlashIconL()
       
   965   {
       
   966   iFlashIconVisible = EFalse;
       
   967 
       
   968   // Init flash icon bitmap and mask
       
   969   TFileName resFileName;
       
   970   CamUtility::ResourceFileName( resFileName );
       
   971   TPtrC resname = resFileName;
       
   972 
       
   973   AknIconUtils::CreateIconL( iFlashBitmap,
       
   974                            iFlashBitmapMask,
       
   975                            resname,
       
   976                            EMbmCameraappQgn_indi_cam4_flash_on,
       
   977                            EMbmCameraappQgn_indi_cam4_flash_on_mask );
       
   978 
       
   979   // Subscribe to blink events
       
   980   if( CCamFlashStatus* flashStatus = iController.FlashStatus() )
       
   981     {
       
   982     flashStatus->Subscribe( this );
       
   983     iFlashIconVisible = flashStatus->FlashIconVisible();
       
   984     PRINT( _L("Camera :: CCamStillPreCaptureContainer::InitFlashIconL - Flash events subscribed") )
       
   985     }
       
   986   else
       
   987     {
       
   988     iFlashIconVisible = EFalse;
       
   989     }
       
   990   }
       
   991 
       
   992 
       
   993 // ---------------------------------------------------------------------------
       
   994 // CCamStillPreCaptureContainer::LayoutFlashIcon
       
   995 //
       
   996 // ---------------------------------------------------------------------------
       
   997 //
       
   998 void CCamStillPreCaptureContainer::LayoutFlashIcon()
       
   999   {
       
  1000   // Set rectangle
       
  1001     TRect rect;
       
  1002     AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, rect );
       
  1003     TInt cba =  AknLayoutUtils::CbaLocation() ==
       
  1004                 AknLayoutUtils::EAknCbaLocationLeft;
       
  1005     TAknLayoutRect parent;
       
  1006     parent.LayoutRect( rect, AknLayoutScalable_Apps::cam6_mode_pane( cba ) );
       
  1007     TAknLayoutRect l;
       
  1008     l.LayoutRect( parent.Rect(),
       
  1009                   AknLayoutScalable_Apps::cam6_mode_pane_g3( cba ) );
       
  1010     iFlashIconRect = l.Rect();
       
  1011     if( iFlashBitmap )
       
  1012       {
       
  1013       AknIconUtils::SetSize( iFlashBitmap, iFlashIconRect.Size() );
       
  1014       }
       
  1015   }
       
  1016 
       
  1017 // ---------------------------------------------------------------------------
       
  1018 // CCamStillPreCaptureContainer::DrawFlashIcon
       
  1019 //
       
  1020 // ---------------------------------------------------------------------------
       
  1021 //
       
  1022 void CCamStillPreCaptureContainer::DrawFlashIcon( CBitmapContext& aGc ) const
       
  1023   {
       
  1024   if( iFlashBitmap )
       
  1025     {
       
  1026     // aGc.DrawBitmap( iFlashIconRect, iFlashBitmap );
       
  1027     aGc.BitBltMasked( iFlashIconRect.iTl, iFlashBitmap, iFlashIconRect.Size(), iFlashBitmapMask, ETrue );
       
  1028     }
       
  1029   }
       
  1030 
       
  1031 // ---------------------------------------------------------------------------
       
  1032 // SubscribeFlashEvents
       
  1033 // ---------------------------------------------------------------------------
       
  1034 //
       
  1035 void CCamStillPreCaptureContainer::SubscribeFlashEvents( TBool aSubscribe )
       
  1036   {
       
  1037   if( CCamFlashStatus* flashStatus = iController.FlashStatus() )
       
  1038     {
       
  1039     if( aSubscribe )
       
  1040       {
       
  1041       // Re-subscribe when going to foreground
       
  1042       // Duplicate subscription is acceptable since only one observer can subscribe to
       
  1043       // flash related events.
       
  1044       flashStatus->Subscribe( this );
       
  1045       iFlashIconVisible = flashStatus->FlashIconVisible();
       
  1046       PRINT( _L("Camera :: CCamStillPreCaptureContainer::SubscribeFlashEvents - Flash events subscribed") )
       
  1047       }
       
  1048     else
       
  1049       {
       
  1050       // Un-subscribe when going to background
       
  1051       flashStatus->Subscribe( NULL );
       
  1052       iFlashIconVisible = EFalse;
       
  1053       PRINT( _L("Camera :: CCamStillPreCaptureContainer::SubscribeFlashEvents - Flash events unsubscribed") )
       
  1054       }
       
  1055     }
       
  1056   }
       
  1057 
       
  1058 // ---------------------------------------------------------------------------
       
  1059 // CCamStillPreCaptureContainer::MakeVisible
       
  1060 //
       
  1061 // Used to subscribe / unsubscribe from flash events when the control is
       
  1062 // activated / deactivated (standby mode is enabled)
       
  1063 // ---------------------------------------------------------------------------
       
  1064 //
       
  1065 void CCamStillPreCaptureContainer::MakeVisible( TBool aVisible )
       
  1066   {
       
  1067   PRINT1( _L("Camera => CCamPreCaptureContainerBase::MakeVisible %d"), aVisible )
       
  1068   if ( iXenonFlashSupported )
       
  1069       {
       
  1070       // Subscribe / unsubscribe from flash related events
       
  1071       // When going to background -> unsubscribe
       
  1072       // Otherwise -> subscribe
       
  1073       SubscribeFlashEvents( aVisible );
       
  1074 
       
  1075       }
       
  1076   CCamPreCaptureContainerBase::MakeVisible( aVisible );
       
  1077   PRINT( _L("Camera <= CCamPreCaptureContainerBase::MakeVisible") )
       
  1078   }
       
  1079 
       
  1080 
       
  1081 // -----------------------------------------------------------------------------
       
  1082 // CCamStillPreCaptureContainer::InitVfGridL
       
  1083 // -----------------------------------------------------------------------------
       
  1084 // 
       
  1085 void 
       
  1086 CCamStillPreCaptureContainer::InitVfGridL( const TRect& /*aRect*/ )
       
  1087   {
       
  1088   PRINT( _L("Camera => CCamStillPreCaptureContainer::InitVfGridL") );  
       
  1089   iVfGridRect = ViewFinderFrameRect(ECamControllerImage);
       
  1090 
       
  1091   // No vf grid in secondary camera.
       
  1092   if( ECamActiveCameraSecondary != iController.ActiveCamera() )
       
  1093     {
       
  1094     // Create grid drawer if not done yet
       
  1095     if( !iVfGridDrawer )
       
  1096       {
       
  1097       iVfGridDrawer = CCamVfGridFactory::CreateVfGridDrawerL( KGridDrawerUid );
       
  1098       }
       
  1099     ResetVFGridVisibility();
       
  1100   
       
  1101     PRINT( _L("Camera <> CCamStillPreCaptureContainer: Setting vf grid lines..") );  
       
  1102     
       
  1103     // Setting the lines for grid is specific operation
       
  1104     // for CCamLineVfGridDrawer class not defined in MCamVfGridDrawer interface.
       
  1105     CCamLineVfGridDrawer* ptr = static_cast<CCamLineVfGridDrawer*>( iVfGridDrawer );
       
  1106     ptr->SetLinesL  ( iVfGridRect, KGridHrzLines, KGridVrtLines, EFalse );
       
  1107     ptr->SetPenStyle( KGridStyle ); 
       
  1108     ptr->SetPenSize ( TSize( KGridThickness, KGridThickness ) );
       
  1109     ptr->SetPenColor( KGridColor );
       
  1110     }
       
  1111   else
       
  1112     {
       
  1113     PRINT( _L("Camera <> CCamStillPreCaptureContainer: Secondary cam active, no vf grid") );  
       
  1114     }
       
  1115   PRINT( _L("Camera <= CCamStillPreCaptureContainer::InitVfGridL") );  
       
  1116   }
       
  1117 // End of File