17 |
17 |
18 #ifndef CNTGROUPMEMBERVIEW_H |
18 #ifndef CNTGROUPMEMBERVIEW_H |
19 #define CNTGROUPMEMBERVIEW_H |
19 #define CNTGROUPMEMBERVIEW_H |
20 |
20 |
21 #include <QObject> |
21 #include <QObject> |
22 #include <QList> |
22 #include <cntabstractview.h> |
23 #include <hbdocumentloader.h> |
23 #include "cntglobal.h" |
24 |
24 |
25 #include <cntabstractview.h> |
25 class CntGroupMemberViewPrivate; |
|
26 class HbView; |
26 |
27 |
27 class CntListModel; |
28 class QTPBK_EXPORT CntGroupMemberView : public QObject, public CntAbstractView |
28 class CntAbstractViewManager; |
|
29 class CntContactCardHeadingItem; |
|
30 class CntFetchContacts; |
|
31 class HbView; |
|
32 class HbAction; |
|
33 class HbListView; |
|
34 class HbAbstractViewItem; |
|
35 class ThumbnailManager; |
|
36 class QModelIndex; |
|
37 class CntImageLabel; |
|
38 class HbDocumentLoader; |
|
39 |
|
40 QTM_BEGIN_NAMESPACE |
|
41 class QContact; |
|
42 QTM_END_NAMESPACE |
|
43 |
|
44 QTM_USE_NAMESPACE |
|
45 |
|
46 class CntGroupMemberView : public QObject, public CntAbstractView |
|
47 { |
29 { |
48 friend class TestCntGroupMemberView; |
|
49 Q_OBJECT |
30 Q_OBJECT |
50 |
31 |
51 public: |
32 public: |
52 CntGroupMemberView(); |
33 CntGroupMemberView(); |
53 ~CntGroupMemberView(); |
34 ~CntGroupMemberView(); |
54 |
35 |
55 public: // From CntAbstractView |
36 public: // From CntAbstractView |
56 void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs ); |
37 void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs ); |
57 void deactivate(); |
38 void deactivate(); |
58 bool isDefault() const { return false; } |
39 bool isDefault() const; |
59 HbView* view() const { return mView; } |
40 HbView* view() const; |
60 int viewId() const { return groupMemberView; } |
41 int viewId() const; |
61 |
42 |
62 public slots: |
43 signals: |
63 void setOrientation(Qt::Orientation orientation); |
44 void backPressed(); |
64 |
45 |
65 |
|
66 private slots: |
|
67 void showPreviousView(); |
|
68 void openGroupActions(); |
|
69 void manageMembers(); |
|
70 void handleManageMembers(); |
|
71 void editGroup(); |
|
72 void deleteGroup(); |
|
73 void handleDeleteGroup(HbAction *action); |
|
74 |
|
75 void showContextMenu(HbAbstractViewItem *item, const QPointF &coords); |
|
76 void handleMenu(HbAction* action); |
|
77 |
|
78 void showContactView(const QModelIndex &index); |
|
79 void removeFromGroup(const QModelIndex &index); |
|
80 void editContact(const QModelIndex &index); |
|
81 void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error); |
|
82 void openImageEditor(); |
|
83 |
|
84 void drawImageMenu(const QPointF &aCoords); |
|
85 void createModel(); |
|
86 |
|
87 void removeImage(); |
|
88 |
|
89 private: |
46 private: |
90 QContactManager* getContactManager(); |
47 CntGroupMemberViewPrivate* const d_ptr; |
91 void setRelationship(QSet<QContactLocalId> &aLocalId, |
48 Q_DECLARE_PRIVATE_D(d_ptr, CntGroupMemberView) |
92 QList<QContactRelationship> &aRelationshipList); |
49 Q_DISABLE_COPY(CntGroupMemberView) |
93 |
|
94 private: |
|
95 QContact* mGroupContact; // own |
|
96 CntAbstractViewManager* mViewManager; |
|
97 HbDocumentLoader mDocumentLoader; |
|
98 HbView* mView; // own |
|
99 HbAction* mSoftkey; // owned by view |
|
100 CntContactCardHeadingItem* mHeadingItem; // owned by layout |
|
101 ThumbnailManager* mThumbnailManager; // own |
|
102 HbAction* mManageAction; // owned by view |
|
103 HbAction* mDeleteAction; // owned by view |
|
104 HbAction* mShowActionsAction; // owned by view |
|
105 HbAction* mEditGroupAction; // owned by view |
|
106 CntListModel* mModel; // own |
|
107 CntImageLabel* mImageLabel; |
|
108 HbListView* mListView; // owned by layout |
|
109 HbDocumentLoader* mDocument; |
|
110 CntFetchContacts* mFetchView; |
|
111 QList<QContactLocalId> mOriginalGroupMembers; |
|
112 QContactAvatar* mAvatar; |
|
113 CntViewParameters mArgs; |
|
114 }; |
50 }; |
115 |
51 |
116 #endif // CNTGROUPMEMBERVIEW_H |
52 #endif // CNTGROUPMEMBERVIEW_H |
117 |
53 |
118 // EOF |
54 // EOF |