camerauis/cameraapp/generic/src/CamShootingModeContainer.cpp
branchRCL_3
changeset 31 8f559c47d7fd
parent 27 53c8aa5d97a3
child 35 e32fcfe0045f
equal deleted inserted replaced
27:53c8aa5d97a3 31:8f559c47d7fd
   496 // Returns the number of controls owned
   496 // Returns the number of controls owned
   497 // ---------------------------------------------------------
   497 // ---------------------------------------------------------
   498 //
   498 //
   499 TInt CCamShootingModeContainer::CountComponentControls() const
   499 TInt CCamShootingModeContainer::CountComponentControls() const
   500     {
   500     {
   501     return 1;
   501     return CCamContainerBase::CountComponentControls() + 1;
   502     }
   502     }
   503 
   503 
   504 // ---------------------------------------------------------
   504 // ---------------------------------------------------------
   505 // CCamShootingModeContainer::ComponentControl
   505 // CCamShootingModeContainer::ComponentControl
   506 // Returns the requested component control
   506 // Returns the requested component control
   507 // ---------------------------------------------------------
   507 // ---------------------------------------------------------
   508 //
   508 //
   509 CCoeControl* CCamShootingModeContainer::ComponentControl( TInt /*aIndex*/ ) const
   509 CCoeControl* CCamShootingModeContainer::ComponentControl( TInt aIndex ) const
   510     {
   510     {
   511     return iListBox;
   511     CCoeControl* control = CCamContainerBase::ComponentControl( aIndex );
       
   512     if( control == NULL )
       
   513         {
       
   514         control = iListBox;
       
   515         }
       
   516     return control;
   512     }
   517     }
   513 
   518 
   514 // ---------------------------------------------------------
   519 // ---------------------------------------------------------
   515 // CCamShootingModeContainer::Draw
   520 // CCamShootingModeContainer::Draw
   516 // Draw control
   521 // Draw control
   585         }
   590         }
   586     
   591     
   587     if ( iController.UiConfigManagerPtr()
   592     if ( iController.UiConfigManagerPtr()
   588          && iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
   593          && iController.UiConfigManagerPtr()->IsAutoFocusSupported() )
   589         {
   594         {
   590         if( aType == EEventKeyDown && IsShutterKeyL( aKeyEvent, aType ) )
   595         if( aType == EEventKey && IsShutterKeyL( aKeyEvent, aType ) )
   591             {
   596             {
   592             TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
   597             TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
   593             if( UserSceneHighlighted() )
   598             if( UserSceneHighlighted() )
   594                 {
   599                 {
   595                 iView.HandleCommandL( ECamCmdUserSceneSelected );
   600                 iView.HandleCommandL( ECamCmdUserSceneSelected );
   599                 iView.HandleCommandL( EAknSoftkeySelect );
   604                 iView.HandleCommandL( EAknSoftkeySelect );
   600                 }
   605                 }
   601             return response;
   606             return response;
   602             }
   607             }
   603         }
   608         }
   604     else if( aType == EEventKeyDown && IsCaptureKeyL( aKeyEvent, aType ) )
   609     else if( aType == EEventKey && IsCaptureKeyL( aKeyEvent, aType ) )
   605         {
   610         {
   606         TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
   611         TKeyResponse response = iListBox->OfferKeyEventL( aKeyEvent, aType );
   607         if( UserSceneHighlighted() )
   612         if( UserSceneHighlighted() )
   608             {
   613             {
   609             iView.HandleCommandL( ECamCmdUserSceneSelected );
   614             iView.HandleCommandL( ECamCmdUserSceneSelected );