1 /* |
|
2 * Copyright (c) 2005-2006 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: Shortcut settings plug-in container. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAISCUTSETTINGSCONTAINER_H |
|
20 #define CAISCUTSETTINGSCONTAINER_H |
|
21 |
|
22 #include <gsbasecontainer.h> |
|
23 |
|
24 #include "aiscutsettings.hrh" |
|
25 |
|
26 class CAknRadioButtonSettingPage; |
|
27 class CAknSettingPage; |
|
28 class CAknWaitDialog; |
|
29 class CAiScutSettingsModel; |
|
30 class CAiScutSettingsBkmList; |
|
31 class CAiScutSettingsItem; |
|
32 |
|
33 /** |
|
34 * Shortcut settings plug-in container |
|
35 * |
|
36 * @lib aiscutsettings.lib |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CAiScutSettingsContainer : public CGSBaseContainer |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 CAiScutSettingsContainer(); |
|
45 |
|
46 virtual ~CAiScutSettingsContainer(); |
|
47 |
|
48 /** |
|
49 * Sets pointer to settings plug-in model. |
|
50 * |
|
51 * @since S60 v3.2 |
|
52 * @param aModel Pointer to settings plug-in model |
|
53 */ |
|
54 void SetModel(CAiScutSettingsModel* aModel); |
|
55 |
|
56 /** |
|
57 * Chandles a setting change command |
|
58 * |
|
59 * @since S60 v3.2 |
|
60 */ |
|
61 void HandleChangeCommandL(); |
|
62 |
|
63 /** |
|
64 * Chandles a setting type change command |
|
65 * |
|
66 * @since S60 v3.2 |
|
67 */ |
|
68 void HandleChangeShortcutTypeCommandL(TAiScutSettingType aType); |
|
69 |
|
70 /** |
|
71 * Dialog showing changed |
|
72 * |
|
73 * @since S60 v3.2 |
|
74 */ |
|
75 TBool IsChangeDialogShowing(); |
|
76 |
|
77 /** |
|
78 * Close change dialog |
|
79 * |
|
80 * @since S60 v3.2 |
|
81 */ |
|
82 void CloseChangeDialog(); |
|
83 |
|
84 /** |
|
85 * Reset current list |
|
86 * |
|
87 * @since S60 v3.2 |
|
88 */ |
|
89 void ResetCurrentListL(TInt aIndex); |
|
90 |
|
91 /** |
|
92 * Hides the wait note dialog. |
|
93 * |
|
94 * @since S60 v3.2 |
|
95 */ |
|
96 void HideWaitNoteDialog(); |
|
97 |
|
98 /** |
|
99 * Dismisses the wait note dialog and possible |
|
100 * other dialogs and stops the change process. |
|
101 * |
|
102 * @since S60 v3.2 |
|
103 */ |
|
104 void StopShortcutChangeProcess(); |
|
105 |
|
106 private: |
|
107 |
|
108 void ConstructL(const TRect& aRect); |
|
109 |
|
110 // from base class CGSBaseContainer |
|
111 |
|
112 /** |
|
113 * From CGSBaseContainer |
|
114 * Constructs the settings listbox |
|
115 * |
|
116 * @since S60 v3.2 |
|
117 * @param aResLbxId Listbox resource id |
|
118 */ |
|
119 void ConstructListBoxL(TInt aResLbxId); |
|
120 |
|
121 /** |
|
122 * Chandles a setting change command to select application from a list |
|
123 * |
|
124 * @since S60 v3.2 |
|
125 * @param aItem Applist item to modify |
|
126 * @param aNew ETrue if selecting an application for first time, EFalse if not |
|
127 * @return ETrue if shortcut was changed. EFalse if not |
|
128 */ |
|
129 TBool HandleAppListChangeCommandL(CAiScutSettingsItem& aItem, TBool aNew = EFalse); |
|
130 |
|
131 /** |
|
132 * Chandles a setting change command to select bookmark from a list |
|
133 * |
|
134 * @since S60 v3.2 |
|
135 * @param aItem Applist item to modify |
|
136 * @param aNew ETrue if selecting an application for first time, EFalse if not |
|
137 * @return ETrue if shortcut was changed. EFalse if not |
|
138 */ |
|
139 TBool HandleBookmarkChangeCommandL(CAiScutSettingsItem& aItem, TBool aNew = EFalse); |
|
140 |
|
141 /** |
|
142 * Chandles a setting change command to edit an URL |
|
143 * |
|
144 * @since S60 v3.2 |
|
145 * @param aItem Applist item to modify |
|
146 * @param aNew ETrue if typing a new url, EFalse if editing an existing one |
|
147 * @return ETrue if shortcut was changed. EFalse if not |
|
148 */ |
|
149 TBool HandleUrlChangeCommandL(CAiScutSettingsItem& aItem, TBool aNew = EFalse); |
|
150 |
|
151 /** |
|
152 * Handles text editing in an CAknTextSettingPage |
|
153 * |
|
154 * @since S60 v3.2 |
|
155 * @param aResId Resource id for the text setting page |
|
156 * @param aDes The text to edit |
|
157 * @return ETrue if user pressed OK, ETrue if user pressed Cancel |
|
158 */ |
|
159 TBool EditTextL(TInt aResId, TDes& aDes); |
|
160 |
|
161 /** |
|
162 * Shows the wait note dialog. |
|
163 * |
|
164 * @since S60 v3.2 |
|
165 */ |
|
166 void ShowWaitNoteDialogL(); |
|
167 |
|
168 /** |
|
169 * Required for help. |
|
170 * |
|
171 */ |
|
172 void GetHelpContext(TCoeHelpContext& aContext) const; |
|
173 |
|
174 /** |
|
175 * |
|
176 */ |
|
177 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
178 |
|
179 /** |
|
180 * Checks if there is a need to update the middle softkey label. |
|
181 */ |
|
182 void CheckMiddleSoftkeyLabelL(); |
|
183 |
|
184 private: // data |
|
185 |
|
186 /** |
|
187 * Settings plug-in model. |
|
188 * Not own. |
|
189 */ |
|
190 CAiScutSettingsModel* iModel; |
|
191 |
|
192 /** |
|
193 * Application selection list page. |
|
194 * Own. |
|
195 */ |
|
196 CAknRadioButtonSettingPage* iAppListDialog; |
|
197 |
|
198 /** |
|
199 * Bookmark selection list page. |
|
200 * Own. |
|
201 */ |
|
202 CAknRadioButtonSettingPage* iBkmListDialog; |
|
203 |
|
204 /** |
|
205 * Text setting page. |
|
206 * Own. |
|
207 */ |
|
208 CAknSettingPage* iEditDialog; |
|
209 |
|
210 /** |
|
211 * Wait dialog that is shown when the application list is not ready. |
|
212 * Own. |
|
213 */ |
|
214 CAknWaitDialog* iWaitDialog; |
|
215 |
|
216 /** |
|
217 * |
|
218 */ |
|
219 TAiScutSettingType iOldType; |
|
220 |
|
221 /** |
|
222 * Is the change process stopped by outside "forces" |
|
223 */ |
|
224 TBool iChangeProcessStopped; |
|
225 |
|
226 /** |
|
227 * Is the change process in progress |
|
228 */ |
|
229 TBool iChangeProcessInProgress; |
|
230 |
|
231 }; |
|
232 |
|
233 #endif // CAISCUTSETTINGSCONTAINER_H |
|
234 |
|
235 // End of File. |
|