77 { |
77 { |
78 Q_OBJECT |
78 Q_OBJECT |
79 Q_DECLARE_PUBLIC(CntContactCardView) |
79 Q_DECLARE_PUBLIC(CntContactCardView) |
80 |
80 |
81 public: |
81 public: |
82 CntContactCardViewPrivate(); |
82 CntContactCardViewPrivate(bool isTemporary); |
83 virtual ~CntContactCardViewPrivate(); |
83 virtual ~CntContactCardViewPrivate(); |
|
84 |
|
85 protected: |
|
86 bool eventFilter(QObject *obj, QEvent *event); |
84 |
87 |
85 public slots: |
88 public slots: |
86 void onItemActivated(); |
89 void onItemActivated(); |
87 void editContact(); |
90 void editContact(); |
88 void viewHistory(); |
91 void viewHistory(); |
89 void onLongPressed(const QPointF &aCoords); |
92 void onLongPressed(const QPointF &aCoords); |
90 void setPreferredAction(const QString &aAction, const QContactDetail &aDetail, CntContactCardDetailItem *aDetailItem); |
93 void setPreferredAction(const QString &aAction, const QContactDetail &aDetail, CntContactCardDetailItem *aDetailItem); |
91 void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error); |
94 void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error); |
92 void drawMenu(const QPointF &aCoords); |
95 void drawMenu(const QPointF &aCoords); |
93 void sendToHs(); |
96 void sendToHs(); |
|
97 void onAddedToContacts(); |
94 void mapTileStatusReceived(int contactid, int addressType, int status); |
98 void mapTileStatusReceived(int contactid, int addressType, int status); |
95 void keyPressed(QKeyEvent *event); |
|
96 |
99 |
97 private slots: |
100 private slots: |
98 void sendBusinessCard(); |
101 void sendBusinessCard(); |
99 void addToGroup(); |
102 void addToGroup(); |
100 void deleteContact(); |
103 void deleteContact(); |
101 void handleDeleteContact(HbAction *action); |
104 void handleDeleteContact(int action); |
102 void setAsFavorite(); |
105 void setAsFavorite(); |
103 void removeFromFavorite(); |
106 void removeFromFavorite(); |
104 void actionExecuted(CntActionLauncher* aAction); |
107 void actionExecuted(CntActionLauncher* aAction); |
105 void setOrientation(Qt::Orientation orientation); |
108 void setOrientation(Qt::Orientation orientation); |
106 void showPreviousView(); |
109 void showPreviousView(); |
107 void doChangeImage(); |
110 void doChangeImage(); |
108 void doRemoveImage(); |
111 void doRemoveImage(); |
|
112 void showRootView(); |
109 |
113 |
110 void handleMenuAction(HbAction* aAction); |
114 void handleMenuAction(HbAction* aAction); |
111 void handleSendBusinessCard( HbAction* aAction ); |
115 void handleSendBusinessCard( HbAction* aAction ); |
112 void executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction); |
116 void executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction); |
113 void sendKeyCancelSlot(); |
117 void sendKeyCancelSlot(); |
|
118 void contactDeletedFromOtherSource(const QList<QContactLocalId>& contactIds); |
114 |
119 |
115 #ifdef PBK_UNIT_TEST |
120 #ifdef PBK_UNIT_TEST |
116 public slots: |
121 public slots: |
117 #else |
122 #else |
118 private slots: |
123 private slots: |
121 void updateSpinningIndicator(); |
126 void updateSpinningIndicator(); |
122 void setMaptileSearchStopIcon( int index ); |
127 void setMaptileSearchStopIcon( int index ); |
123 void setMaptileLabel( HbLabel*& mapLabel, const HbIcon& icon ); |
128 void setMaptileLabel( HbLabel*& mapLabel, const HbIcon& icon ); |
124 void updateMaptileImage(); |
129 void updateMaptileImage(); |
125 HbLabel* loadMaptileLabel( int addressType ); |
130 HbLabel* loadMaptileLabel( int addressType ); |
126 |
131 |
|
132 // Presence related function |
|
133 void updateItemPresence(const QString& accountUri, bool online); |
127 |
134 |
128 public: |
135 public: |
129 CntContactCardView* q_ptr; |
136 CntContactCardView* q_ptr; |
130 void activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs); |
137 void activate(CntAbstractViewManager* aMgr, const CntViewParameters aArgs); |
131 void deactivate(); |
138 void deactivate(); |
134 |
141 |
135 signals: |
142 signals: |
136 void preferredUpdated(); |
143 void preferredUpdated(); |
137 void backPressed(); |
144 void backPressed(); |
138 void viewActivated(CntAbstractViewManager* aMgr, const CntViewParameters aArgs); |
145 void viewActivated(CntAbstractViewManager* aMgr, const CntViewParameters aArgs); |
139 |
146 void addToContacts(); |
140 |
147 |
141 #ifdef PBK_UNIT_TEST |
148 #ifdef PBK_UNIT_TEST |
142 public: |
149 public: |
143 #else |
150 #else |
144 private: |
151 private: |
145 #endif |
152 #endif |
146 void connectAction(QString actionName, const char* slot); |
153 void connectAction(QString actionName, const char* slot); |
147 void executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction, CntContactCardDetailItem* aItem); |
154 void executeAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction, CntContactCardDetailItem* aItem); |
148 void executeDynamicAction(QContact& aContact, QContactDetail aDetail, QContactActionDescriptor aActionDescriptor); |
155 void executeDynamicAction(QContact& aContact, QContactDetail aDetail, QContactActionDescriptor aActionDescriptor); |
149 |
156 |
150 void sendKeyPressed(); |
157 bool sendKeyPressed(); |
151 #ifdef PBK_UNIT_TEST |
158 #ifdef PBK_UNIT_TEST |
152 public: |
159 public: |
153 #else |
160 #else |
154 private: |
161 private: |
155 #endif |
162 #endif |
164 CntContactCardHeadingItem *mHeadingItem; |
171 CntContactCardHeadingItem *mHeadingItem; |
165 ThumbnailManager *mThumbnailManager; |
172 ThumbnailManager *mThumbnailManager; |
166 QContactAvatar *mAvatar; |
173 QContactAvatar *mAvatar; |
167 bool mIsHandlingMenu; |
174 bool mIsHandlingMenu; |
168 QMap<QString, CntContactCardDetailItem*> mPreferredItems; |
175 QMap<QString, CntContactCardDetailItem*> mPreferredItems; |
|
176 /// maps a QContactOnlineAccount (for example "sip:sip@sip.com") to a detail item |
|
177 QMap<QString, CntContactCardDetailItem*> mPresenceItems; |
169 int mFavoriteGroupId; |
178 int mFavoriteGroupId; |
170 CntDocumentLoader *mLoader; |
179 CntDocumentLoader *mLoader; |
171 QContactAction *mContactAction; |
180 QContactAction *mContactAction; |
172 HbAction *mBackKey; |
181 HbAction *mBackKey; |
173 CntImageLabel *mImageLabel; |
182 CntImageLabel *mImageLabel; |
174 XQServiceRequest *mHighwayService; |
183 XQServiceRequest *mHighwayService; |
175 HbIcon *mVCardIcon; |
184 HbIcon *mVCardIcon; |
176 CntViewParameters mArgs; |
185 CntViewParameters mArgs; |
177 ShareUi *mShareUi; |
186 ShareUi *mShareUi; |
178 bool mAcceptSendKey; |
187 bool mAcceptSendKey; |
179 QStandardItemModel* mSendKeyListModel; |
188 QStandardItemModel* mSendKeyListModel; |
181 CntPresenceListener* mPresenceListener; // own |
190 CntPresenceListener* mPresenceListener; // own |
182 CntMapTileService *mMaptile; |
191 CntMapTileService *mMaptile; |
183 QTimer *mProgressTimer; |
192 QTimer *mProgressTimer; |
184 QList <CntContactCardMapTileDetail*> mAddressList; |
193 QList <CntContactCardMapTileDetail*> mAddressList; |
185 QMap <int, HbLabel*> mMaptileLabelList; |
194 QMap <int, HbLabel*> mMaptileLabelList; |
|
195 bool mIsTemporary; |
|
196 bool mIsExecutingAction; |
186 }; |
197 }; |
187 |
198 |
188 #endif // CNTCOMMLAUNCHERVIEW_H |
199 #endif // CNTCOMMLAUNCHERVIEW_H |
189 |
200 |
190 // EOF |
201 // EOF |