|
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 ,TBool aSkinnedBackGround = EFalse |
|
57 ); |
|
58 |
|
59 /** |
|
60 * Second phase constructor |
|
61 * @since 2.8 |
|
62 * @param aParent Parent control |
|
63 * @param aArrayResourceId Listbox's item array |
|
64 * @param aSettingItem setting item id |
|
65 * @param aFlags Flags. By default 0 |
|
66 * @param aShootingModeListBox ETrue if the listbox is shooting mode setting style |
|
67 */ |
|
68 void ConstructL( const CCoeControl* aParent, |
|
69 TInt aArrayResourceId, |
|
70 TInt aSettingItem, |
|
71 TInt aFlags = 0, |
|
72 TBool aShootingModeListBox = ETrue, |
|
73 TBool aLocationSettingListBox = EFalse |
|
74 ); |
|
75 |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 virtual ~CCamCaptureSetupListBox(); |
|
80 |
|
81 public: // New methods |
|
82 |
|
83 /** |
|
84 * Initialize the list box |
|
85 * @since 2.8 |
|
86 * @param aCurrentValueId the current value for the setting being edited |
|
87 */ |
|
88 void InitializeL( TInt aCurrentValueId ); |
|
89 |
|
90 public: // methods from base classes |
|
91 |
|
92 /** |
|
93 * From CCoeControl. |
|
94 * Handles key events. |
|
95 * @since 2.8 |
|
96 * @param aKeyEvent The key event. |
|
97 * @param aType The type of the event. |
|
98 * @return Indicates whether or not the key event was used by this control. |
|
99 */ |
|
100 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
101 TEventCode aType ); |
|
102 |
|
103 /** |
|
104 * From CCoeControl. |
|
105 */ |
|
106 void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
107 |
|
108 |
|
109 private: // Data |
|
110 |
|
111 // observer that handles the control's update events |
|
112 MCamSettingValueObserver* iSettingObserver; |
|
113 |
|
114 // Layout for icon in list-box |
|
115 TAknLayoutRect iIconLayout; |
|
116 #ifndef CAMERAAPP_PLUGIN_BUILD |
|
117 CCamAppController& iController; |
|
118 #else |
|
119 MCamAppController& iController; |
|
120 #endif //CAMERAAPP_PLUGIN_BUILD |
|
121 |
|
122 protected: // Data |
|
123 TBool iSkinnedBackGround; |
|
124 }; |
|
125 |
|
126 #endif // CAMCAPTURESETUPLISTBOX_H |