54
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CNTGROUPMEMBERVIEW_P_H
|
|
19 |
#define CNTGROUPMEMBERVIEW_P_H
|
|
20 |
|
|
21 |
#include "cntgroupmemberview.h"
|
|
22 |
#include "cntglobal.h"
|
|
23 |
|
|
24 |
#include <QObject>
|
|
25 |
#include <QList>
|
|
26 |
#include <hbdocumentloader.h>
|
|
27 |
#include <QSet>
|
|
28 |
#include <cntabstractview.h>
|
|
29 |
|
|
30 |
class CntListModel;
|
|
31 |
class CntContactCardHeadingItem;
|
|
32 |
class HbView;
|
|
33 |
class HbAction;
|
|
34 |
class HbListView;
|
|
35 |
class HbAbstractViewItem;
|
|
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 CntGroupMemberViewPrivate : public QObject
|
|
47 |
{
|
|
48 |
Q_OBJECT
|
|
49 |
|
|
50 |
public:
|
|
51 |
CntGroupMemberViewPrivate();
|
|
52 |
~CntGroupMemberViewPrivate();
|
|
53 |
|
61
|
54 |
void activate( const CntViewParameters aArgs );
|
54
|
55 |
void deactivate();
|
|
56 |
|
|
57 |
public:
|
|
58 |
CntGroupMemberView* q_ptr;
|
|
59 |
|
|
60 |
private slots:
|
|
61 |
void showPreviousView();
|
|
62 |
void openGroupActions();
|
|
63 |
void manageMembers();
|
|
64 |
void handleManageMembers(QSet<QContactLocalId> aIds);
|
|
65 |
void editGroup();
|
|
66 |
void deleteGroup();
|
|
67 |
void handleDeleteGroup(int action); // Delete action
|
|
68 |
|
|
69 |
void showContextMenu(HbAbstractViewItem *item, const QPointF &coords); // item owned by HbListView
|
|
70 |
void handleMenu(HbAction* action);
|
|
71 |
|
|
72 |
void showContactView(const QModelIndex &index);
|
|
73 |
void removeFromGroup(const QModelIndex &index);
|
|
74 |
void editContact(const QModelIndex &index);
|
|
75 |
void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error);
|
|
76 |
void openImageEditor();
|
|
77 |
void setOrientation(Qt::Orientation orientation);
|
|
78 |
|
|
79 |
void drawImageMenu(const QPointF &aCoords);
|
|
80 |
void createModel();
|
|
81 |
|
|
82 |
void removeImage();
|
|
83 |
void sendToHs(const QModelIndex &index);
|
|
84 |
|
|
85 |
private:
|
|
86 |
QContactManager* getContactManager();
|
|
87 |
void setRelationship(QSet<QContactLocalId> &aLocalId,
|
|
88 |
QList<QContactRelationship> &aRelationshipList);
|
|
89 |
|
|
90 |
private:
|
|
91 |
Q_DECLARE_PUBLIC(CntGroupMemberView)
|
|
92 |
friend class TestCntGroupMemberView;
|
|
93 |
|
61
|
94 |
public:
|
|
95 |
CntAbstractEngine* mEngine;
|
54
|
96 |
private:
|
|
97 |
QContact* mGroupContact; // own
|
|
98 |
CntAbstractViewManager* mViewManager;
|
|
99 |
HbDocumentLoader mDocumentLoader;
|
|
100 |
HbView* mView; // own
|
|
101 |
HbAction* mSoftkey; // owned by view
|
|
102 |
CntContactCardHeadingItem* mHeadingItem; // owned by layout
|
61
|
103 |
CntThumbnailManager* mThumbnailManager; // own
|
54
|
104 |
HbAction* mManageAction; // owned by view
|
|
105 |
HbAction* mDeleteAction; // owned by view
|
|
106 |
HbAction* mShowActionsAction; // owned by view
|
|
107 |
HbAction* mEditGroupAction; // owned by view
|
|
108 |
CntListModel* mModel; // own
|
|
109 |
CntImageLabel* mImageLabel;
|
|
110 |
HbListView* mListView; // owned by layout
|
|
111 |
HbDocumentLoader* mDocument;
|
|
112 |
QList<QContactLocalId> mOriginalGroupMembers;
|
|
113 |
QContactAvatar* mAvatar;
|
|
114 |
CntViewParameters mArgs;
|
|
115 |
};
|
|
116 |
|
|
117 |
#endif // CNTGROUPMEMBERVIEW_P_H
|
|
118 |
|
|
119 |
// EOF
|