equal
deleted
inserted
replaced
16 */ |
16 */ |
17 |
17 |
18 #ifndef PROGRESSIVE_SEARCH_STATE_H |
18 #ifndef PROGRESSIVE_SEARCH_STATE_H |
19 #define PROGRESSIVE_SEARCH_STATE_H |
19 #define PROGRESSIVE_SEARCH_STATE_H |
20 |
20 |
21 #include <qabstractitemmodel.h> |
|
22 #include <qstate.h> |
21 #include <qstate.h> |
23 #include <qstringlist.h> |
22 #include <qstringlist.h> |
24 #include <qdatetime.h> |
23 #include <qdatetime.h> |
25 #include <qpixmap.h> |
24 #include <qpixmap.h> |
26 #include <hbicon.h> |
25 #include <hbicon.h> |
28 #include <xqappmgr.h> |
27 #include <xqappmgr.h> |
29 #include <xqaiwrequest.h> |
28 #include <xqaiwrequest.h> |
30 #include "search_global.h" |
29 #include "search_global.h" |
31 #include <f32file.h> |
30 #include <f32file.h> |
32 |
31 |
33 |
|
34 |
|
35 #ifdef OST_TRACE_COMPILER_IN_USE //defined in Search_global.h |
32 #ifdef OST_TRACE_COMPILER_IN_USE //defined in Search_global.h |
36 |
|
37 #define PERF_CAT_API_TIME_RESTART m_categorySearchApiTime.restart(); |
33 #define PERF_CAT_API_TIME_RESTART m_categorySearchApiTime.restart(); |
38 #define PERF_CAT_UI_TIME_RESTART m_categorySearchUiTime.restart(); |
34 #define PERF_CAT_UI_TIME_RESTART m_categorySearchUiTime.restart(); |
39 #define PERF_CAT_TOTAL_TIME_RESTART m_totalSearchUiTime.restart(); |
35 #define PERF_CAT_TOTAL_TIME_RESTART m_totalSearchUiTime.restart(); |
40 #define PERF_CAT_API_ENDLOG qDebug() << "Search on category (API): " << mTemplist.at( mDatabasecount-1 ) << "took "<< m_categorySearchApiTime.elapsed() << " msec"; |
36 #define PERF_CAT_API_ENDLOG qDebug() << "Search on category (API): " << mTemplist.at( mDatabasecount-1 ) << "took "<< m_categorySearchApiTime.elapsed() << " msec"; |
41 #define PERF_CAT_UI_ENDLOG qDebug() << "Search on category (UI): " << mTemplist.at( mDatabasecount-1 ) << "took "<< m_categorySearchUiTime.elapsed() << " msec"; |
37 #define PERF_CAT_UI_ENDLOG qDebug() << "Search on category (UI): " << mTemplist.at( mDatabasecount-1 ) << "took "<< m_categorySearchUiTime.elapsed() << " msec"; |
65 #define PERF_RESULT_ITEM_FOR_LAUNCHING(string) |
61 #define PERF_RESULT_ITEM_FOR_LAUNCHING(string) |
66 #define PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG(string) |
62 #define PERF_RESULT_ITEM_LAUNCH_TIME_ENDLOG(string) |
67 #endif //OST_TRACE_COMPILER_IN_USE |
63 #endif //OST_TRACE_COMPILER_IN_USE |
68 class HbMainWindow; |
64 class HbMainWindow; |
69 class HbView; |
65 class HbView; |
70 class HbListView; |
|
71 class HbDocumentLoader; |
66 class HbDocumentLoader; |
72 class QStandardItemModel; |
|
73 class HbSearchPanel; |
67 class HbSearchPanel; |
74 class CFbsBitmap; |
68 class CFbsBitmap; |
75 class InDeviceHandler; |
69 class InDeviceHandler; |
76 class QCPixDocument; |
70 class QCPixDocument; |
77 class NotesEditorInterface; |
71 class NotesEditorInterface; |
78 class EventViewerPluginInterface; |
72 class EventViewerPluginInterface; |
|
73 class HbListWidget; |
|
74 class HbListWidgetItem; |
79 class QPluginLoader; |
75 class QPluginLoader; |
80 SEARCH_CLASS( SearchStateProviderTest) |
76 SEARCH_CLASS( SearchStateProviderTest) |
81 /** @ingroup group_searchstateprovider |
77 /** @ingroup group_searchstateprovider |
82 * @brief The state where progressive search state is shown |
78 * @brief The state where progressive search state is shown |
83 * |
79 * |
174 /** |
170 /** |
175 * slot connects to list view to launch the respective application |
171 * slot connects to list view to launch the respective application |
176 * @since S60 ?S60_version. |
172 * @since S60 ?S60_version. |
177 * @param aIndex index of the activated item. |
173 * @param aIndex index of the activated item. |
178 */ |
174 */ |
179 void openResultitem(QModelIndex aIndex); |
175 void openResultitem(HbListWidgetItem * item); |
180 |
176 |
181 /** |
177 /** |
182 * slot connects to settings state to get the selected category information |
178 * slot connects to settings state to get the selected category information |
183 * @since S60 ?S60_version. |
179 * @since S60 ?S60_version. |
184 * @param aCategory category(database) name. |
180 * @param aCategory category(database) name. |
198 * @param aKeyword search keyword. |
194 * @param aKeyword search keyword. |
199 */ |
195 */ |
200 void startNewSearch(const QString &aKeyword); |
196 void startNewSearch(const QString &aKeyword); |
201 |
197 |
202 /** |
198 /** |
203 * slot connects to search state for internet search |
|
204 * @since S60 ?S60_version. |
|
205 */ |
|
206 void _customizeGoButton(bool avalue); |
|
207 |
|
208 /** |
|
209 * slot implemented to avoid repeated search for the same category |
199 * slot implemented to avoid repeated search for the same category |
210 * selection when user search for mutiple times |
200 * selection when user search for mutiple times |
211 * @since S60 ?S60_version. |
201 * @since S60 ?S60_version. |
212 */ |
202 */ |
213 void settingsaction(bool avalue); |
203 void settingsaction(bool avalue); |
230 * Slot implemented to delete the calenderviewer plugin |
220 * Slot implemented to delete the calenderviewer plugin |
231 * @since S60 ?S60_version. |
221 * @since S60 ?S60_version. |
232 */ |
222 */ |
233 |
223 |
234 void _viewingCompleted(); |
224 void _viewingCompleted(); |
|
225 |
|
226 void viewReady(); |
235 |
227 |
236 |
228 void slotOnlineQuery(QString); |
237 void viewReady(); |
|
238 |
|
239 |
229 |
|
230 void slotISProvidersIcon(int, HbIcon); |
|
231 |
240 private: |
232 private: |
241 |
233 |
242 /** |
234 /** |
243 * initiate the fresh search for selected category separately |
235 * initiate the fresh search for selected category separately |
244 * |
236 * |
262 /** |
254 /** |
263 * prepares the suggestion link item on result list view to provide suggestion links |
255 * prepares the suggestion link item on result list view to provide suggestion links |
264 * |
256 * |
265 * @param aKeyword search keyword. |
257 * @param aKeyword search keyword. |
266 */ |
258 */ |
267 void createSuggestionLink(bool aFlag); |
259 void createSuggestionLink(); |
268 |
260 |
269 /** |
261 /** |
270 * Function to include corrrect Qimage format to be taken from bitmap |
262 * Function to include corrrect Qimage format to be taken from bitmap |
271 * @param mode Bitmap display mode. |
263 * @param mode Bitmap display mode. |
272 */ |
264 */ |
317 |
309 |
318 /** |
310 /** |
319 * Signalled when user selects an to switch the settings state |
311 * Signalled when user selects an to switch the settings state |
320 * setting state will be activated. |
312 * setting state will be activated. |
321 */ |
313 */ |
322 void settingsState(); |
314 void switchProToSettingsState(); |
323 |
315 |
|
316 void inDeviceSearchQuery(QString); |
|
317 |
|
318 void launchLink(int,QString); |
324 private: |
319 private: |
325 |
320 |
326 HbMainWindow* mMainWindow; |
321 HbMainWindow* mMainWindow; |
327 |
322 |
328 /** |
323 /** |
333 |
328 |
334 /** |
329 /** |
335 * The List View widget. |
330 * The List View widget. |
336 * Own. |
331 * Own. |
337 */ |
332 */ |
338 HbListView* mListView; |
333 HbListWidget* mListView; |
339 |
334 |
340 /** |
335 /** |
341 * Document handler to load .docml. |
336 * Document handler to load .docml. |
342 * Own. |
337 * Own. |
343 */ |
338 */ |
347 * The searchpanel widget. |
342 * The searchpanel widget. |
348 * Own. |
343 * Own. |
349 */ |
344 */ |
350 HbSearchPanel* mSearchPanel; |
345 HbSearchPanel* mSearchPanel; |
351 |
346 |
352 /** |
347 |
353 * model for list view |
|
354 * Own. |
|
355 */ |
|
356 QStandardItemModel* mModel; |
|
357 |
348 |
358 /** |
349 /** |
359 * qt interface for CPix engine |
350 * qt interface for CPix engine |
360 * Own. |
351 * Own. |
361 */ |
352 */ |
451 /** |
442 /** |
452 * to create Notes plugin loader |
443 * to create Notes plugin loader |
453 * |
444 * |
454 */ |
445 */ |
455 QPluginLoader *mNotespluginLoader; |
446 QPluginLoader *mNotespluginLoader; |
|
447 |
|
448 QMap<int, HbIcon> mISprovidersIcon; |
|
449 |
|
450 bool mOnlineQueryAvailable; |
456 |
451 |
457 private: |
452 private: |
458 /** |
453 /** |
459 * Application manager handler to perform resultitem opening. |
454 * Application manager handler to perform resultitem opening. |
460 * |
455 * |
477 QTime m_categorySearchUiTime; |
472 QTime m_categorySearchUiTime; |
478 QTime m_categorySearchApiTime; |
473 QTime m_categorySearchApiTime; |
479 QTime m_categoryGetDocumentApiTime; |
474 QTime m_categoryGetDocumentApiTime; |
480 QTime m_resultItemLaunchTime; |
475 QTime m_resultItemLaunchTime; |
481 //use long to safeguard overflow from long running operations. |
476 //use long to safeguard overflow from long running operations. |
482 long m_getDocumentCatergoryTimeAccumulator; |
477 long m_getDocumentCatergoryTimeAccumulator; |
483 #endif |
478 #endif |
484 |
479 |
485 SEARCH_FRIEND_CLASS (SearchStateProviderTest) |
480 SEARCH_FRIEND_CLASS (SearchStateProviderTest) |
486 |
481 |
487 }; |
482 }; |
488 |
483 |
489 #endif //PROGRESSIVE_SEARCH_STATE_H |
484 #endif //PROGRESSIVE_SEARCH_STATE_H |