camerauis/cameraapp/generic/src/CamVideoPreCaptureContainer.cpp
branchRCL_3
changeset 18 51dda465e618
parent 16 d486e5e3cc9a
child 27 53c8aa5d97a3
equal deleted inserted replaced
16:d486e5e3cc9a 18:51dda465e618
    33 #include <cameraapp.mbg>
    33 #include <cameraapp.mbg>
    34 #include <eikappui.h>	// For CCoeAppUiBase
    34 #include <eikappui.h>	// For CCoeAppUiBase
    35 #include <eikapp.h>		// For CEikApplication
    35 #include <eikapp.h>		// For CEikApplication
    36 #include <AknIconUtils.h>
    36 #include <AknIconUtils.h>
    37 #include <akntoolbar.h>
    37 #include <akntoolbar.h>
       
    38 #include <akntoolbarextension.h>
    38 #include <barsread.h>
    39 #include <barsread.h>
    39 #include <cameraapp.rsg>
    40 #include <cameraapp.rsg>
    40 #include <vgacamsettings.rsg>
    41 #include <vgacamsettings.rsg>
    41 #include <aknlayoutscalable_apps.cdl.h>
    42 #include <aknlayoutscalable_apps.cdl.h>
    42 #include <layoutmetadata.cdl.h>
    43 #include <layoutmetadata.cdl.h>
   475 // ----------------------------------------------------
   476 // ----------------------------------------------------
   476 // CCamVideoPreCaptureContainer::HandleShutterKeyEventL
   477 // CCamVideoPreCaptureContainer::HandleShutterKeyEventL
   477 // Change the current capture state following shutter 
   478 // Change the current capture state following shutter 
   478 // key events
   479 // key events
   479 // ----------------------------------------------------
   480 // ----------------------------------------------------
   480 //  
   481 //
   481 TKeyResponse CCamVideoPreCaptureContainer::HandleShutterKeyEventL( const TKeyEvent& /*aKeyEvent*/,
   482 TKeyResponse CCamVideoPreCaptureContainer::HandleShutterKeyEventL( const TKeyEvent& /*aKeyEvent*/,
   482                                                                    TEventCode /*aType*/ )
   483                                                                    TEventCode aType )
   483     {    
   484     {
       
   485     CCamAppUi* appUi = static_cast<CCamAppUi*>( iEikonEnv->AppUi() );
       
   486           
       
   487     if ( appUi && 
       
   488          appUi->CurrentViewState() == ECamViewStatePreCapture &&
       
   489          aType == EEventKeyDown &&
       
   490          iController.IsTouchScreenSupported() )
       
   491         {
       
   492         CAknToolbar* toolbar = appUi->CurrentFixedToolbar();
       
   493         if ( toolbar )
       
   494             {
       
   495             CAknToolbarExtension* toolbarExtension =
       
   496             toolbar->ToolbarExtension();
       
   497             if ( toolbarExtension && toolbarExtension->IsShown() )
       
   498                 {
       
   499                 toolbarExtension->SetShown( EFalse );
       
   500                 return EKeyWasConsumed;
       
   501                 }
       
   502             }
       
   503         }
       
   504       
   484     return EKeyWasNotConsumed;
   505     return EKeyWasNotConsumed;
   485     }
   506     }
   486 
   507 
   487 // ---------------------------------------------------------
   508 // ---------------------------------------------------------
   488 // CCamVideoPreCaptureContainer::DrawAdditionalIcons
   509 // CCamVideoPreCaptureContainer::DrawAdditionalIcons