9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: LocationPickerCollectionListView declaration |
14 * Description: LocationPickerCollectionContent declaration |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef LOCATIONPICKERCOLLECTIONCONTENT_H |
18 #ifndef LOCATIONPICKERCOLLECTIONCONTENT_H |
19 #define LOCATIONPICKERCOLLECTIONCONTENT_H |
19 #define LOCATIONPICKERCOLLECTIONCONTENT_H |
20 |
20 |
21 #include <HbView> |
|
22 |
|
23 class HbListView; |
|
24 class HbAction; |
|
25 class QStandardItemModel; |
21 class QStandardItemModel; |
26 class LocationPickerProxyModel; |
22 class LocationPickerProxyModel; |
27 class LocationPickerDataManager; |
23 class LocationPickerDataManager; |
28 class LocationPickerAppWindow; |
|
29 |
24 |
30 /** Class for handling a view collection content |
25 /** |
31 * |
26 * Class for handling collection content |
32 */ |
27 */ |
33 class LocationPickerCollectionContent : public HbView |
28 class LocationPickerCollectionContent : public QObject |
34 { |
29 { |
35 Q_OBJECT |
|
36 public: |
30 public: |
37 // constructor |
31 // constructor |
38 LocationPickerCollectionContent( LocationPickerAppWindow *aWindow, |
32 LocationPickerCollectionContent( Qt::Orientations aOrientation , quint32 aCollectionid ); |
39 quint32 aCollectionid, QGraphicsItem* aParent = 0); |
33 //Destructor |
40 ~LocationPickerCollectionContent(); |
34 ~LocationPickerCollectionContent(); |
41 private slots: |
35 //get proxy model |
42 // slot triggered when sort ascending is selected in menu |
36 LocationPickerProxyModel* getProxyModel(); |
43 void sortAscending(); |
37 //get LocationPickerDataManager |
44 // slot triggered when sort descending is selected in menu |
38 LocationPickerDataManager* getDataManager(); |
45 void sortDescending(); |
|
46 |
|
47 // slot used to handle when a location is selected in list view |
|
48 void handleActivated(const QModelIndex &aIndex); |
|
49 |
39 |
50 private: |
40 private: |
51 // constructs a menu for the view |
41 Qt::Orientations mOrientation; |
52 void constructMenu(); |
|
53 |
|
54 private: |
|
55 HbListView *mListView; |
|
56 LocationPickerProxyModel *mProxyModel; |
42 LocationPickerProxyModel *mProxyModel; |
57 QStandardItemModel *mModel; |
43 QStandardItemModel *mModel; |
58 LocationPickerDataManager *mDataManager; |
44 LocationPickerDataManager *mDataManager; |
59 LocationPickerAppWindow* mWindow; |
|
60 HbAction *mSecondaryBackAction; |
|
61 }; |
45 }; |
62 |
46 |
63 #endif // LOCATIONPICKERCOLLECTIONCONTENT_H |
47 #endif // LOCATIONPICKERCOLLECTIONCONTENT_H |