18 #ifndef LOCATIONPICKERLANDSCAPEVIEW_H_ |
18 #ifndef LOCATIONPICKERLANDSCAPEVIEW_H_ |
19 #define LOCATIONPICKERLANDSCAPEVIEW_H_ |
19 #define LOCATIONPICKERLANDSCAPEVIEW_H_ |
20 |
20 |
21 |
21 |
22 |
22 |
23 #include <hbview> |
23 #include <HbView> |
24 #include <hbdocumentloader.h> |
24 #include <hbdocumentloader.h> |
25 #include "locationpickertypes.h" |
25 #include "locationpickertypes.h" |
26 |
26 |
27 //forward declarations |
27 //forward declarations |
28 class HbListView; |
28 class HbListView; |
29 class QStandardItemModel; |
29 class QStandardItemModel; |
30 class LocationPickerProxyModel; |
30 class LocationPickerProxyModel; |
31 class LocationPickerContent; |
|
32 class LocationPickerCollectionListContent; |
|
33 class LocationPickerCollectionContent; |
31 class LocationPickerCollectionContent; |
|
32 class LocatipnPickerProxyModel; |
34 class HbGridViewItem; |
33 class HbGridViewItem; |
35 class HbGridView; |
34 class HbGridView; |
36 class HbAction; |
35 class HbAction; |
37 |
36 |
38 /** |
37 /** |
42 { |
41 { |
43 |
42 |
44 Q_OBJECT |
43 Q_OBJECT |
45 public: |
44 public: |
46 // constructor |
45 // constructor |
47 LocationPickerLandscapeView(HbDocumentLoader* aLoader); |
46 LocationPickerLandscapeView( HbDocumentLoader* aLoader ); |
48 // destructor |
47 // destructor |
49 ~LocationPickerLandscapeView(); |
48 ~LocationPickerLandscapeView(); |
50 private: |
|
51 //disable the tabs |
|
52 void disableTabs(); |
|
53 public: |
49 public: |
54 //get the items from docml and connect to respective slots |
50 //get the items from docml and connect to respective slots |
55 void init(Qt::Orientation aOrientation ); |
51 void init( Qt::Orientation aOrientation, QStandardItemModel *aModel ); |
56 //Set the appropriate model on grid view |
52 //Set the appropriate model on grid view |
57 void manageGridView(); |
53 void manageGridView(); |
58 //Create collection list and sets to list view |
54 //Create collection list and sets to list view |
59 void setCollectionData( quint32 aCategoryId ); |
55 void setCollectionData( quint32 aCategoryId ); |
60 //Set Ctegory ID |
56 //Set Ctegory ID |
61 void setCategoryID( quint32 aCategoryId ); |
57 void setCategoryID( quint32 aCategoryId ); |
62 //Get the view type |
58 //Get the view type |
63 TViewType getViewType(); |
59 TViewType getViewType(); |
64 //set the view type |
60 //set the view type |
65 void setViewType(TViewType aViewType); |
61 void setViewType( TViewType aViewType ); |
|
62 //clear collection content |
|
63 void clearContentModel(); |
66 private slots: |
64 private slots: |
67 //slot to handle list item actions |
65 //slot to handle list item actions |
68 void handleActivated(const QModelIndex &aIndex); |
66 void handleActivated( const QModelIndex &aIndex ); |
69 //slots to handle menu action items |
67 //slots to handle menu action items |
70 void sortDescending(); |
68 void sortDescending(); |
71 void sortAscending(); |
69 void sortAscending(); |
72 void backButtonTriggered(); |
70 void backButtonTriggered(); |
73 //slot to handle search tab |
71 //slot to handle search tab |
80 signals: |
78 signals: |
81 void switchToSearchView(); |
79 void switchToSearchView(); |
82 void handleCollectionList(); |
80 void handleCollectionList(); |
83 void selectItem( quint32 aLm ); |
81 void selectItem( quint32 aLm ); |
84 void completeService(); |
82 void completeService(); |
85 void sendCategoryID( quint32 acategoryId ); |
83 void sendCategoryID( quint32 acategoryId ); |
|
84 void collectionContentExited(); |
86 private: |
85 private: |
87 //document loader |
86 //document loader |
88 HbDocumentLoader* mDocumentLoader; |
87 HbDocumentLoader* mDocumentLoader; |
89 // all view |
88 //locationPickerProxyModel |
90 LocationPickerContent* mLocationPickerContent; |
89 LocationPickerProxyModel *mProxyModel; |
91 // collection list content |
90 QStandardItemModel *mModel; |
92 LocationPickerCollectionListContent* mLocationPickerCollectionListContent; |
|
93 //actions |
91 //actions |
94 HbAction *mAllAction; |
92 HbAction *mAllAction; |
95 HbAction *mCollectionAction; |
93 HbAction *mCollectionAction; |
96 HbAction *mSearchAction; |
94 HbAction *mSearchAction; |
97 HbAction *mAscendingAction; |
95 HbAction *mAscendingAction; |