19 #define LOCATIONPICKERSEARCHVIEW_H |
19 #define LOCATIONPICKERSEARCHVIEW_H |
20 |
20 |
21 |
21 |
22 #include <HbView> |
22 #include <HbView> |
23 |
23 |
24 //forward declarations |
|
25 class HbListView; |
24 class HbListView; |
26 class HbAction; |
|
27 class QGraphicsLinearLayout; |
|
28 class QStandardItemModel; |
25 class QStandardItemModel; |
29 class HbSearchPanel; |
26 class HbSearchPanel; |
30 class LocationPickerAppWindow; |
|
31 class LocationPickerDataManager; |
27 class LocationPickerDataManager; |
32 class LocationPickerProxyModel; |
28 class LocationPickerProxyModel; |
|
29 class HbDocumentLoader; |
|
30 class HbTextItem; |
|
31 class QGraphicsLinearLayout; |
33 |
32 |
34 /** Class defines the search view of location picker |
33 /** |
35 * |
34 * Class defines the search view of location picker |
36 */ |
35 */ |
37 class LocationPickerSearchView : public HbView |
36 class LocationPickerSearchView : public HbView |
38 { |
37 { |
39 Q_OBJECT |
38 Q_OBJECT |
40 public: |
39 public: |
41 // constructor |
40 // constructor |
42 LocationPickerSearchView( LocationPickerAppWindow *aWindow, QGraphicsItem* aParent = 0 ); |
41 LocationPickerSearchView(HbDocumentLoader &aLoader); |
43 // destructor |
42 // destructor |
44 ~LocationPickerSearchView(); |
43 ~LocationPickerSearchView(); |
45 |
44 //initialize the action items and connect to slots |
|
45 void init(); |
46 private slots: |
46 private slots: |
47 // slot to perform search |
47 // slot to perform search |
48 void doSearch(QString aCriteria); |
48 void doSearch(QString aCriteria); |
49 // slot to handle select event on a list item |
49 // slot to handle select event on a list item |
50 void handleActivated(const QModelIndex &aIndex); |
50 void handleActivated(const QModelIndex &aIndex); |
51 |
51 // slot to handle backbutton on search panel |
|
52 void handleExit(); |
|
53 signals: |
|
54 //signals to switch current view |
|
55 void switchView(); |
|
56 //signals when any item is selected |
|
57 void selectItem( quint32 aLm ); |
52 private: |
58 private: |
53 |
|
54 //proxymodel used for sort and filter |
59 //proxymodel used for sort and filter |
55 LocationPickerProxyModel *mProxyModel; |
60 LocationPickerProxyModel *mProxyModel; |
56 // model for the view |
61 // model for the view |
57 QStandardItemModel *mModel; |
62 QStandardItemModel *mModel; |
58 // graphics linear layout for list items and search panel |
|
59 QGraphicsLinearLayout* mLayout; |
|
60 // list view |
63 // list view |
61 HbListView *mListView; |
64 HbListView *mListView; |
62 // search panel |
65 // search panel |
63 HbSearchPanel *mSearchPanel; |
66 HbSearchPanel *mSearchPanel; |
64 // handle to main window |
|
65 LocationPickerAppWindow *mWindow; |
|
66 // handle to data manager to populate model |
67 // handle to data manager to populate model |
67 LocationPickerDataManager *mDataManager; |
68 LocationPickerDataManager *mDataManager; |
68 HbAction *mSecondaryBackAction; |
69 //TextItem |
|
70 HbTextItem* mEmptyLabel; |
|
71 //Graphicslayout |
|
72 QGraphicsLinearLayout* mVerticalLayout; |
|
73 //Documentloader |
|
74 HbDocumentLoader &mDocumentLoader; |
69 }; |
75 }; |
70 |
76 |
71 |
77 |
72 #endif // LOCATIONPICKERSEARCHVIEW_H |
78 #endif // LOCATIONPICKERSEARCHVIEW_H |