|
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 CNTGROUPACTIONSVIEW_H |
|
19 #define CNTGROUPACTIONSVIEW_H |
|
20 |
|
21 #include <hbdocumentloader.h> |
|
22 |
|
23 #include <cntabstractview.h> |
|
24 |
|
25 class HbView; |
|
26 class HbIcon; |
|
27 class HbAction; |
|
28 class HbListView; |
|
29 class HbAbstractViewItem; |
|
30 class QModelIndex; |
|
31 class QStandardItemModel; |
|
32 class CntActionLauncher; |
|
33 |
|
34 QTM_BEGIN_NAMESPACE |
|
35 class QContact; |
|
36 class QContactAction; |
|
37 QTM_END_NAMESPACE |
|
38 |
|
39 QTM_USE_NAMESPACE |
|
40 |
|
41 class CntGroupActionsView : public QObject, public CntAbstractView |
|
42 { |
|
43 Q_OBJECT |
|
44 |
|
45 public: // From CntAbstractView |
|
46 void activate( const CntViewParameters aArgs ); |
|
47 void deactivate(); |
|
48 bool isDefault() const { return false; } |
|
49 HbView* view() const { return mView; } |
|
50 int viewId() const { return groupActionsView; } |
|
51 inline void setEngine( CntAbstractEngine& aEngine ){ mEngine = &aEngine; } |
|
52 |
|
53 protected: |
|
54 bool eventFilter(QObject *obj, QEvent *event); |
|
55 |
|
56 public: |
|
57 CntGroupActionsView(); |
|
58 ~CntGroupActionsView(); |
|
59 |
|
60 #ifdef PBK_UNIT_TEST |
|
61 public slots: |
|
62 #else |
|
63 private slots: |
|
64 #endif |
|
65 |
|
66 void showPreviousView(); |
|
67 void editGroup(); |
|
68 void listItemSelected(const QModelIndex &index); |
|
69 void executeAction(QContact&, QContactDetail, QString); |
|
70 void actionExecuted(CntActionLauncher* aAction); |
|
71 void actionCancelled(); |
|
72 void executeConferenceCallAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction); |
|
73 void onLongPressed (HbAbstractViewItem *item, const QPointF &coords); |
|
74 |
|
75 #ifdef PBK_UNIT_TEST |
|
76 public: |
|
77 #else |
|
78 private: |
|
79 #endif |
|
80 void populatelist(QString label,HbIcon icon, QString secondaryText, QString action); |
|
81 bool sendKeyPressed(); |
|
82 |
|
83 #ifdef PBK_UNIT_TEST |
|
84 public: |
|
85 #else |
|
86 private: |
|
87 #endif |
|
88 |
|
89 QContact* mGroupContact; |
|
90 HbAction* mEditGrpDetailAction; |
|
91 QStandardItemModel* mModel; // own |
|
92 CntAbstractViewManager* mViewManager; |
|
93 HbDocumentLoader mDocumentLoader; |
|
94 HbView* mView; // own |
|
95 |
|
96 HbAction* mSoftkey; // owned by view |
|
97 HbListView* mListView; // owned by layout |
|
98 int mPopupCount; |
|
99 QStringList mEmailActionParams; |
|
100 QVariantMap mMessageActionParams; |
|
101 bool mIsExecutingAction; |
|
102 |
|
103 CntAbstractEngine* mEngine; |
|
104 }; |
|
105 |
|
106 #endif // CNTGROUPACTIONSVIEW_H |
|
107 |
|
108 // EOF |