camerauis/cameraapp/generic/src/CamStillPreCaptureContainer.cpp
branchRCL_3
changeset 31 8f559c47d7fd
parent 27 53c8aa5d97a3
equal deleted inserted replaced
27:53c8aa5d97a3 31:8f559c47d7fd
    49 const TInt KGridVrtLines  = 2;
    49 const TInt KGridVrtLines  = 2;
    50 const TInt KGridThickness = 2;
    50 const TInt KGridThickness = 2;
    51 const TRgb KGridColor     = KRgbGray;
    51 const TRgb KGridColor     = KRgbGray;
    52 const CGraphicsContext::TPenStyle KGridStyle = CGraphicsContext::ESolidPen;
    52 const CGraphicsContext::TPenStyle KGridStyle = CGraphicsContext::ESolidPen;
    53 
    53 
    54 _LIT(KCamBitmapFile, "z:\\resource\\apps\\cameraapp.mif");
       
    55 const TSize KIconSize(35, 35);
       
    56 
       
    57 // ================= MEMBER FUNCTIONS =======================
    54 // ================= MEMBER FUNCTIONS =======================
    58 
    55 
    59 // ---------------------------------------------------------------------------
    56 // ---------------------------------------------------------------------------
    60 // CCamStillPreCaptureContainer::NewL
    57 // CCamStillPreCaptureContainer::NewL
    61 // Symbian OS two-phased constructor
    58 // Symbian OS two-phased constructor
    99         flashStatus->Subscribe( NULL );
    96         flashStatus->Subscribe( NULL );
   100 
    97 
   101       delete iFlashBitmap;
    98       delete iFlashBitmap;
   102       delete iFlashBitmapMask;
    99       delete iFlashBitmapMask;
   103       }
   100       }
   104   
       
   105   if ( iCaptureIcon )
       
   106       {
       
   107       delete iCaptureIcon;
       
   108       delete iCaptureMask;
       
   109       }
       
   110   
       
   111   PRINT( _L("Camera <= ~CCamStillPreCaptureContainer" ))
   101   PRINT( _L("Camera <= ~CCamStillPreCaptureContainer" ))
   112   }
   102   }
   113 
   103 
   114 // ---------------------------------------------------------
   104 // ---------------------------------------------------------
   115 // CCamStillPreCaptureContainer::ConstructL
   105 // CCamStillPreCaptureContainer::ConstructL
   158       OstTrace0( CAMERAAPP_PERFORMANCE, CCAMSTILLPRECAPTURECONTAINER_CONSTRUCTL, "e_CAM_APP_AP_SETUP 1" );
   148       OstTrace0( CAMERAAPP_PERFORMANCE, CCAMSTILLPRECAPTURECONTAINER_CONSTRUCTL, "e_CAM_APP_AP_SETUP 1" );
   159       static_cast<CCamPreCaptureContainerBase*>( this )
   149       static_cast<CCamPreCaptureContainerBase*>( this )
   160           ->SetupActivePaletteL( static_cast<CCamViewBase*>(&iView) );
   150           ->SetupActivePaletteL( static_cast<CCamViewBase*>(&iView) );
   161       OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMSTILLPRECAPTURECONTAINER_CONSTRUCTL, "e_CAM_APP_AP_SETUP 0" );
   151       OstTrace0( CAMERAAPP_PERFORMANCE, DUP1_CCAMSTILLPRECAPTURECONTAINER_CONSTRUCTL, "e_CAM_APP_AP_SETUP 0" );
   162       }
   152       }
   163   
       
   164   // Load capture icon
       
   165   AknIconUtils::CreateIconL(
       
   166            iCaptureIcon,
       
   167            iCaptureMask,
       
   168            KCamBitmapFile(),
       
   169            EMbmCameraappQgn_indi_cam4_capture,
       
   170            EMbmCameraappQgn_indi_cam4_capture_mask );
       
   171   AknIconUtils::SetSize( iCaptureIcon, KIconSize, EAspectRatioPreserved );
       
   172   AknIconUtils::SetSize( iCaptureMask, KIconSize, EAspectRatioPreserved );
       
   173 
   153 
   174   PRINT( _L("Camera <= CCamStillPreCaptureContainer::ConstructL" ))
   154   PRINT( _L("Camera <= CCamStillPreCaptureContainer::ConstructL" ))
   175   }
   155   }
   176 
   156 
   177 // ---------------------------------------------------------
   157 // ---------------------------------------------------------
   661       iKeyShutter = ETrue;
   641       iKeyShutter = ETrue;
   662       PRINT( _L("Camera <= CCamStillPreCaptureContainer: Flash not ready, ignore key"))
   642       PRINT( _L("Camera <= CCamStillPreCaptureContainer: Flash not ready, ignore key"))
   663       return EKeyWasNotConsumed;
   643       return EKeyWasNotConsumed;
   664       }
   644       }
   665     }
   645     }
       
   646   if ( iController.UiConfigManagerPtr() 
       
   647          && !iController.UiConfigManagerPtr()->IsAutoFocusSupported()
       
   648          && iController.IsTouchScreenSupported() )
       
   649          {
       
   650          CAknToolbar* fixedToolbar = appui->CurrentFixedToolbar();
       
   651          if ( fixedToolbar )
       
   652             {
       
   653              CAknToolbarExtension* extension = fixedToolbar->ToolbarExtension();
       
   654             if ( extension )
       
   655                 {
       
   656                  extension->SetShown( EFalse ); 
       
   657                 }
       
   658              }
       
   659          }
   666 
   660 
   667   // Go straight to capture
   661   // Go straight to capture
   668   keyResponse = appui->StartCaptureL( aKeyEvent );
   662   keyResponse = appui->StartCaptureL( aKeyEvent );
   669 
   663 
   670   // Blank out the softkeys if we are capturing
   664   // Blank out the softkeys if we are capturing