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: Controls the switching between different control modes* |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef CAMUSERSCENESETUPVIEWBASE_H |
|
19 #define CAMUSERSCENESETUPVIEWBASE_H |
|
20 |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include "CamCaptureSetupViewBase.h" |
|
25 #include "CamControllerObservers.h" // MCamControllerObserver |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Controls the switching between different control modes |
|
33 * for the user scene setup. |
|
34 * |
|
35 * @since 2.8 |
|
36 */ |
|
37 |
|
38 class CCamUserSceneSetupViewBase : public CCamCaptureSetupViewBase, |
|
39 public MCamControllerObserver |
|
40 { |
|
41 protected: // data types |
|
42 |
|
43 |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 * @since 2.8 |
|
49 */ |
|
50 virtual ~CCamUserSceneSetupViewBase() = 0; |
|
51 |
|
52 public: // Functions from base classes |
|
53 |
|
54 /** |
|
55 * From CAknView Handle commands |
|
56 * @since 2.8 |
|
57 * @param aCommand command to be handled |
|
58 */ |
|
59 void HandleCommandL( TInt aCommand ); |
|
60 |
|
61 /** |
|
62 * From CAknView Handles the foreground/background event |
|
63 * @since 2.8 |
|
64 * @param aForeground ETrue if this view is on foreground, else EFalse. |
|
65 */ |
|
66 void HandleForegroundEventL( TBool aForeground ); |
|
67 |
|
68 /** |
|
69 * From CAknView activate the view |
|
70 * @param aPrevViewId the id of the previously active view. |
|
71 * @param aCustomMessageId the id of the custom message |
|
72 * @param aCustomMessage the custom message |
|
73 * @return void |
|
74 * @since 2.8 |
|
75 */ |
|
76 void DoActivateL( const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/, |
|
77 const TDesC8& /*aCustomMessage*/ ); |
|
78 |
|
79 /** |
|
80 * From CAknView deactivate the view (free resources) |
|
81 * @return void |
|
82 * @since 2.8 |
|
83 */ |
|
84 void DoDeactivate(); |
|
85 |
|
86 /** |
|
87 * From MCamControllerObserver |
|
88 * @since 2.8 |
|
89 * @param aEvent The enumerated code for the event received |
|
90 * @param aError The error code associated with the event |
|
91 */ |
|
92 void HandleControllerEventL( TCamControllerEvent aEvent, |
|
93 TInt aError ); |
|
94 |
|
95 /** |
|
96 * From CCamCaptureSetupViewBase |
|
97 * Revert to normal mode |
|
98 * @since 2.8 |
|
99 */ |
|
100 virtual void ExitAllModesL(); |
|
101 |
|
102 protected: // Constructors etc. |
|
103 |
|
104 /** |
|
105 * C++ default constructor. |
|
106 * @param aController Reference to either the application controller |
|
107 * base class or test base class |
|
108 * @since 2.8 |
|
109 */ |
|
110 CCamUserSceneSetupViewBase( CCamAppController& aController ); |
|
111 |
|
112 protected: // New functions to be implemented by derived classes. |
|
113 |
|
114 /** |
|
115 * Exits the user scene setup mode |
|
116 * @since 2.8 |
|
117 */ |
|
118 virtual void ExitUserSceneSetupModeL(); |
|
119 |
|
120 /** |
|
121 * Switches to the user scene setup mode. |
|
122 * @since 2.8 |
|
123 */ |
|
124 virtual void SwitchToUserSceneSetupModeL(); |
|
125 |
|
126 /** |
|
127 * Starts the viewfinder. |
|
128 * @since 2.8 |
|
129 */ |
|
130 virtual void StartViewFinder() = 0; |
|
131 /** |
|
132 * Stops the viewfinder. |
|
133 * @since 2.8 |
|
134 */ |
|
135 virtual void StopViewFinder() = 0; |
|
136 |
|
137 protected: // From base class |
|
138 |
|
139 /** |
|
140 * From CCamViewBase |
|
141 * Update the softkeys for the current situation. |
|
142 * @since 2.8 |
|
143 */ |
|
144 void UpdateCbaL(); |
|
145 |
|
146 /** |
|
147 * From CCamViewBase |
|
148 * Set the view's title text |
|
149 * @since 2.8 |
|
150 */ |
|
151 void SetTitlePaneTextL(); |
|
152 |
|
153 /** |
|
154 * Exit capture setup mode. |
|
155 * Replaces the normal container on the control stack. |
|
156 * Reverts the Cba and title pane. |
|
157 * Derived classes should override this method to add any additional |
|
158 * functionality they require e.g exiting the viewfinder and |
|
159 * reverting the navi pane if necessary when switching back to the view's |
|
160 * normal mode. |
|
161 * @since 2.8 |
|
162 */ |
|
163 virtual void ExitCaptureSetupModeL(); |
|
164 |
|
165 /** |
|
166 * Exit scene setting mode. |
|
167 * Replaces the normal container on the control stack. |
|
168 * Reverts the Cba and title pane. |
|
169 * @since 2.8 |
|
170 */ |
|
171 void ExitSceneSettingModeL(); |
|
172 |
|
173 /** |
|
174 * From CCamCaptureSetupViewBase |
|
175 * Exit InfoListBox |
|
176 * Updates the Cba, title pane and navi pane. |
|
177 * @since 3.0 |
|
178 */ |
|
179 virtual void ExitInfoListBoxL(); |
|
180 |
|
181 private: // New functions |
|
182 /** |
|
183 * Switches to the capture setup mode. |
|
184 * @param command that specifies which capture setup control to use |
|
185 * in the new mode. |
|
186 * @since 2.8 |
|
187 */ |
|
188 void SwitchToCaptureSetupModeL( TInt aSetupCommand ); |
|
189 |
|
190 /** |
|
191 * Returns true if only the user scene setup mode is active. |
|
192 * @since 2.8 |
|
193 */ |
|
194 TBool IsOnlyUserSceneSetupModeActive(); |
|
195 |
|
196 |
|
197 /** |
|
198 * Displays reset user scene settings cofirmation note |
|
199 * @since 3.0 |
|
200 */ |
|
201 void DisplayResetUserSceneDlgL(); |
|
202 |
|
203 protected: |
|
204 |
|
205 // Specifies whether the user scene setup mode is active |
|
206 TBool iUserSceneSetupModeActive; |
|
207 |
|
208 // Specifies whether the user scene page mode is active. |
|
209 TBool iUserScenePageModeActive; |
|
210 |
|
211 // Indicates that user has pressed cancel to close this view. |
|
212 TBool iCancelRequest; |
|
213 |
|
214 // Indicates that user has pressed OK to close this view. |
|
215 TBool iOkRequest; |
|
216 |
|
217 // Indicates that Viewfinder start has been requested. View switch |
|
218 // should not occur until viewfinder start has completed. |
|
219 TBool iVFRequested; |
|
220 |
|
221 //Boolean to check if a popup is whats generating a background event |
|
222 TBool iNotifierPopupShowing; |
|
223 }; |
|
224 |
|
225 #endif // CAMUSERSCENESETUPVIEWBASE_H |
|
226 |
|
227 // End of File |
|