33 * @lib CSCSettingsUi.lib |
33 * @lib CSCSettingsUi.lib |
34 * @since S60 v3.2 |
34 * @since S60 v3.2 |
35 */ |
35 */ |
36 NONSHARABLE_CLASS( CCSCSettingsUiMainView ) : public CAknView, |
36 NONSHARABLE_CLASS( CCSCSettingsUiMainView ) : public CAknView, |
37 public MEikListBoxObserver |
37 public MEikListBoxObserver |
38 { |
38 { |
39 public: |
39 public: |
40 |
40 |
41 /** |
41 /** |
42 * Two-phased constructor. |
42 * Two-phased constructor. |
43 * |
43 * |
44 * @param aModel for reference to the model |
44 * @param aModel for reference to the model |
45 */ |
45 */ |
46 static CCSCSettingsUiMainView* NewL( |
46 static CCSCSettingsUiMainView* NewL( |
47 CCSCSettingsUiModel& aModel ); |
47 CCSCSettingsUiModel& aModel ); |
48 |
48 |
49 |
49 /** |
50 /** |
50 * Two-phased constructor. |
51 * Two-phased constructor. |
51 * |
52 * |
52 * @param aModel for reference to the model |
53 * @param aModel for reference to the model |
53 */ |
54 */ |
54 static CCSCSettingsUiMainView* NewLC( |
55 static CCSCSettingsUiMainView* NewLC( |
55 CCSCSettingsUiModel& aModel ); |
56 CCSCSettingsUiModel& aModel ); |
56 |
57 |
57 /** |
58 |
58 * Destructor. |
59 /** |
59 */ |
60 * Destructor. |
60 virtual ~CCSCSettingsUiMainView(); |
61 */ |
61 |
62 virtual ~CCSCSettingsUiMainView(); |
62 /** |
63 |
63 * Processes situation when softkeys need to be changed. |
64 |
64 * |
65 /** |
65 * @since S60 v3.2 |
66 * Processes situation when softkeys need to be changed. |
66 */ |
67 * |
67 void UpdateSoftkeysL(); |
68 * @since S60 v3.2 |
68 |
69 */ |
69 /** |
70 void UpdateSoftkeysL( ); |
70 * Resets service settings when switching services. |
71 |
71 * |
72 /** |
72 * @since S60 v5.2 |
73 * Resets service settings when switching services. |
73 */ |
74 * |
74 void ResetViewL(); |
75 * @since S60 v5.2 |
75 |
76 */ |
76 // from base class CAknView |
77 void ResetViewL(); |
77 |
78 |
78 /** |
79 |
79 * From CAknView. |
80 // from base class CAknView |
80 */ |
81 |
81 TUid Id() const; |
82 /** |
82 |
83 * From CAknView. |
83 private: |
84 */ |
84 |
85 TUid Id() const; |
85 CCSCSettingsUiMainView( |
86 |
86 CCSCSettingsUiModel& aModel ); |
87 |
87 void ConstructL(); |
88 private: |
88 |
89 |
89 /** |
90 CCSCSettingsUiMainView( |
90 * Changes given service name to title pane. |
91 CCSCSettingsUiModel& aModel ); |
91 * |
92 |
92 * @since S60 v3.2 |
93 void ConstructL(); |
93 */ |
94 |
94 void SetTitleTextL(); |
95 |
95 |
96 /** |
96 /** |
97 * Changes given service name to title pane. |
97 * For checking if editing of preferred service setting is allowed |
98 * |
98 * |
99 * @since S60 v3.2 |
99 * @since S60 v3.2 |
100 */ |
100 * @return ETrue if editing allowed |
101 void SetTitleTextL(); |
101 */ |
102 |
102 TBool IsEditPreferredServiceSettingAllowedL(); |
103 |
103 |
104 /** |
104 /** |
105 * For checking if editing of preferred service setting is allowed |
105 * Shows preferred service setting page. |
106 * |
106 * |
107 * @since S60 v3.2 |
107 * @since S60 v5.0 |
108 * @return ETrue if editing allowed |
108 */ |
109 */ |
109 void ShowUsernameSettingPageL(); |
110 TBool IsEditPreferredServiceSettingAllowedL(); |
110 |
111 |
111 /** |
112 |
112 * Shows preferred service setting page. |
113 /** |
113 * |
114 * Shows preferred service setting page. |
114 * @since S60 v3.2 |
115 * |
115 */ |
116 * @since S60 v5.0 |
116 void ShowPasswordSettingPageL(); |
117 */ |
117 |
118 void ShowUsernameSettingPageL(); |
118 /** |
119 |
119 * Shows preferred service setting page. |
120 |
120 * |
121 /** |
121 * @since S60 v3.2 |
122 * Shows preferred service setting page. |
122 */ |
123 * |
123 void ShowPrefServiceSettingPageL(); |
124 * @since S60 v3.2 |
124 |
125 */ |
125 /** |
126 void ShowPasswordSettingPageL(); |
126 * Shows preferred service setting page when VCC is supported. |
127 |
127 * |
128 |
128 * @since S60 v5.0 |
129 /** |
129 */ |
130 * Shows preferred service setting page. |
130 void ShowVccPrefServiceSettingPageL(); |
131 * |
131 |
132 * @since S60 v3.2 |
132 /** |
133 */ |
133 * Shows IM tone selection list. |
134 void ShowPrefServiceSettingPageL(); |
134 * |
135 |
135 * @since S60 v5.0 |
136 |
136 */ |
137 /** |
137 void ShowImToneSelectionListL(); |
138 * Shows preferred service setting page when VCC is supported. |
138 |
139 * |
139 /** |
140 * @since S60 v5.0 |
140 * Handles 'change' middle softkey selection. |
141 */ |
141 * |
142 void ShowVccPrefServiceSettingPageL(); |
142 * @param aListBoxItem listbox item |
143 |
143 * @since S60 v5.0 |
144 |
144 */ |
145 /** |
145 void HandleMskChangeSelectionL( TMainListBoxItem aListBoxItem ); |
146 * Shows IM tone selection list. |
146 |
147 * |
147 /** |
148 * @since S60 v5.0 |
148 * Changes preferred telephony setting value. |
149 */ |
149 * From VoIP(PS) to CS or vice versa. |
150 void ShowImToneSelectionListL(); |
150 * @since S60 v3.2 |
151 |
151 */ |
152 /** |
152 void ChangePrefTelephonyValueL(); |
153 * Handles 'change' middle softkey selection. |
153 |
154 * |
154 /** |
155 * @param aListBoxItem listbox item |
155 * Changes handover notify tone value (on/off). |
156 * @since S60 v5.0 |
156 * @since S60 v5.0 |
157 */ |
157 */ |
158 void HandleMskChangeSelectionL( TMainListBoxItem aListBoxItem ); |
158 void ChangeHandoverNotifToneValueL(); |
159 |
159 |
160 /** |
160 /** |
161 * Changes preferred telephony setting value. |
161 * Appends resource texts to the des array. |
162 * From VoIP(PS) to CS or vice versa. |
162 * |
163 * @since S60 v3.2 |
163 * @since S60 v3.2 |
164 */ |
164 * @param aList Text array. |
165 void ChangePrefTelephonyValueL(); |
165 * @param aItem Text resource id. |
166 |
166 */ |
167 /** |
167 void AppendItemL(CDesCArrayFlat& aList, TInt aItem); |
168 * Changes handover notify tone value (on/off). |
168 |
169 * @since S60 v5.0 |
169 /** |
170 */ |
170 * Launches Connection Method Settings Ui for editing destinations. |
171 void ChangeHandoverNotifToneValueL(); |
171 * |
172 |
172 * @since S60 v5.0 |
173 /** |
173 */ |
174 * Appends resource texts to the des array. |
174 void LaunchCMSettingsUiL(); |
175 * |
175 |
176 * @since S60 v3.2 |
176 /** |
177 * @param aList Text array. |
177 * Handles returning to previous view where settingsui was launced. |
178 * @param aItem Text resource id. |
178 * |
179 */ |
179 * @since S60 v5.0 |
180 void AppendItemL(CDesCArrayFlat& aList, TInt aItem); |
180 */ |
181 |
181 void HandleReturnToPreviousViewL(); |
182 |
182 |
183 /** |
183 /** |
184 * Launches Connection Method Settings Ui for editing destinations. |
184 * Handles exist from settingsui. |
185 * |
185 * |
186 * @since S60 v5.0 |
186 * @since S60 v5.0 |
187 */ |
187 */ |
188 void LaunchCMSettingsUiL(); |
188 void HandleSettingsUiExitL(); |
189 |
189 |
190 |
190 // from base class CEikAppUi |
191 /** |
191 |
192 * Handles returning to previous view where settingsui was launced. |
192 /** |
193 * |
193 * From CEikAppUi. |
194 * @since S60 v5.0 |
194 */ |
195 */ |
195 void HandleCommandL( TInt aCommand ); |
196 void HandleReturnToPreviousViewL(); |
196 |
197 |
197 // from base class CAknView |
198 |
198 |
199 /** |
199 /** |
200 * Handles exist from settingsui. |
200 * From CAknView. |
201 * |
201 */ |
202 * @since S60 v5.0 |
202 void DoActivateL( |
203 */ |
203 const TVwsViewId& aPrevViewId, |
204 void HandleSettingsUiExitL(); |
204 TUid aCustomMessageId, |
205 |
205 const TDesC8& aCustomMessage ); |
206 |
206 |
207 // from base class CEikAppUi |
207 /** |
208 |
208 * From CAknView. |
209 /** |
209 */ |
210 * From CEikAppUi. |
210 void DoDeactivate(); |
211 */ |
211 |
212 void HandleCommandL( TInt aCommand ); |
212 // from base class MEikListBoxObserver |
213 |
213 |
214 |
214 /** |
215 // from base class CAknView |
215 * From MEikListBoxObserver. |
216 |
216 */ |
217 /** |
217 void HandleListBoxEventL( |
218 * From CAknView. |
218 CEikListBox* aListBox, |
219 */ |
219 TListBoxEvent aEventType ); |
220 void DoActivateL( |
220 |
221 const TVwsViewId& aPrevViewId, |
221 /** |
222 TUid aCustomMessageId, |
222 * From MEikListBoxObserver. |
223 const TDesC8& aCustomMessage ); |
223 */ |
224 |
224 void HandleListBoxSelectionL(); |
225 |
225 |
226 /** |
226 /** |
227 * From CAknView. |
227 * From MEikListBoxObserver. |
228 */ |
228 */ |
229 void DoDeactivate(); |
229 void DynInitMenuPaneL( |
230 |
230 TInt aResourceId, |
231 |
231 CEikMenuPane* aMenuPane ); |
232 // from base class MEikListBoxObserver |
232 |
233 |
233 private: // data |
234 /** |
234 |
235 * From MEikListBoxObserver. |
235 /** |
236 */ |
236 * Handle to model class for settings handling. |
237 void HandleListBoxEventL( |
237 */ |
238 CEikListBox* aListBox, |
238 CCSCSettingsUiModel& iModel; |
239 TListBoxEvent aEventType ); |
239 |
240 |
240 /** |
241 |
241 * Handle to title pane. |
242 /** |
242 * Not own. |
243 * From MEikListBoxObserver. |
243 */ |
244 */ |
244 CAknTitlePane* iTitlePane; |
245 void HandleListBoxSelectionL(); |
245 |
246 |
246 /** |
247 |
247 * Container class for main view. |
248 /** |
248 * Own. |
249 * From MEikListBoxObserver. |
249 */ |
250 */ |
250 CCSCSettingsUiMainContainer* iContainer; |
251 void DynInitMenuPaneL( |
251 |
252 TInt aResourceId, |
252 /** |
253 CEikMenuPane* aMenuPane ); |
253 * Navigation pane. |
254 |
254 * Not own. |
255 private: // data |
255 */ |
256 |
256 CAknNavigationControlContainer* iNaviPane; |
257 /** |
257 |
258 * Handle to model class for settings handling. |
258 /** |
259 */ |
259 * Navigation decorator. |
260 CCSCSettingsUiModel& iModel; |
260 * Own. |
261 |
261 */ |
262 /** |
262 CAknNavigationDecorator* iNaviDecorator; |
263 * Handle to title pane. |
263 |
264 * Not own. |
264 /** |
265 */ |
265 * Flag for telling if IM tone selection list is open. |
266 CAknTitlePane* iTitlePane; |
266 */ |
267 |
267 TBool iImToneSelectionListOpen; |
268 /** |
268 |
269 * Container class for main view. |
269 /** |
270 * Own. |
270 * Flag for telling if service is deleted. |
271 */ |
271 */ |
272 CCSCSettingsUiMainContainer* iContainer; |
272 TBool iDeleted; |
273 |
|
274 CAknNavigationControlContainer* iNaviPane; |
|
275 |
|
276 CAknNavigationDecorator* iNaviDecorator; |
|
277 |
|
278 TBool iImToneSelectionListOpen; |
|
279 |
273 |
280 #ifdef _DEBUG |
274 #ifdef _DEBUG |
281 friend class UT_cscsettingsui; |
275 friend class UT_cscsettingsui; |
282 #endif |
276 #endif |
283 |
277 |
284 }; |
278 }; |
285 |
279 |
286 #endif // C_CSCSETTINGSUIMAINVIEW_H |
280 #endif // C_CSCSETTINGSUIMAINVIEW_H |
287 |
281 |