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