equal
deleted
inserted
replaced
17 |
17 |
18 #ifndef CNTCOLLECTIONVIEW_H |
18 #ifndef CNTCOLLECTIONVIEW_H |
19 #define CNTCOLLECTIONVIEW_H |
19 #define CNTCOLLECTIONVIEW_H |
20 |
20 |
21 #include <QObject> |
21 #include <QObject> |
|
22 #include <QSet> |
22 #include <hbdocumentloader.h> |
23 #include <hbdocumentloader.h> |
23 |
24 |
24 #include <cntabstractview.h> |
25 #include <cntabstractview.h> |
25 |
26 |
26 class HbAction; |
27 class HbAction; |
27 class HbView; |
28 class HbView; |
28 class HbListView; |
29 class HbListView; |
29 class CntCollectionListModel; |
30 class CntCollectionListModel; |
|
31 class CntFetchContacts; |
30 class QModelIndex; |
32 class QModelIndex; |
31 class HbAbstractViewItem; |
33 class HbAbstractViewItem; |
32 class CntExtensionManager; |
34 class CntExtensionManager; |
|
35 |
|
36 QTM_USE_NAMESPACE |
33 |
37 |
34 class CntCollectionView : public QObject, public CntAbstractView |
38 class CntCollectionView : public QObject, public CntAbstractView |
35 { |
39 { |
36 Q_OBJECT |
40 Q_OBJECT |
37 friend class TestCntCollectionView; |
41 friend class TestCntCollectionView; |
48 int viewId() const { return collectionView; } |
52 int viewId() const { return collectionView; } |
49 |
53 |
50 private slots: |
54 private slots: |
51 void showPreviousView(); |
55 void showPreviousView(); |
52 void openGroup(const QModelIndex &index); |
56 void openGroup(const QModelIndex &index); |
|
57 |
53 void showContextMenu(HbAbstractViewItem *item, const QPointF &coords); |
58 void showContextMenu(HbAbstractViewItem *item, const QPointF &coords); |
|
59 void handleMenu(HbAction* action); |
|
60 |
54 void newGroup(); |
61 void newGroup(); |
|
62 void handleNewGroup(HbAction* action); |
|
63 void handleNewGroupMembers(); |
|
64 |
55 void refreshDataModel(); |
65 void refreshDataModel(); |
|
66 |
56 void deleteGroup(QContact group); |
67 void deleteGroup(QContact group); |
|
68 void handleDeleteGroup(HbAction* action); |
|
69 |
57 void deleteGroups(); |
70 void deleteGroups(); |
|
71 void handleDeleteGroups(HbAction* action); |
58 |
72 |
59 |
73 private: |
|
74 QContactManager* getContactManager(); |
|
75 void saveNewGroup(QContact* aContact); |
|
76 |
|
77 |
60 private: |
78 private: |
61 CntExtensionManager& mExtensionManager; |
79 CntExtensionManager& mExtensionManager; |
62 HbView* mView; // own |
80 HbView* mView; // own |
63 HbAction* mSoftkey; // owned by view |
81 HbAction* mSoftkey; // owned by view |
64 CntAbstractViewManager* mViewManager; |
82 CntAbstractViewManager* mViewManager; |
68 HbAction* mNamesAction; // owned by view |
86 HbAction* mNamesAction; // owned by view |
69 HbAction* mFindAction; // owned by view |
87 HbAction* mFindAction; // owned by view |
70 HbAction* mExtensionAction; // owned by view |
88 HbAction* mExtensionAction; // owned by view |
71 HbAction* mNewGroupAction; // owned by view |
89 HbAction* mNewGroupAction; // owned by view |
72 HbAction* mDeleteGroupsAction; // owned by view |
90 HbAction* mDeleteGroupsAction; // owned by view |
|
91 |
|
92 QContact* mHandledContact; // own, needed for asynchronous popups |
|
93 CntFetchContacts* mFetchView; |
|
94 QSet<QContactLocalId> mSelectedContactsSet; |
73 }; |
95 }; |
74 |
96 |
75 #endif // CNTCOLLECTIONVIEW_H |
97 #endif // CNTCOLLECTIONVIEW_H |
76 |
98 |
77 // EOF |
99 // EOF |