|
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: White balance feature. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_VTUIWHITEBALANCE_H |
|
20 #define C_VTUIWHITEBALANCE_H |
|
21 |
|
22 #include <mvtengcamerapreferences.h> |
|
23 #include "cvtuiprefsettinglistbase.h" |
|
24 #include "tvtuicomponentstate.h" |
|
25 #include "mvtuicomponent.h" |
|
26 #include "mvtuilayoutchangeobserver.h" |
|
27 |
|
28 /** |
|
29 * TVtUiWhiteBalanceComponentState |
|
30 * |
|
31 * Video quality componentstate definition. |
|
32 * |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 class TVtUiWhiteBalanceComponentState : public TVtUiComponentState |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Constructor |
|
42 * @param aComponent Reference to component. |
|
43 */ |
|
44 TVtUiWhiteBalanceComponentState( MVtUiComponent& aComponent ); |
|
45 |
|
46 }; |
|
47 |
|
48 /** |
|
49 * CVtUiWhiteBalance |
|
50 * |
|
51 * White balance UI feature definition. |
|
52 * |
|
53 * @since S60 v3.2 |
|
54 */ |
|
55 class CVtUiWhiteBalance : public CVtUiPrefSettingListBase, |
|
56 public MVtUiComponent, public MVtUiLayoutChangeObserver |
|
57 { |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Static constructor |
|
63 * @param aFeatureManager Reference to feature manager. |
|
64 */ |
|
65 static CVtUiWhiteBalance* NewL( CVtUiFeatureManager& aFeatureManager ); |
|
66 |
|
67 /** |
|
68 * Destructor |
|
69 */ |
|
70 ~CVtUiWhiteBalance(); |
|
71 |
|
72 public: // from MVtUiFeature |
|
73 |
|
74 /** |
|
75 * @see MVtUiFeature::StartL |
|
76 */ |
|
77 void StartL(); |
|
78 |
|
79 /** |
|
80 * @see MVtUiFeature:Stop |
|
81 */ |
|
82 void Stop(); |
|
83 |
|
84 /** |
|
85 * @see MVtUiFeature::InitFeatureL |
|
86 */ |
|
87 void InitFeatureL(); |
|
88 |
|
89 public: // from MVtUiComponent |
|
90 |
|
91 /** |
|
92 * @see MVtUiComponent::ComponentId |
|
93 */ |
|
94 MVtUiComponent::TComponentId ComponentId() const; |
|
95 |
|
96 /** |
|
97 * @see MVtUiComponent::ComponentAsControl |
|
98 */ |
|
99 CCoeControl* ComponentAsControl(); |
|
100 |
|
101 /** |
|
102 * @see MVtUiComponent::DoActivateL |
|
103 */ |
|
104 void DoActivateL(); |
|
105 |
|
106 /** |
|
107 * @see MVtUiComponent::DoDeactivateL |
|
108 */ |
|
109 void DoDeactivateL(); |
|
110 |
|
111 public: // from MVtUiComponentManager |
|
112 |
|
113 /** |
|
114 * @see MVtUiComponentManager::HandleLayoutChangeL |
|
115 */ |
|
116 void HandleLayoutChangeL(); |
|
117 |
|
118 protected: // from base class |
|
119 |
|
120 /** |
|
121 * @see CVtUiPrefSettingListBase::CurrentSelection |
|
122 */ |
|
123 virtual TInt CurrentSelection(); |
|
124 |
|
125 /** |
|
126 * @see CVtUiPrefSettingListBase::SetItemsL |
|
127 */ |
|
128 virtual void SetItemsL( CDesCArray& aArray ); |
|
129 |
|
130 /** |
|
131 * @see CVtUiPrefSettingListBase::SettingPageResId |
|
132 */ |
|
133 virtual TInt SettingPageResId() const; |
|
134 |
|
135 /** |
|
136 * @see CVtUiPrefSettingListBase::SettingPageItemChangedL |
|
137 */ |
|
138 virtual void SettingPageItemChangedL( TInt aIndex ); |
|
139 |
|
140 private: |
|
141 |
|
142 /** |
|
143 * Constructor |
|
144 */ |
|
145 CVtUiWhiteBalance( CVtUiFeatureManager& aFeatureManager ); |
|
146 |
|
147 // Maps white balance enum to array index |
|
148 TInt MapWBEnumToArrayIndex( MVtEngCameraPreferences::TWhiteBalance& |
|
149 aWhiteBalance ) const; |
|
150 |
|
151 // Maps arrya index to white balance enum |
|
152 MVtEngCameraPreferences::TWhiteBalance MapArrayIndexToWBEnum( TInt aIndex) const; |
|
153 |
|
154 // Callback function that stops the feature. |
|
155 static TInt DoStopL( TAny* aAny ); |
|
156 |
|
157 // Callback function that starts the feature. |
|
158 static TInt DoStartL( TAny* aAny ); |
|
159 |
|
160 private: |
|
161 |
|
162 // Component state |
|
163 TVtUiWhiteBalanceComponentState iComponentState; |
|
164 |
|
165 }; |
|
166 |
|
167 #endif // CVTUIWHITEBALANCE_H |