46 /** |
46 /** |
47 * destructor |
47 * destructor |
48 */ |
48 */ |
49 ~SettingsWidget(); |
49 ~SettingsWidget(); |
50 public: |
50 public: |
|
51 |
51 /** |
52 /** |
52 * Launching the settings widget |
53 * Launching the settings widget |
53 */ |
54 */ |
54 void launchSettingWidget(); |
55 void launchSettingWidget(); |
55 /** |
56 |
56 * Verifies internet selection |
57 /** |
57 * |
58 * returns true is delimeter is on internet mode otherwise false |
58 */ |
59 */ |
59 bool isInternetSearchOptionSelected(); |
60 bool isInternetSearchOptionSelected(); |
60 /** |
61 |
61 * unchecking subcategories under the main category once main category unchecked |
62 /** |
|
63 * unchecking subcategories under the main category once selectall unchecked |
62 */ |
64 */ |
63 void unCheckSubCategories(); |
65 void unCheckSubCategories(); |
64 /** |
66 |
65 * checking subcategories under the main category once main category checked |
67 /** |
|
68 * checking subcategories under the main category once selectall checked |
66 */ |
69 */ |
67 void checkSubCategories(); |
70 void checkSubCategories(); |
|
71 |
68 /** |
72 /** |
69 * storing settings to application ini file |
73 * storing settings to application ini file |
70 * |
|
71 */ |
74 */ |
72 void storeSettingsToiniFile(); |
75 void storeSettingsToiniFile(); |
73 /** |
76 |
74 * Load setting from application ini file |
77 /** |
75 * |
78 * Load setting from application ini file |
76 */ |
79 */ |
77 void loadDeviceSettings(); |
80 void loadDeviceSettings(); |
78 |
81 |
79 /** |
82 /** |
80 * Load default settings for search categories to ini file |
83 * Load settings whether mode in internet/indevice |
81 * |
84 */ |
82 */ |
|
83 |
|
84 void loadBaseSettings(); |
85 void loadBaseSettings(); |
85 |
86 |
86 /** |
87 /** |
87 * make "OK" button visible |
88 * make "OK" button visible |
88 * |
|
89 */ |
89 */ |
90 void setActionVisibility(); |
90 void setActionVisibility(); |
|
91 |
91 /** |
92 /** |
92 * enable default settings in the application ini file |
93 * enable default settings in the application ini file |
93 * |
|
94 */ |
94 */ |
95 void storeDefaultSettings(); |
95 void storeDefaultSettings(); |
96 |
96 |
97 /** |
97 /** |
98 * setting up gui for the settings widget |
98 * setting up gui for the settings widget |
99 */ |
99 */ |
100 |
|
101 void createGui(); |
100 void createGui(); |
102 |
101 |
103 /** |
102 /** |
104 * Filter out categories from the sql database provided by the engine |
103 * Filter out categories from the sql database provided by the engine |
105 * for only those categories that have been successfully harvested |
104 * for only those categories that have been successfully harvested |
106 */ |
105 */ |
107 |
|
108 void preparecategories(); |
106 void preparecategories(); |
109 |
107 |
110 /** |
108 /** |
111 * initilize the settings wizard while entering to the setting state |
109 * initilize the settings wizard while entering to the setting state |
112 */ |
110 */ |
113 |
|
114 void initialize(); |
111 void initialize(); |
115 |
112 |
|
113 /** |
|
114 * Load Internet handler and settings |
|
115 */ |
116 void loadIS(); |
116 void loadIS(); |
117 |
117 |
118 public slots: |
118 public slots: |
|
119 |
119 /** |
120 /** |
120 * will be called when settings OK is clicked |
121 * will be called when settings OK is clicked |
121 */ |
122 */ |
122 void checkBoxOkEvent(); |
123 void slotOkEvent(); |
|
124 |
123 /** |
125 /** |
124 * will be called when setting cancel is called |
126 * will be called when setting cancel is called |
125 */ |
127 */ |
126 void checkBoxCancelEvent(); |
128 void slotCancelEvent(); |
127 /** |
129 |
128 * will be called whenn any check box is checked |
130 /** |
129 */ |
131 * will be called when any check box is checked |
130 void itemChecked(int); |
132 */ |
|
133 void slotstateChanged(int); |
|
134 |
131 /** |
135 /** |
132 * slot called while clicking items added to the combobox |
136 * slot called while clicking items added to the combobox |
133 */ |
137 */ |
134 |
138 void slotcurrentIndexChanged(int); |
135 void q_currentIndexChanged(int); |
139 |
136 |
140 /** |
|
141 * to get the details of intenet service provider |
|
142 */ |
137 void slotproviderDetails(QString, HbIcon, int); |
143 void slotproviderDetails(QString, HbIcon, int); |
138 |
144 |
|
145 /** |
|
146 * to get the details of default intenet service provider |
|
147 */ |
139 void slotdefaultProvider(const int); |
148 void slotdefaultProvider(const int); |
140 |
149 |
|
150 /** |
|
151 * to get notify about selection of internet provider |
|
152 */ |
141 void slotitemSelected(int); |
153 void slotitemSelected(int); |
|
154 |
|
155 /** |
|
156 * to get notify about contentinfodb changes |
|
157 */ |
|
158 void slotdbChanged(); |
|
159 |
142 signals: |
160 signals: |
|
161 |
143 /** |
162 /** |
144 * Emitted when setting closed |
163 * Emitted when setting closed |
145 * |
|
146 */ |
164 */ |
147 void settingsEvent(bool); |
165 void settingsEvent(bool); |
148 /** |
166 |
149 * Emitted if settings changed for "go" button |
167 /** |
150 * |
168 * to notify the indevice search state to display suggestion links |
151 */ |
169 */ |
152 void settingsChanged(); |
|
153 /** |
|
154 * Emitted when categories selected or deselected |
|
155 * |
|
156 */ |
|
157 void selectedItemCategory(int, bool); |
|
158 |
|
159 void ISProvidersIcon(HbIcon, int); |
170 void ISProvidersIcon(HbIcon, int); |
160 |
171 |
161 private: |
172 private: |
|
173 |
162 /** |
174 /** |
163 * for Device category list |
175 * for Device category list |
164 */ |
176 */ |
165 QList<HbCheckBox*> mDeviceCheckBoxList; |
177 QList<HbCheckBox*> mDeviceCheckBoxList; |
|
178 |
166 /** |
179 /** |
167 * for Internet category list |
180 * for Internet category list |
168 */ |
181 */ |
169 QList<HbCheckBox*> mInternetCheckBoxList; |
182 QList<HbCheckBox*> mInternetCheckBoxList; |
170 /** |
183 |
171 * mapper to map checkboxes |
184 /** |
172 * |
185 * mapper to map checkboxes |
173 */ |
186 */ |
174 QSignalMapper* signalMapper; |
187 QSignalMapper* signalMapper; |
|
188 |
175 /** |
189 /** |
176 * settings widget popup |
190 * settings widget popup |
177 */ |
191 */ |
178 HbDialog *popup; |
192 HbDialog *popup; |
|
193 |
179 /** |
194 /** |
180 * to indicate internet is selected or not |
195 * to indicate internet is selected or not |
181 */ |
196 */ |
182 bool isInternetSelected; |
197 bool isInternetSelected; |
183 |
198 |
184 /** |
199 /** |
185 * list of hardcoded device categories |
200 * list holds the localised text id's of category name |
186 */ |
201 */ |
187 QMap<QString, bool> mCategoryDbMapping; |
|
188 |
|
189 QStringList mDeviceListDisplay; |
202 QStringList mDeviceListDisplay; |
190 /** |
203 |
191 * list of hardcoded device categories:cretaed to |
204 /** |
192 * set up default category values to the ini file |
205 * list holds the localised string of category name |
193 */ |
206 */ |
194 |
207 QStringList mDeviceStoragelist; |
195 QStringList mDeviceCategoryRefList; |
208 |
196 /** |
209 /** |
197 * intermediate variable to store selected category values |
210 * lst holds the modes (indevice/internet) |
198 */ |
|
199 |
|
200 QList<bool> mDeviceMapping; |
|
201 /** |
|
202 * list of hardcoded service providers |
|
203 */ |
|
204 //QStringList internetCategoryList; |
|
205 /** |
|
206 * for unit testing |
|
207 */ |
211 */ |
208 QStringList mCategoryList; |
212 QStringList mCategoryList; |
209 /** |
213 |
210 * DocumentLoader variable for the setting widget |
214 /** |
211 */ |
215 * to load the docml and ui objects |
212 |
216 */ |
213 HbDocumentLoader* mDocumentLoader; |
217 HbDocumentLoader* mDocumentLoader; |
214 |
218 |
215 /** |
219 /** |
216 * Dataform for the settingwidget |
220 * Dataform for the settingwidget |
217 */ |
221 */ |
218 |
|
219 HbDataForm* dataform; |
222 HbDataForm* dataform; |
220 |
223 |
221 /** |
224 /** |
222 * Dataform model |
225 * Dataform model |
223 */ |
226 */ |
224 HbDataFormModel* mModel; |
227 HbDataFormModel* mModel; |
|
228 |
225 /** |
229 /** |
226 * variable for customizing each item the in the dataform |
230 * variable for customizing each item the in the dataform |
227 */ |
231 */ |
228 |
|
229 QList<HbDataFormModelItem*> mModelItemList; |
232 QList<HbDataFormModelItem*> mModelItemList; |
230 |
233 |
231 QList<QAction*> mActions; |
234 /** |
232 |
235 * primary action for delimeter popup |
|
236 */ |
|
237 QAction* primaryAction; |
|
238 |
|
239 /** |
|
240 * secondary action for delimeter popup |
|
241 */ |
|
242 QAction* secondaryAction; |
|
243 |
|
244 /** |
|
245 * hold the setting value of category mode |
|
246 */ |
233 int mSelectedScope; |
247 int mSelectedScope; |
234 |
248 |
|
249 /** |
|
250 * hold the Id of internet service provider |
|
251 */ |
235 int mSelectedProvider; |
252 int mSelectedProvider; |
|
253 |
236 /** |
254 /** |
237 * Radio buttion list for internet search categories |
255 * Radio buttion list for internet search categories |
238 */ |
256 */ |
239 |
|
240 HbRadioButtonList* mradiolist; |
257 HbRadioButtonList* mradiolist; |
241 |
258 |
242 /** |
259 /** |
243 * combobox items |
260 * combobox provide an option to select indevice/internet |
244 */ |
261 */ |
245 HbComboBox *comboBox; |
262 HbComboBox *comboBox; |
246 |
263 |
|
264 /** |
|
265 * to execute the ui preparation at once |
|
266 */ |
247 bool mInstialize; |
267 bool mInstialize; |
|
268 |
|
269 /** |
|
270 * validating the select all |
|
271 */ |
248 bool mchangestate; |
272 bool mchangestate; |
249 |
273 |
|
274 /** |
|
275 * handler to get the internet service provider details |
|
276 */ |
250 OnlineHandler *mInternetHandler; |
277 OnlineHandler *mInternetHandler; |
251 |
278 |
|
279 /** |
|
280 * internet service providers and its ID's |
|
281 */ |
252 QMap<int, QString> mServiceProviders; |
282 QMap<int, QString> mServiceProviders; |
|
283 |
|
284 /** |
|
285 * common ui controller, to get the contentinfodb details |
|
286 */ |
|
287 SearchUiLoader* mUiLoader; |
253 |
288 |
254 SEARCH_FRIEND_CLASS (SearchStateProviderTest) |
289 SEARCH_FRIEND_CLASS (SearchStateProviderTest) |
255 }; |
290 }; |
256 #endif |
291 #endif |