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: Class for creating, initializing and observing* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 #ifndef CAMCAPTURESETUPCONTROLHANDLER_H |
|
20 #define CAMCAPTURESETUPCONTROLHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 #include "CamSettings.hrh" |
|
26 #include "CamSettingsInternal.hrh" |
|
27 #include "CamSettingValueObserver.h" |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CCamAppController; |
|
33 class CCoeControl; |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Class to create, initialize and observe a capture set-up control |
|
39 * |
|
40 * @since 2.8 |
|
41 */ |
|
42 class CCamCaptureSetupControlHandler : public CBase, |
|
43 public MCamSettingValueObserver |
|
44 |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Constructor. |
|
50 * @since 2.8 |
|
51 * @param aController The application controller providing access to the |
|
52 * camera settings |
|
53 * @param aSettingType An enumeration value used to indicate the setting |
|
54 * to be edited |
|
55 */ |
|
56 CCamCaptureSetupControlHandler( CCamAppController& aController, |
|
57 TCamSettingItemIds aSettingType ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 * @since 2.8 |
|
62 */ |
|
63 virtual ~CCamCaptureSetupControlHandler(); |
|
64 |
|
65 public: // New functions |
|
66 |
|
67 /** |
|
68 * Create and initialize a new capture setup control |
|
69 * ownership of the control is transferred to the calling class. |
|
70 * @since 2.8 |
|
71 * @return A pointer to the new control |
|
72 */ |
|
73 CCoeControl* CreateCaptureSetupControlL( const CCoeControl* aParent, |
|
74 TBool aSkinnedBackGround = EFalse ); |
|
75 |
|
76 /** |
|
77 * From MCamSettingValueObserver |
|
78 * Handle an update to the setting that is created by the capture setup controller |
|
79 * @since 2.8 |
|
80 */ |
|
81 void HandleSettingValueUpdateL( TInt aNewValue ); |
|
82 |
|
83 /** |
|
84 * Return the id of the title pane resource for the current setting type |
|
85 * @since 2.8 |
|
86 * @return A title pane resource id |
|
87 */ |
|
88 TInt ControlTitleResourceId() const; |
|
89 |
|
90 /** |
|
91 * Whether or not the control requires a viewfinder preview pane |
|
92 * @since 2.8 |
|
93 * @return ETrue if the control needs a viewfinder pane, else EFalse |
|
94 */ |
|
95 TBool ControlUsesViewFinder() const; |
|
96 |
|
97 /** |
|
98 * Whether or not the control is of listbox type |
|
99 * @return ETrue if listbox, else EFalse |
|
100 */ |
|
101 TBool ControlIsListBox() const; |
|
102 |
|
103 /** |
|
104 * Whether or not the control is of slider type |
|
105 * @return ETrue if slider, else EFalse |
|
106 */ |
|
107 TBool ControlIsSlider() const; |
|
108 |
|
109 /** |
|
110 * Return the id of the position resource for the current setting type |
|
111 * @since 2.8 |
|
112 * @return A position resource id |
|
113 */ |
|
114 TInt ControlPositionResourceId() const; |
|
115 |
|
116 /** |
|
117 * Return the id of the viewfinder resource for the current setting type |
|
118 * @since 2.8 |
|
119 * @return A viewfinder resource id |
|
120 */ |
|
121 TInt ViewfinderResourceId() const; |
|
122 |
|
123 /** |
|
124 * Return Identifies which setting is being edited |
|
125 * @since 2.8 |
|
126 * @return Identifies which setting is being edited |
|
127 */ |
|
128 TCamSettingItemIds SettingType() const; |
|
129 |
|
130 private: |
|
131 |
|
132 /** |
|
133 * Return the id of the resource to construct the control |
|
134 * @since 2.8 |
|
135 * @return the control's resource id |
|
136 */ |
|
137 TInt ResourceForControl() const; |
|
138 |
|
139 private: // Data |
|
140 // Provides access to the settings model |
|
141 CCamAppController& iController; |
|
142 // Identifies which setting is being edited |
|
143 TCamSettingItemIds iSettingType; |
|
144 }; |
|
145 |
|
146 #endif // CAMCAPTURESETUPCONTROLHANDLER_H |
|
147 |
|
148 // End of File |
|