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: Manages all settings data. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CAMSETTINGSMODEL_H |
|
21 #define CAMSETTINGSMODEL_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 |
|
26 #include <eikenv.h> |
|
27 |
|
28 #include "Cam.hrh" |
|
29 #include "mcamsettingsmodel.h" |
|
30 #include "CamBurstModeObserver.h" |
|
31 #include "mcamsettingpreviewhandler.h" |
|
32 |
|
33 #include "camconfigurationconstants.h" |
|
34 |
|
35 // CONSTANTS |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class MCamSettingsModelObserver; |
|
39 class CCamVideoQualityLevel; |
|
40 class CCamStaticSettingsModel; |
|
41 class MCamStaticSettings; |
|
42 class CCamConfiguration; |
|
43 class CCameraUiConfigManager; |
|
44 |
|
45 // STRUCTS |
|
46 |
|
47 // CLASS DECLARATIONS |
|
48 |
|
49 /** |
|
50 * Manages all static settings data. |
|
51 * @since 2.8 |
|
52 */ |
|
53 class CCamSettingsModel : public CBase, |
|
54 public MCamSettingsModel, |
|
55 public MCamSettingPreviewHandler, |
|
56 /** to be removed*/public MCamBurstModeObserver |
|
57 { |
|
58 // ========================================================================= |
|
59 public: // Constructors and destructor |
|
60 |
|
61 /** |
|
62 * Symbian two-phased constructor. |
|
63 * @param aConfiguration |
|
64 * @since 2.8 |
|
65 * engine changes. |
|
66 */ |
|
67 static CCamSettingsModel* NewLC( CCamConfiguration& aConfiguration ); |
|
68 |
|
69 /** |
|
70 * Symbian two-phased constructor. |
|
71 * @param aConfiguration |
|
72 * @since 2.8 |
|
73 * engine changes. |
|
74 */ |
|
75 static CCamSettingsModel* NewL( CCamConfiguration& aConfiguration ); |
|
76 |
|
77 |
|
78 /** |
|
79 * Destructor. |
|
80 */ |
|
81 ~CCamSettingsModel(); |
|
82 |
|
83 public: |
|
84 /** |
|
85 * Saves user defined FT setting |
|
86 * @since S60 5.0 |
|
87 * @param None |
|
88 * @return None |
|
89 */ |
|
90 void StoreFaceTrackingValue(); |
|
91 |
|
92 |
|
93 /** |
|
94 * Returns the face tracking state as it was before the latest scene mode change |
|
95 */ |
|
96 TCamSettingsOnOff GetPreviousFaceTrack(); |
|
97 |
|
98 /** |
|
99 * Sets the face tracking state as it was before the latest scene mode change |
|
100 */ |
|
101 void SetPreviousFaceTrack( TCamSettingsOnOff aPreviousFaceTrack ); |
|
102 |
|
103 /** |
|
104 * Returns the scene mode that was in use before the current scene mode was selected |
|
105 */ |
|
106 TCamSceneId GetPreviousSceneMode(); |
|
107 |
|
108 /** |
|
109 * Sets the scene mode that was in use before the current scene mode was selected |
|
110 */ |
|
111 void SetPreviousSceneMode( TCamSceneId aPreviousSceneMode ); |
|
112 |
|
113 |
|
114 // ------------------------------------------------------------------------- |
|
115 // From base class MCamSettingsModel |
|
116 public: |
|
117 |
|
118 /** |
|
119 * Add a settings model observer. |
|
120 * Observers will be notified of settings changes. |
|
121 */ |
|
122 virtual void AttachObserverL( const MCamSettingsModelObserver* aObserver ); |
|
123 |
|
124 /** |
|
125 * Remove a settings model observer. |
|
126 */ |
|
127 virtual void DetachObserver( const MCamSettingsModelObserver* aObserver ); |
|
128 |
|
129 /** |
|
130 * Resets all user scene settings to their defaults. |
|
131 * @since 2.8 |
|
132 */ |
|
133 virtual void ResetUserSceneL(); |
|
134 |
|
135 /** |
|
136 * Returns the current integer value for the specified setting |
|
137 * @return the current integer setting value |
|
138 * @param aSettingItem specifies which setting item that want the value of. |
|
139 * @since 2.8 |
|
140 */ |
|
141 virtual TInt IntegerSettingValue( TInt aSettingItem ) const; |
|
142 |
|
143 /** |
|
144 * Returns the setting value for a specific field of a scene |
|
145 * @return the setting value |
|
146 * @param aSceneId specifies which scene. |
|
147 * @param aSceneId specifies which field of the scene. |
|
148 * @since 2.8 |
|
149 */ |
|
150 virtual TInt SceneSettingValue( TInt aSceneId, TInt aSceneField ) const; |
|
151 |
|
152 /** |
|
153 * Sets a new value for the specified integer setting |
|
154 * @param aSettingItem specifies which setting item that want to set the value of. |
|
155 * @param aSettingValue the new integer value for the specified setting item. |
|
156 * @since 2.8 |
|
157 */ |
|
158 virtual void SetIntegerSettingValueL( TInt aSettingItem, TInt aSettingValue ); |
|
159 |
|
160 /** |
|
161 * Sets a new text value for the specified setting |
|
162 * @param aSettingItem specifies which setting item that want to set the text value of. |
|
163 * @param aSettingValue the new text value for the specified setting item. |
|
164 * @since 2.8 |
|
165 */ |
|
166 virtual void SetTextSettingValueL( TInt aSettingItem, |
|
167 const TDesC& aSettingValue ); |
|
168 |
|
169 /** |
|
170 * Returns the current text value for the specified setting |
|
171 * @return the current text setting value |
|
172 * @param aSettingItem specifies which setting item that want the text value of. |
|
173 * @since 2.8 |
|
174 */ |
|
175 virtual TPtrC TextSettingValue( TInt aSettingItem ) const; |
|
176 |
|
177 /** |
|
178 * Returns whether a particular setting value can be set or not. |
|
179 * @return ETrue if can be set. Otherwise, EFalse. |
|
180 * @param aSettingValue the value in question. |
|
181 * @param aSettingItem the setting item in question. |
|
182 * @since 2.8 |
|
183 */ |
|
184 virtual TBool SettingValueEnabled( TInt aSettingItem, |
|
185 TInt aSettingValue ) const; |
|
186 |
|
187 /** |
|
188 * Get the default value for a setting item. |
|
189 * @param aSettingId The id of the setting. |
|
190 * @return The default value for setting item or KErrNotFound if not found. |
|
191 */ |
|
192 virtual TInt DynamicSettingDefaultValue( TInt aSettingId ) const; |
|
193 |
|
194 /** |
|
195 * Sets all dynamic settings to their defaults. |
|
196 * @since 2.8 |
|
197 */ |
|
198 virtual void SetDynamicSettingsToDefaults(); |
|
199 |
|
200 /** |
|
201 * Sets a single dynamic setting to its default. |
|
202 * @since 2.8 |
|
203 */ |
|
204 virtual void SetDynamicSettingToDefault(TInt aSettingItem); |
|
205 |
|
206 /** |
|
207 * Sets a single dynamic setting to scene default value. |
|
208 * @param aSceneId Scene which the default value is taken from. |
|
209 * @param aSceneField Id of the setting in scene data. |
|
210 * @param aSettingId Id of the setting in dynamic settings. |
|
211 * @param aVideoScene Is the scene a video scene. |
|
212 * @return KErrNotFound, if setting could not be set. |
|
213 */ |
|
214 virtual TInt SetDynamicSettingToSceneDefaultL( TInt aSceneId, |
|
215 TInt aSceneField, |
|
216 TInt aSettingId, |
|
217 TBool aVideoScene ); |
|
218 |
|
219 |
|
220 /** |
|
221 * Loads the static settings from shared data. Required to update |
|
222 * the settings whenever get foreground event, in case of external |
|
223 * changes to the settings. |
|
224 * @since 2.8 |
|
225 * @param aIsEmbedded Specifies whether the application is embedded |
|
226 * or not. |
|
227 */ |
|
228 virtual void LoadStaticSettingsL( TBool aIsEmbedded ); |
|
229 |
|
230 /** |
|
231 * Return handle to video quality level array |
|
232 * @since 2.8 |
|
233 * @return reference to array of video quality levels |
|
234 */ |
|
235 virtual const RPointerArray<CCamVideoQualityLevel>& VideoQualityArray(); |
|
236 |
|
237 /** |
|
238 * Return handle to video resolution array |
|
239 * @since 2.8 |
|
240 * @param return reference to array of video resolutions |
|
241 */ |
|
242 virtual const RArray<TSize>& VideoResolutions(); |
|
243 |
|
244 /** |
|
245 * Returns the image resolution for a given resolution index. |
|
246 * @since 2.8 |
|
247 * @param aIndex The index to get the resolution for |
|
248 * @returns The X and Y dimensions in pixels of the resolution. |
|
249 */ |
|
250 virtual TSize ImageResolutionFromIndex( TCamPhotoSizeId aIndex ); |
|
251 |
|
252 /** |
|
253 * Returns the current photo quality. |
|
254 * @return the quality. |
|
255 * @since 2.8 |
|
256 */ |
|
257 virtual TInt CurrentPhotoCompression() const; |
|
258 |
|
259 /** |
|
260 * Returns the current photo resolution from Settings |
|
261 * @return the resolution. |
|
262 * @since 2.8 |
|
263 */ |
|
264 virtual TCamPhotoSizeId CurrentPhotoResolution() const; |
|
265 |
|
266 /** |
|
267 * Returns the photo resolution for a particular quality |
|
268 * @return the resolution. |
|
269 * @param aQualityIndex The index of the quality |
|
270 * @since 3.0 |
|
271 */ |
|
272 virtual TCamPhotoSizeId PhotoResolution( TInt aQualityIndex ) const; |
|
273 |
|
274 /** |
|
275 * Stores the primary camera settings when changing to secondary camera |
|
276 * that they can be reapplied when changing back |
|
277 * @since 2.8 |
|
278 */ |
|
279 virtual void StorePrimaryCameraSettingsL(); |
|
280 |
|
281 /** |
|
282 * Restores the primary camera settings |
|
283 * @since 2.8 |
|
284 */ |
|
285 virtual void RestorePrimaryCameraSettingsL(); |
|
286 |
|
287 /** |
|
288 * Return variant info. |
|
289 */ |
|
290 virtual const TCamVariantInfo& VariantInfo(); |
|
291 |
|
292 /* |
|
293 * Reset repository file |
|
294 * @since3.0 |
|
295 */ |
|
296 virtual void ResetRepository(); |
|
297 |
|
298 // ------------------------------------------------------------------------- |
|
299 // From base class MCamSettingPreviewHandler |
|
300 public: |
|
301 |
|
302 /** |
|
303 * Activates preview for one setting. |
|
304 * Returns the preview value as setting value in ProvideCameraSettingL |
|
305 * until Commit or Cancel is called. |
|
306 * @param aSettingId The setting for which preview is set |
|
307 * @param aSettingValue The setting value used for preview |
|
308 * @leave Any system error code. |
|
309 */ |
|
310 virtual void ActivatePreviewL( const TCamSettingItemIds& aSettingId, |
|
311 TInt aSettingValue ); |
|
312 |
|
313 /** |
|
314 * Cancels the preview for one setting. |
|
315 * After this call ProvideCameraSettingL returns the actual setting value. |
|
316 * If the setting does not have active preview, such error is ignored. |
|
317 * @param aSettingId Id of the setting for which the preview is cancelled. |
|
318 */ |
|
319 virtual void CancelPreview( const TCamSettingItemIds& aSettingId ); |
|
320 |
|
321 |
|
322 /** |
|
323 * Cancels the preview for a set of settings. |
|
324 * If some of the settings do not have active preview, such error is ignored. |
|
325 */ |
|
326 virtual void CancelPreviews( const RArray<TCamSettingItemIds> aSettingIds ); |
|
327 |
|
328 /** |
|
329 * Cancels all previews. |
|
330 * No error reported, if no previews active. |
|
331 */ |
|
332 virtual void CancelAllPreviews(); |
|
333 |
|
334 /** |
|
335 * Commits the preview value for the given set of settings. |
|
336 * After this call completes, the preview is no more active for the setting. |
|
337 * If the call completes successfully, the preview is stored as the |
|
338 * actual setting value. If leave occurs, the preview is not stored. |
|
339 * @param aSettingId Id of the setting for which the preview is committed. |
|
340 * @leave KErrArgument There was no preview value for the given setting. |
|
341 * @leave Any system error code. |
|
342 */ |
|
343 virtual void CommitPreviewL( const TCamSettingItemIds& aSettingId ); |
|
344 |
|
345 /** |
|
346 * Commits the preview for a set of settings. |
|
347 * If some of the settings do not have active preview, such error is ignored. |
|
348 */ |
|
349 virtual void CommitPreviewsL( const RArray<TCamSettingItemIds>& aSettingIds ); |
|
350 |
|
351 /** |
|
352 * Commit previews for all settings with active preview. |
|
353 * @leave Any system error code. |
|
354 */ |
|
355 virtual void CommitAllPreviewsL(); |
|
356 |
|
357 /** |
|
358 * Get the set of settings with active preview. |
|
359 * Preview is active if it has been set with ActivatePreviewL |
|
360 * but not cancelled or committed after that. |
|
361 * @param aSettingIds Return the ids of the active settings in this array. |
|
362 */ |
|
363 virtual void ActivePreviewsL( RArray<TCamSettingItemIds>& aSettingIds ) const; |
|
364 |
|
365 |
|
366 // ------------------------------------------------------------------------- |
|
367 // New methods |
|
368 public: |
|
369 |
|
370 /* |
|
371 * Sets user scene setting to default |
|
372 */ |
|
373 void SetUserSceneDefault(); |
|
374 |
|
375 /* |
|
376 * Gets the handle to the settings model, which is used inturn by the |
|
377 * plugin to call the interfaces for performing needed actions. |
|
378 */ |
|
379 MCamStaticSettings& StaticSettingsModel() const; |
|
380 |
|
381 /** |
|
382 * Loads the static settings from shared data, or if unable to from the resource file. |
|
383 * @since 2.8 |
|
384 */ |
|
385 void LoadSettingsL(); |
|
386 |
|
387 /** |
|
388 * Saves the static settings to shared data. |
|
389 * @since 2.8 |
|
390 */ |
|
391 void SaveSettingsL() ; |
|
392 |
|
393 /* |
|
394 * Is Scene supported |
|
395 */ |
|
396 TBool IsImageSceneSupported( const TInt aSceneId ) const; |
|
397 |
|
398 /* |
|
399 * Is Scene supported |
|
400 */ |
|
401 TBool IsVideoSceneSupported( const TInt aSceneId ) const; |
|
402 |
|
403 /* |
|
404 * Returns UiConfigManager Ptr from StaticSettingsModel |
|
405 */ |
|
406 CCameraUiConfigManager* UiConfigManagerPtr(); |
|
407 private: |
|
408 |
|
409 /** |
|
410 * Saves one static setting to Central Repository. |
|
411 * @param aSettingId Id of the setting to be saved. |
|
412 * @since Camera 4.0 |
|
413 */ |
|
414 void SaveStaticSettingL( TCamSettingItemIds aSettingId ); |
|
415 |
|
416 /** |
|
417 * Get the associated settings list for given setting item. |
|
418 * @param aSettingId Id of the setting for which the list is requested. |
|
419 * @since Camera 4.0 |
|
420 */ |
|
421 RPointerArray<TIntSetting>* |
|
422 MapSettingItem2SettingsList( TCamSettingItemIds aSettingId ); |
|
423 |
|
424 // ------------------------------------------------------------------------- |
|
425 // Constructors |
|
426 private: |
|
427 |
|
428 /** |
|
429 * C++ constructor. |
|
430 * @since 2.8 |
|
431 */ |
|
432 CCamSettingsModel( CCamConfiguration& aConfiguration ); |
|
433 |
|
434 /** |
|
435 * C++ 2nd phase constructor. |
|
436 * @since 2.8 |
|
437 */ |
|
438 void ConstructL(); |
|
439 |
|
440 // ------------------------------------------------------------------------- |
|
441 // new functions |
|
442 private: |
|
443 |
|
444 // Notify setting model observers, that a setting item value has changed. |
|
445 void NotifyObservers( TCamSettingItemIds aSettingId, |
|
446 TInt aSettingValue ); |
|
447 |
|
448 void NotifyObservers( TCamSettingItemIds aSettingId, |
|
449 const TDesC& aSettingValue ); |
|
450 |
|
451 /** |
|
452 * Read variant flags from Central Repository. |
|
453 */ |
|
454 void ReadVariantFlagsL(); |
|
455 |
|
456 /** |
|
457 * Resets all user scene settings to their defaults without |
|
458 * activating them. |
|
459 * @since 2.8 |
|
460 */ |
|
461 void ResetUserSceneWithoutActivatingChangesL(); |
|
462 |
|
463 /** |
|
464 * Copies a user scene setting across to the capture setup settings. |
|
465 * @since 2.8 |
|
466 * @param aSettingItem the user scene setting to copy. |
|
467 */ |
|
468 void CopyUserSceneSettingToCaptureSettingL( TInt aSettingItem ); |
|
469 |
|
470 /** |
|
471 * Activates the current user scene settings. |
|
472 * @since 2.8 |
|
473 */ |
|
474 void ActivateUserSceneSettingsL(); |
|
475 |
|
476 /** |
|
477 * Returns whether a particular setting is an engine setting, or not. |
|
478 * @since 2.8 |
|
479 * @param aSettingItem The id of the setting item. |
|
480 * @return ETrue if an engine setting. Otherwise EFalse. |
|
481 */ |
|
482 TBool SettingIsForEngine( TInt aSettingItem ); |
|
483 |
|
484 /** |
|
485 * Searches in a settings list for a particular setting item.. |
|
486 * @param aSettingsList the setting list to search in. |
|
487 * @param aSettingItem the id of the setting item to look for. |
|
488 * @return the index of the setting item if found. Otherwise returns KErrNotFound . |
|
489 * @since 2.8 |
|
490 */ |
|
491 TInt SearchInSettingsListFor( |
|
492 const RPointerArray<TIntSetting>& aSettingsList, |
|
493 TInt aSettingItem ) const; |
|
494 |
|
495 |
|
496 /** |
|
497 * Finds a scene in a particular scene list. |
|
498 * @param aSceneItemId the id of the scene to search for. |
|
499 * @param aSceneList the scene list to search in. |
|
500 * @return the index to the scene in the list. |
|
501 * @since 2.8 |
|
502 */ |
|
503 TInt FindSceneInSceneList( |
|
504 TInt aSceneItemId, |
|
505 const RPointerArray<TSceneData>& aSceneList ) const; |
|
506 |
|
507 /** |
|
508 * Handles a change in the value for the user scene setting. |
|
509 * @param aSettingValue The new scene value. |
|
510 * @param aActivate Whether to activate the user scene changes |
|
511 * @since 2.8 |
|
512 */ |
|
513 void UserSceneHasChangedL( TInt aSettingValue, TBool aActivate ); |
|
514 |
|
515 /** |
|
516 * Handles a change in the value for the photo scene setting. |
|
517 * That is, it updates the rest of the photo dynamic setings. |
|
518 * @param the new scene value. |
|
519 * @since 2.8 |
|
520 */ |
|
521 void PhotoSceneHasChangedL( TInt aSettingValue ); |
|
522 /** |
|
523 * Handles a change in the value for the video scene setting. |
|
524 * That is, it updates the rest of the video dynamic setings. |
|
525 * @since 2.8 |
|
526 * @param aSettingValue The new scene value. |
|
527 */ |
|
528 void VideoSceneHasChangedL( TInt aSettingValue ); |
|
529 |
|
530 /** |
|
531 * Returns the default value of a setting for a video scene item. |
|
532 * @param aSceneId the id of the scene item. |
|
533 * @param aSetting the id of the setting item. |
|
534 * @return the default value |
|
535 * @since 2.8 |
|
536 */ |
|
537 TInt DefaultSettingValueForVideoScene( TInt aSceneId, TInt aSetting ) const; |
|
538 |
|
539 |
|
540 /** |
|
541 * Returns the maximum allowed quality for a photo scene. |
|
542 * @param the scene id. |
|
543 * @return the highest allowed quality. |
|
544 * @since 2.8 |
|
545 */ |
|
546 TInt PhotoSceneMaximumQuality( TInt aSceneId ) const; |
|
547 |
|
548 /** |
|
549 * Returns the current photo quality value. |
|
550 * @return the quality. |
|
551 * @since 2.8 |
|
552 */ |
|
553 TInt CurrentPhotoQualityValue() const; |
|
554 |
|
555 /** |
|
556 * Returns the photo quality array index. |
|
557 * @Param the photo quality id for the desired quality |
|
558 * @return the array index for the specified quality. |
|
559 * @since 2.8 |
|
560 */ |
|
561 TInt PhotoQualityArrayIndex(TInt aPhotoQualityId ) const; |
|
562 |
|
563 /** |
|
564 * Returns the default value of a setting for a particular scene item. |
|
565 * @param aSceneId the id of the scene item. |
|
566 * @param aSetting the id of the setting item. |
|
567 * @return the default value |
|
568 * @since 2.8 |
|
569 */ |
|
570 TInt DefaultSettingValueForScene( TInt aSceneId, TInt aSetting ) const; |
|
571 |
|
572 /** |
|
573 * Loads a list of dynamic settings from the resource file and |
|
574 * their default values. |
|
575 * @param aResourceId the id of the resource that contains the |
|
576 * settings items id's and their default values. |
|
577 * @param aSettingsList the list to populate with dynamic settings |
|
578 * from the resource file. |
|
579 * @param aDefaultsList the list to populate with default values |
|
580 * for the dynamic settings from the resource file. |
|
581 * @since 2.8 |
|
582 */ |
|
583 void LoadDynamicSettingsL( TInt aResourceId, |
|
584 RPointerArray<TIntSetting>& aSettingsList, |
|
585 RArray<TInt>& aDefaultsList ); |
|
586 |
|
587 /** |
|
588 * Loads a list of dynamic settings from the resource file |
|
589 * @param aResourceId the id of the resource that contains the |
|
590 * settings items id's and their default values. |
|
591 * @param aSettingsList the list to populate with dynamic settings |
|
592 * from the resource file. |
|
593 * @since 2.8 |
|
594 */ |
|
595 void LoadDynamicSettingsL( TInt aResourceId, |
|
596 RPointerArray<TIntSetting>& aSettingsList ); |
|
597 |
|
598 /** |
|
599 * Loads a list of scene settings from the resource file. |
|
600 * @param aResourceId the id of the resource in the resource file. |
|
601 * @param aSceneDataArray the array to populate with the resource. |
|
602 * @since 2.8 |
|
603 */ |
|
604 void LoadScenesDataL( TInt aResourceId, |
|
605 RPointerArray<TSceneData>& aSceneDataArray ); |
|
606 |
|
607 /** |
|
608 * Loads a list of scene settings from product specific header file. |
|
609 * @since 3.0 |
|
610 */ |
|
611 void LoadSceneDataL( TBool aPhotoSceneSettings = ETrue ); |
|
612 |
|
613 |
|
614 /** |
|
615 * Removes any previously loaded settings. |
|
616 * @since 2.8 |
|
617 */ |
|
618 void UnloadSettings(); |
|
619 |
|
620 /** |
|
621 * Removes any previously loaded static settings. |
|
622 * @since 2.8 |
|
623 */ |
|
624 void UnloadStaticSettings(); |
|
625 |
|
626 /** |
|
627 * Loads component resources |
|
628 */ |
|
629 void LoadResourcesL(); |
|
630 |
|
631 /** |
|
632 * Frees component resources |
|
633 */ |
|
634 void UnLoadResources(); |
|
635 |
|
636 /** |
|
637 * Backup and Restore Settings array |
|
638 * @param aSrc The source settings array |
|
639 * @param aDest The destination settings array |
|
640 * @param aRestore ETrue to restore |
|
641 * @since 5.1 |
|
642 */ |
|
643 void CopySettingsL(RPointerArray<TIntSetting>& aSrc, |
|
644 RPointerArray<TIntSetting>& aDest, |
|
645 TBool aRestore = EFalse); |
|
646 |
|
647 /** |
|
648 * Store UserScene Settings |
|
649 * @since 5.1 |
|
650 */ |
|
651 void StoreUserSceneSettingsL(); |
|
652 |
|
653 private: // Functions from base classes |
|
654 |
|
655 /** |
|
656 * From MCamBurstModeObserver |
|
657 * @since 2.8 |
|
658 * @param aActive whether or not burst mode is active |
|
659 * @param aStillModeActive whether or not still capture is active |
|
660 */ |
|
661 void BurstModeActiveL( TBool aActive, TBool aStillModeActive ); |
|
662 |
|
663 // ========================================================================= |
|
664 private: // data |
|
665 TCamSettingsOnOff iPreviousFaceTrack; // previous user defined FT setting |
|
666 TCamSceneId iPreviousSceneMode; // previous camera scene mode |
|
667 |
|
668 |
|
669 /** |
|
670 * Stores information for front/back camera settings |
|
671 * @since 2.8 |
|
672 */ |
|
673 class TCamCameraSettings |
|
674 { |
|
675 public: |
|
676 TInt iPhotoQuality; |
|
677 TInt iVideoQuality; |
|
678 }; |
|
679 |
|
680 // Reference to observer of this settings model. |
|
681 // MCamSettingsModelObserver& iObserver; |
|
682 RPointerArray<MCamSettingsModelObserver> iObservers; |
|
683 |
|
684 // Setting previews |
|
685 RPointerArray<TIntSetting> iSettingPreviews; |
|
686 |
|
687 // List of setting item id/value pairs for static photo settings. |
|
688 RPointerArray<TIntSetting> iDynamicPhotoIntSettings; |
|
689 |
|
690 //Backup of iDynamicPhotoIntSettings |
|
691 RPointerArray<TIntSetting> iDynamicPhotoIntSettingsBackup; |
|
692 |
|
693 |
|
694 // Parallel array to "iDynamicPhotoIntSettings" containing |
|
695 // default values. |
|
696 RArray<TInt> iDynamicPhotoIntDefaults; |
|
697 |
|
698 // List of setting item id/value pairs for dynamic photo settings. |
|
699 RPointerArray<TIntSetting> iDynamicVideoIntSettings; |
|
700 |
|
701 //Backup of iDynamicVideoIntSettings |
|
702 RPointerArray<TIntSetting> iDynamicVideoIntSettingsBackup; |
|
703 |
|
704 // Parallel array to "iDynamicVideoIntSettings" containing |
|
705 // default values. |
|
706 RArray<TInt> iDynamicVideoIntDefaults; |
|
707 |
|
708 // List of setting item id/value pairs for user scene settings. |
|
709 RPointerArray<TIntSetting> iUserSceneSettings; |
|
710 |
|
711 //Backup of iUserSceneSettings |
|
712 RPointerArray<TIntSetting> iUserSceneSettingsBackup; |
|
713 |
|
714 // Lists of scene data. |
|
715 RPointerArray<TSceneData> iPhotoScenes; |
|
716 RPointerArray<TSceneData> iVideoScenes; |
|
717 |
|
718 // Specifies whether the engine should be updated with settings such as |
|
719 // White Balance after being prepared. This is device dependent and so |
|
720 // will be read from the resource file. |
|
721 TBool iUpdateAfterPrepare; |
|
722 |
|
723 // Specifies whether this application is embedded or not. |
|
724 TBool iEmbedded; |
|
725 |
|
726 // Specifies whether burst mode is enabled or not |
|
727 TBool iBurstEnabled; |
|
728 |
|
729 // Reference to the CEikonEnv object, since it is used a lot. |
|
730 CEikonEnv* iEnv; |
|
731 |
|
732 // array of video quality level items read in from resource file |
|
733 RPointerArray < CCamVideoQualityLevel > iQualityLevels; |
|
734 |
|
735 // array of video resolutions read from resource |
|
736 RArray< TSize > iVideoResolutions; |
|
737 |
|
738 // array of photo quality levels read from resource |
|
739 RArray< TCamPhotoQualitySetting > iPhotoQualityLevels; |
|
740 |
|
741 // array of photo resolutions read from resource |
|
742 RArray< TSize > iPhotoResolutions; |
|
743 |
|
744 // Specifies whether the engine is ready for receiving |
|
745 // a video prepare event. |
|
746 TBool iEngineReadyForVideoPrepare; |
|
747 |
|
748 // Specifies whether the settings model is waiting to |
|
749 // prepare the engine with video. |
|
750 TBool iWaitingToPrepareVideo; |
|
751 |
|
752 // The cached primary camera settings |
|
753 TCamCameraSettings iPrimaryCameraSettings; |
|
754 // The cached secondary camera settings |
|
755 TCamCameraSettings iSecondaryCameraSettings; |
|
756 |
|
757 // Variant info |
|
758 TCamVariantInfo iVariantInfo; |
|
759 TInt iResourceFileOffset; |
|
760 |
|
761 // Number of image scene settings |
|
762 |
|
763 CCamConfiguration& iConfiguration; |
|
764 CCamStaticSettingsModel* iStaticModel; |
|
765 CCameraUiConfigManager* iUiConfigManager; // we dont own |
|
766 }; |
|
767 |
|
768 #endif // CAMSETTINGSMODEL_H |
|
769 |
|
770 // End of File |
|