author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 15 Sep 2010 11:51:19 +0300 | |
branch | RCL_3 |
changeset 62 | f0c0788c4de2 |
parent 54 | bac7acad7cb3 |
permissions | -rw-r--r-- |
54 | 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef GS_CAMCORDERGSPLUGIN_H |
|
20 |
#define GS_CAMCORDERGSPLUGIN_H |
|
21 |
||
22 |
// Includes |
|
23 |
#include <aknview.h> |
|
24 |
#include <eikclb.h> |
|
25 |
#include <ConeResLoader.h> |
|
62
f0c0788c4de2
Revision: 201035
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
54
diff
changeset
|
26 |
#include <gsplugininterface.h> |
54 | 27 |
#include <gsbaseview.h> |
28 |
#include "CamStaticSettingsModel.h" |
|
29 |
||
30 |
// Classes referenced |
|
31 |
class CGSCamcorderPluginContainer; |
|
32 |
class CAknViewAppUi; |
|
33 |
class CGSBaseView; |
|
34 |
class MGSTabbedView; |
|
35 |
class CCamStaticSettingsModel; |
|
36 |
class CCamConfiguration; |
|
37 |
||
38 |
||
39 |
// Constants |
|
40 |
_LIT(KDirAndFile,"z:\\resource\\apps\\camerasettingsplugin.mif"); |
|
41 |
||
42 |
/** |
|
43 |
* UPDATE THIS: |
|
44 |
* |
|
45 |
* This UID is used for both the view UID and the ECOM plugin implementation |
|
46 |
* UID. |
|
47 |
*/ |
|
48 |
const TUid KGSCamcorderGSPluginUid = { 0x2000F8E0 }; |
|
49 |
||
50 |
_LIT( KGSCamcorderPluginResourceFileName, "z:\\resource\\gscamerapluginrsc.rsc" ); |
|
51 |
_LIT( KGSCamcorderPluginResourceFileNamev2, "z:\\resource\\gscamerapluginrscv2.rsc" ); |
|
52 |
||
53 |
// CLASS DECLARATION |
|
54 |
||
55 |
/** |
|
56 |
* CGSCamcorderPlugin view class. |
|
57 |
* |
|
58 |
* This is an CamcorderGS of the minimal GS plugin.CGSPluginInterface |
|
59 |
*/ |
|
60 |
class CGSCamcorderPlugin : public CGSBaseView |
|
61 |
{ |
|
62 |
||
63 |
public: // Constructors and destructor |
|
64 |
||
65 |
/** |
|
66 |
* Symbian OS two-phased constructor |
|
67 |
* @return |
|
68 |
* @since 3.1 |
|
69 |
*/ |
|
70 |
static CGSCamcorderPlugin* NewL( TAny* aInitParams ); |
|
71 |
||
72 |
/** |
|
73 |
* Destructor. |
|
74 |
*/ |
|
75 |
~CGSCamcorderPlugin(); |
|
76 |
||
77 |
||
78 |
public: // Functions from base classes |
|
79 |
||
80 |
/** |
|
81 |
* From CAknView, returns the views id. |
|
82 |
* @return Returns id of the view. |
|
83 |
* @since 3.1 |
|
84 |
*/ |
|
85 |
TUid Id() const; |
|
86 |
||
87 |
/** |
|
88 |
* From MEikCommandObserver, handles the menu based commands. |
|
89 |
* @param aCommand identifies the given command. |
|
90 |
* @since 3.1 |
|
91 |
*/ |
|
92 |
void HandleCommandL( TInt aCommand ); |
|
93 |
||
94 |
/** |
|
95 |
* Updates specific value to container |
|
96 |
* @param aListItem item index to update |
|
97 |
* @param aNewValue new value for the setting |
|
98 |
* @since 3.1 |
|
99 |
*/ |
|
100 |
void UpdateListBoxL( const TInt& aListItem, TInt aNewValue ); |
|
101 |
||
102 |
public: // From CGSPluginInterface |
|
103 |
||
104 |
/* |
|
105 |
* Check whether this view been lauched from General Settings. |
|
106 |
*/ |
|
107 |
TBool LaunchedFromGS() const; |
|
108 |
||
109 |
/** |
|
110 |
* Method for getting caption of this plugin. This should be the |
|
111 |
* localized name of the settings view to be shown in parent view. |
|
112 |
* @param aCaption pointer to Caption variable |
|
113 |
* @since 3.1 |
|
114 |
*/ |
|
115 |
void GetCaptionL( TDes& aCaption ) const; |
|
116 |
||
117 |
/** |
|
118 |
* Creates a new icon of desired type. Override this to provide custom |
|
119 |
* icons. Othervise default icon is used. Ownership of the created icon |
|
120 |
* is transferred to the caller. |
|
121 |
* |
|
122 |
* Icon type UIDs (use these defined constants): |
|
123 |
* KGSIconTypeLbxItem - ListBox item icon. |
|
124 |
* KGSIconTypeTab - Tab icon. |
|
125 |
* |
|
126 |
* @param aIconType UID Icon type UID of the icon to be created. |
|
127 |
* @return Pointer of the icon. NOTE: Ownership of this icon is |
|
128 |
* transferred to the caller. |
|
129 |
* @since 3.1 |
|
130 |
*/ |
|
131 |
CGulIcon* CreateIconL( const TUid aIconType ); |
|
132 |
||
133 |
/** |
|
134 |
* Method for reading the ID of the plugin provider category. See |
|
135 |
* TGSPluginProviderCategory. PluginProviderCategory can be used for |
|
136 |
* sorting plugins. |
|
137 |
* |
|
138 |
* Default value is EGSPluginProvider3rdParty. Override this function |
|
139 |
* to change the category. |
|
140 |
* |
|
141 |
* @return Plugin provider category ID defined by |
|
142 |
* TGSPluginProviderCategory |
|
143 |
* @since 3.1 |
|
144 |
*/ |
|
145 |
TInt PluginProviderCategory() const; |
|
146 |
||
147 |
/** |
|
148 |
* Method for checking, if plugin should be visible and used in GS FW. |
|
149 |
* (for example shown in listbox of the parent view). |
|
150 |
* |
|
151 |
* On default plugin is visible. Overwrite this function to enable or |
|
152 |
* disable your plugin dynamically. |
|
153 |
* |
|
154 |
* @return ETrue if plugin should be visible in GS. |
|
155 |
* @return EFalse if plugin should not be visible in GS. |
|
156 |
* @since 3.1 |
|
157 |
*/ |
|
158 |
TBool Visible() const; |
|
159 |
||
160 |
/** |
|
161 |
* Reserved for future use/plugin's custom functionality. This can be |
|
162 |
* overwritten if plugin needs to have custom functionality which cannot |
|
163 |
* be fulfilled otherwise. |
|
164 |
* @since 3.1 |
|
165 |
*/ |
|
166 |
TAny* CustomOperationL( TAny* aParam1, TAny* aParam2 ); |
|
167 |
||
168 |
/** |
|
169 |
* From CEikAppUi |
|
170 |
* Handle skin change event. |
|
171 |
* @since 3.1 |
|
172 |
*/ |
|
173 |
void HandleClientRectChange(); |
|
174 |
||
175 |
/** |
|
176 |
* From CAknView Activate this view |
|
177 |
* @param aPrevViewId |
|
178 |
* @param aCustomMessageId |
|
179 |
* @param aCustomMessage |
|
180 |
* @since 3.1 |
|
181 |
*/ |
|
182 |
void DoActivateL( const TVwsViewId& aPrevViewId, |
|
183 |
TUid aCustomMessageId, |
|
184 |
const TDesC8& aCustomMessage ); |
|
185 |
||
186 |
/** |
|
187 |
* From CAknView Deactivate this view |
|
188 |
* @since 3.1 |
|
189 |
*/ |
|
190 |
void DoDeactivate(); |
|
191 |
||
192 |
/** |
|
193 |
* Activate local views within this plug-in |
|
194 |
* @param aFeatureId ID of the view to be activated |
|
195 |
* @since 3.1 |
|
196 |
*/ |
|
197 |
void ActivateInternalViewL( TInt aFeatureId ); |
|
198 |
||
199 |
/** |
|
200 |
* Creates local views within this plug-in |
|
201 |
* @since 3.1 |
|
202 |
*/ |
|
203 |
void CreateLocalViewL(); |
|
204 |
||
205 |
/** |
|
206 |
* Get CamcorderGSPlugin's ccontainer. |
|
207 |
* @since 3.1 |
|
208 |
*/ |
|
209 |
CGSCamcorderPluginContainer* Container(); |
|
210 |
||
211 |
/** |
|
212 |
* From MGSTabbedView |
|
213 |
* @return Reference to owned tabbed views which should be included in |
|
214 |
* the sub-view's tab group. |
|
215 |
* @since 3.1 |
|
216 |
*/ |
|
217 |
CArrayPtrFlat<MGSTabbedView>* TabbedViews(); |
|
218 |
||
219 |
/** |
|
220 |
* Method used to check if the the Settings are |
|
221 |
* are for Secondary camera. |
|
222 |
*/ |
|
223 |
TBool IsSecondaryCameraSettings(); |
|
224 |
||
225 |
/* |
|
226 |
* Fetch the integer value from appropriate settings model |
|
227 |
*/ |
|
228 |
TInt IntegerSettingValue( const TInt aSettingItem ); |
|
229 |
||
230 |
/* |
|
231 |
* Fetch the text value from appropriate settings model |
|
232 |
*/ |
|
233 |
TPtrC TextSettingValue( const TInt aSettingItem ); |
|
234 |
||
235 |
/* |
|
236 |
* Set text value of a setting item using right settings model |
|
237 |
*/ |
|
238 |
void SetTextSettingValueL( TInt aSettingItem, |
|
239 |
const TDesC& aSettingValue ); |
|
240 |
||
241 |
/* |
|
242 |
* Set int value of a setting item using right settings model |
|
243 |
*/ |
|
244 |
void SetIntegerSettingValueL( TInt aSettingItem, |
|
245 |
TInt aSettingValue ); |
|
246 |
||
247 |
/* |
|
248 |
* Loads all video static settings from CenRep |
|
249 |
*/ |
|
250 |
void LoadVideoStaticSettingsL( TBool aResetFromGS ); |
|
251 |
||
252 |
/* |
|
253 |
* Loads all image static settings from CenRep |
|
254 |
*/ |
|
255 |
void LoadPhotoStaticSettingsL( TBool aResetFromGS ); |
|
256 |
||
257 |
/* |
|
258 |
* Display the reset factory settings dialog |
|
259 |
*/ |
|
260 |
TInt DisplayRestoreSettingsDlgL(); |
|
261 |
||
262 |
void SetSecondaryCameraSettings( TBool aSecondarySettings ); |
|
263 |
||
264 |
||
265 |
protected: |
|
266 |
||
267 |
/** |
|
268 |
* C++ default constructor. |
|
269 |
*/ |
|
270 |
CGSCamcorderPlugin(); |
|
271 |
||
272 |
/** |
|
273 |
* Symbian OS default constructor. |
|
274 |
*/ |
|
275 |
void ConstructL(); |
|
276 |
||
277 |
/** |
|
278 |
* Handles OK key press. |
|
279 |
* @since 3.1 |
|
280 |
*/ |
|
281 |
void HandleListBoxSelectionL(); |
|
282 |
||
283 |
/** |
|
284 |
* From MEikMenuObserver Dynamically customize menu items |
|
285 |
* @param aResourceId Menu pane resource ID |
|
286 |
* @param aMenuPane Menu pane pointer |
|
287 |
*/ |
|
288 |
void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
289 |
||
290 |
/** |
|
291 |
* Creates new container. |
|
292 |
* @since 3.1 |
|
293 |
*/ |
|
294 |
void NewContainerL(); |
|
295 |
||
296 |
protected: //Data |
|
297 |
||
298 |
RConeResourceLoader iResources; |
|
299 |
// Previous view to return when exiting CamcorderGSPlugin. |
|
300 |
TVwsViewId iParentView; |
|
301 |
||
302 |
private: |
|
303 |
void RemoveLocalViews(); |
|
304 |
||
305 |
private: |
|
306 |
CArrayPtrFlat<MGSTabbedView>* iViewArray; |
|
307 |
TBool iSecondaryCameraSettings; |
|
308 |
CCamStaticSettingsModel* iSettingsModel; |
|
309 |
CCamConfiguration* iConfiguration; |
|
310 |
TBool iReloadSettings; |
|
311 |
}; |
|
312 |
||
313 |
#endif // GS_CamcorderGSPLUGIN_H |