camerauis/cameraapp/generic/common/inc/CamCaptureSetupListBox.h
changeset 19 d9aefe59d544
parent 3 8b2d6d0384b0
child 21 fa6d9f75d6a6
child 28 3075d9b614e6
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
     1 /*
       
     2 * Copyright (c) 2007 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:  A list box that displays settings items with radio buttons*
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef CAMCAPTURESETUPLISTBOX_H
       
    19 #define CAMCAPTURESETUPLISTBOX_H
       
    20 
       
    21 //  INCLUDES
       
    22  
       
    23 #include <eiklbx.h>
       
    24 #include <AknUtils.h>
       
    25 
       
    26 #ifndef CAMERAAPP_PLUGIN_BUILD
       
    27   #include "CamAppController.h"
       
    28 #else
       
    29   #include "MCamAppController.h"
       
    30 #endif //CAMERAAPP_PLUGIN_BUILD
       
    31 
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class MCamSettingValueObserver;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  Main class of capture setup radio button list box.
       
    40 *
       
    41 *  @since 2.8
       
    42 */
       
    43 class CCamCaptureSetupListBox : public CEikListBox
       
    44 	{
       
    45 	public:  // Constructors and destructor
       
    46 
       
    47         /**
       
    48 		 * C++ default constructor.
       
    49 		 */
       
    50         CCamCaptureSetupListBox( MCamSettingValueObserver* aObserver
       
    51 #ifndef CAMERAAPP_PLUGIN_BUILD
       
    52         						 ,CCamAppController& aController 
       
    53 #else
       
    54                                  ,MCamAppController& aController
       
    55 #endif //CAMERAAPP_PLUGIN_BUILD
       
    56                                 );
       
    57 
       
    58         /**
       
    59 		 * Second phase constructor
       
    60 		 * @since 2.8
       
    61 		 * @param aParent Parent control
       
    62 		 * @param aArrayResourceId Listbox's item array
       
    63 		 * @param aSettingItem setting item id
       
    64 		 * @param aFlags Flags. By default 0
       
    65 		 * @param aShootingModeListBox ETrue if the listbox is shooting mode setting style
       
    66 		 */
       
    67 		void ConstructL( const CCoeControl* aParent,
       
    68                          TInt aArrayResourceId,
       
    69                          TInt aSettingItem,
       
    70 						 TInt aFlags = 0,						
       
    71 						 TBool aShootingModeListBox = ETrue,
       
    72 						 TBool aLocationSettingListBox = EFalse 
       
    73 						 );
       
    74 	       
       
    75 		/**
       
    76 		 * Destructor.
       
    77 		 */
       
    78 		virtual ~CCamCaptureSetupListBox();
       
    79 
       
    80     public:     // New methods
       
    81 
       
    82         /**
       
    83 		 * Initialize the list box
       
    84 		 * @since 2.8
       
    85 		 * @param aCurrentValueId the current value for the setting being edited
       
    86 		 */
       
    87         void InitializeL( TInt aCurrentValueId );
       
    88 
       
    89     public:     // methods from base classes
       
    90 
       
    91         /**
       
    92         * From CCoeControl. 
       
    93         * Handles key events.
       
    94         * @since 2.8
       
    95         * @param aKeyEvent The key event.
       
    96         * @param aType The type of the event.
       
    97         * @return Indicates whether or not the key event was used by this control.
       
    98         */
       
    99         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
   100                                     TEventCode aType );
       
   101                                     
       
   102         /**
       
   103         * From CCoeControl. 
       
   104         */
       
   105         void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
   106 
       
   107 
       
   108 	private:    // Data
       
   109 
       
   110         // observer that handles the control's update events
       
   111         MCamSettingValueObserver* iSettingObserver;
       
   112 
       
   113         // Layout for icon in list-box
       
   114         TAknLayoutRect iIconLayout;       
       
   115 #ifndef CAMERAAPP_PLUGIN_BUILD
       
   116         CCamAppController& iController;
       
   117 #else
       
   118         MCamAppController& iController;
       
   119 #endif //CAMERAAPP_PLUGIN_BUILD		
       
   120 	};
       
   121 
       
   122 #endif // CAMCAPTURESETUPLISTBOX_H