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: View class for still image pre capture view* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef CAMSTILLPRECAPTUREVIEW_H |
|
19 #define CAMSTILLPRECAPTUREVIEW_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "CamPreCaptureViewBase.h" |
|
23 |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CAknButton; |
|
27 class CAknToolbarExtension; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * View class for still image capture |
|
33 * |
|
34 * @since 2.8 |
|
35 */ |
|
36 class CCamStillPreCaptureView : public CCamPreCaptureViewBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * @param aController Reference to either the application controller |
|
43 * base class or test base class |
|
44 * @since 2.8 |
|
45 * @return pointer to the created CCamStillPreCaptureView object |
|
46 */ |
|
47 static CCamStillPreCaptureView* NewLC( CCamAppController& aController ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 * @since 2.8 |
|
52 */ |
|
53 virtual ~CCamStillPreCaptureView(); |
|
54 |
|
55 public: // Functions from base classes |
|
56 |
|
57 /** |
|
58 * From CAknView. |
|
59 * @since 2.8 |
|
60 * @return UID of view |
|
61 */ |
|
62 TUid Id() const; |
|
63 |
|
64 /** |
|
65 * From CAknView. |
|
66 * @since 2.8 |
|
67 */ |
|
68 void DoDeactivate(); |
|
69 |
|
70 /** |
|
71 * From CAknView Handle commands |
|
72 * @since 2.8 |
|
73 * @param aCommand command to be handled |
|
74 */ |
|
75 void HandleCommandL( TInt aCommand ); |
|
76 |
|
77 /** |
|
78 * From CAknView Handles the foreground/background event |
|
79 * @since 2.8 |
|
80 * @param aForeground ETrue if this view is on foreground, else EFalse. |
|
81 */ |
|
82 void HandleForegroundEventL( TBool aForeground ); |
|
83 |
|
84 /** |
|
85 * From CCamViewBase |
|
86 * Handle change of focus to another application |
|
87 * This only handles another application coming to the foreground when |
|
88 * the camera application is already in the background behind an eikon |
|
89 * server window |
|
90 * @since 2.8 |
|
91 */ |
|
92 void HandleFocusLossL(); |
|
93 |
|
94 /** |
|
95 * From MCamControllerObserver |
|
96 * @since 2.8 |
|
97 * @param aEvent The enumerated code for the event received |
|
98 * @param aError The error code associated with the event |
|
99 */ |
|
100 void HandleControllerEventL( TCamControllerEvent aEvent, |
|
101 TInt aError ); |
|
102 |
|
103 /** |
|
104 * From CAknView. |
|
105 * @since 2.8 |
|
106 * @param aPrevViewId the ID for previous view we are switching from |
|
107 * @param aCustomMessageId the Uid for message passed to this view |
|
108 * @param aCustomMessage descriptor containing data content for view specific message |
|
109 */ |
|
110 void DoActivateL( const TVwsViewId& aPreViewId, TUid aCustomMessageId, |
|
111 const TDesC8& aCustomMessage ); |
|
112 |
|
113 /** |
|
114 * From CCamViewBase. |
|
115 * Called to identify the help context for this view |
|
116 * @since 2.8 |
|
117 * @param aContext Help context object to populate with control context |
|
118 * information |
|
119 */ |
|
120 virtual void GetHelpContext( TCoeHelpContext& aContext ) const; |
|
121 |
|
122 /** |
|
123 * From CCamViewBase |
|
124 * Update the softkeys for the current situation. |
|
125 * @since 2.8 |
|
126 */ |
|
127 void UpdateCbaL(); |
|
128 |
|
129 public: // New functions |
|
130 |
|
131 /** |
|
132 * Update fixed toolbar icons according to current settings |
|
133 * @since S60 5.0 |
|
134 */ |
|
135 void UpdateToolbarIconsL(); |
|
136 |
|
137 /** |
|
138 * Try to start the capture with MSK command. |
|
139 * @since 9.1 |
|
140 * @return ETrue if started. |
|
141 */ |
|
142 TBool StartMskCaptureL(); |
|
143 |
|
144 // from base class MAknToolbarObserver |
|
145 |
|
146 void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar ); |
|
147 |
|
148 protected: // Functions from base classes |
|
149 |
|
150 /** |
|
151 * From CCamPreCaptureViewBase |
|
152 * Set the menu bar resource. |
|
153 */ |
|
154 virtual void SetMenuBar(); |
|
155 |
|
156 /** |
|
157 * From CCamPreCaptureViewBase Handle commands |
|
158 * Creates a photo capture setup menu |
|
159 * @since 2.8 |
|
160 */ |
|
161 void CreateCaptureSetupMenuL(); |
|
162 |
|
163 |
|
164 /** |
|
165 * Enter scene setting mode. |
|
166 * Creates a container to replace the normal container on the control stack. |
|
167 * Updates the Cba, title pane and navi pane. |
|
168 * @since 2.8 |
|
169 */ |
|
170 void SwitchToSceneSettingModeL(); |
|
171 |
|
172 /** |
|
173 * Enter InfoListBox mode |
|
174 * Creates a container to replace the normal container on the control stack. |
|
175 * Updates the Cba, title pane and navi pane. |
|
176 * @param aMode |
|
177 * @since 3.0 |
|
178 */ |
|
179 void SwitchToInfoListBoxL( TCamInfoListBoxMode aMode ); |
|
180 |
|
181 private: // New functions |
|
182 |
|
183 /** |
|
184 * C++ default constructor. |
|
185 * @param aController Reference to either the application controller |
|
186 * base class or test base class |
|
187 * @since 2.8 |
|
188 */ |
|
189 CCamStillPreCaptureView( CCamAppController& aController ); |
|
190 |
|
191 /** |
|
192 * By default Symbian 2nd phase constructor is private. |
|
193 * @since 2.8 |
|
194 */ |
|
195 void ConstructL(); |
|
196 |
|
197 |
|
198 /* |
|
199 * Updating Light sensitivity icons if supported |
|
200 */ |
|
201 void UpdateFlashIconsL(); |
|
202 |
|
203 /* |
|
204 * Updating Light sensitivity icons if supported |
|
205 */ |
|
206 void UpdateLightSensitivityIconsL(); |
|
207 |
|
208 /* |
|
209 * Update color tone specific icons if supported. |
|
210 */ |
|
211 void UpdateColorToneIconsL(); |
|
212 |
|
213 /* |
|
214 * Update white balance specific icons if supported. |
|
215 */ |
|
216 void UpdateWhiteBalanceIconsL(); |
|
217 |
|
218 /* |
|
219 * Update sharpness specific icons if supported. |
|
220 */ |
|
221 void UpdateSharpnessIconsL(); |
|
222 |
|
223 /* |
|
224 * Update exposure specific icons if supported. |
|
225 */ |
|
226 void UpdateExposureIconsL(); |
|
227 |
|
228 /* |
|
229 * Update contrast specific icons if supported. |
|
230 */ |
|
231 void UpdateContrastIconsL(); |
|
232 |
|
233 /* |
|
234 * Update self timer specific icons if supported. |
|
235 */ |
|
236 void UpdateSelfTimerIconsL(); |
|
237 |
|
238 /* |
|
239 * Update scene mode specific icons if supported. |
|
240 */ |
|
241 void UpdateSceneModeIconsL(); |
|
242 |
|
243 /* |
|
244 * Update scene mode specific icons if supported. |
|
245 */ |
|
246 void UpdateVFGridIconsL(); |
|
247 |
|
248 /* |
|
249 * Update scene mode specific icons if supported. |
|
250 */ |
|
251 void UpdateBurstModeIconsL(); |
|
252 /* |
|
253 * Update Face Tracking specific icons if supported. |
|
254 */ |
|
255 void UpdateFaceTrackingIconsL(); |
|
256 |
|
257 private: // Functions from base classes |
|
258 |
|
259 /** |
|
260 * From CCamViewBase |
|
261 * Set the view's title text |
|
262 * @since 2.8 |
|
263 */ |
|
264 void SetTitlePaneTextL(); |
|
265 |
|
266 /** |
|
267 * From CCamPreCaptureViewBase |
|
268 * Enter Viewfinder mode |
|
269 * @since 2.8 |
|
270 */ |
|
271 void StartViewFinder(); |
|
272 |
|
273 /** |
|
274 * From CCamPreCaptureViewBase |
|
275 * Exit Viewfinder mode |
|
276 * @since 2.8 |
|
277 */ |
|
278 void StopViewFinder(); |
|
279 |
|
280 /** |
|
281 * From CCamViewBase |
|
282 * Create the container associated with this view. |
|
283 * @since 2.8 |
|
284 */ |
|
285 void CreateContainerL(); |
|
286 |
|
287 private: // From MEikMenuObserver |
|
288 /** |
|
289 * From MEikMenuObserver Changes MenuPane dynamically |
|
290 * @param Resource Id |
|
291 * @param Handle to menu pane |
|
292 * @since 2.8 |
|
293 */ |
|
294 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
295 |
|
296 private: |
|
297 // Cache the previous controller operation state that we were informed about |
|
298 TCamCaptureOperation iPreviousControllerOperation; |
|
299 TBool iSoftkeyBlankIsNeeded; |
|
300 |
|
301 }; |
|
302 |
|
303 #endif // CAMSTILLIMAGEPRECAPTUREVIEW_H |
|
304 |
|
305 // End of File |
|