camerauis/cameraapp/generic/src/CamCaptureSetupContainer.cpp
branchRCL_3
changeset 31 8f559c47d7fd
parent 27 53c8aa5d97a3
child 35 e32fcfe0045f
equal deleted inserted replaced
27:53c8aa5d97a3 31:8f559c47d7fd
   275 // Returns the number of controls owned
   275 // Returns the number of controls owned
   276 // ---------------------------------------------------------
   276 // ---------------------------------------------------------
   277 //
   277 //
   278 TInt CCamCaptureSetupContainer::CountComponentControls() const
   278 TInt CCamCaptureSetupContainer::CountComponentControls() const
   279     {
   279     {
   280     return 1; // Return the number of controls inside this container
   280     return CCamContainerBase::CountComponentControls() + 1; // Return the number of controls inside this container
   281     }
   281     }
   282 
   282 
   283 // ---------------------------------------------------------
   283 // ---------------------------------------------------------
   284 // CCamCaptureSetupContainer::ComponentControl
   284 // CCamCaptureSetupContainer::ComponentControl
   285 // ---------------------------------------------------------
   285 // ---------------------------------------------------------
   286 //
   286 //
   287 CCoeControl* CCamCaptureSetupContainer::ComponentControl(TInt /*aIndex*/) const
   287 CCoeControl* CCamCaptureSetupContainer::ComponentControl( TInt aIndex ) const
   288     {
   288     {
   289     return iCaptureSetupControl;
   289     CCoeControl* control = CCamContainerBase::ComponentControl( aIndex );
       
   290     if( control == NULL)
       
   291         {
       
   292         control = iCaptureSetupControl;
       
   293         }
       
   294     return control;
   290     }
   295     }
   291 
   296 
   292 // ---------------------------------------------------------
   297 // ---------------------------------------------------------
   293 // CCamCaptureSetupContainer::Draw
   298 // CCamCaptureSetupContainer::Draw
   294 // Draw control
   299 // Draw control
   393         ReserveAndStartVF();
   398         ReserveAndStartVF();
   394         }
   399         }
   395     
   400     
   396     // If the Ok button or shutter key is pressed, select the current item
   401     // If the Ok button or shutter key is pressed, select the current item
   397     if ( ( aKeyEvent.iCode == EKeyOK && aKeyEvent.iRepeats == 0 && aType == EEventKey ) ||
   402     if ( ( aKeyEvent.iCode == EKeyOK && aKeyEvent.iRepeats == 0 && aType == EEventKey ) ||
   398          ( aType == EEventKeyDown && 
   403          ( aType == EEventKey && 
   399          ( IsCaptureKeyL( aKeyEvent, aType ) || IsShutterKeyL( aKeyEvent, aType ) ) ) )  
   404          ( IsCaptureKeyL( aKeyEvent, aType ) || IsShutterKeyL( aKeyEvent, aType ) ) ) )  
   400         {
   405         {
   401         TKeyResponse response = iCaptureSetupControl->OfferKeyEventL( aKeyEvent, aType );
   406         TKeyResponse response = iCaptureSetupControl->OfferKeyEventL( aKeyEvent, aType );
   402         if ( aType == EEventKeyDown && response == EKeyWasNotConsumed &&
   407         if ( aType == EEventKey && response == EKeyWasNotConsumed &&
   403             ( ECamSettingItemDynamicPhotoFlash == iControlHandler.SettingType() ||
   408             ( ECamSettingItemDynamicPhotoFlash == iControlHandler.SettingType() ||
   404             ECamSettingItemDynamicSelfTimer == iControlHandler.SettingType() ) )
   409             ECamSettingItemDynamicSelfTimer == iControlHandler.SettingType() ) )
   405             {
   410             {
   406             iView.HandleCommandL( EAknSoftkeyCancel );
   411             iView.HandleCommandL( EAknSoftkeyCancel );
   407             }
   412             }