equal
deleted
inserted
replaced
20 #define MSGVIEWMANAGER_H_ |
20 #define MSGVIEWMANAGER_H_ |
21 |
21 |
22 #include <QObject> |
22 #include <QObject> |
23 #include <QVariantList> |
23 #include <QVariantList> |
24 #include <QVariant> |
24 #include <QVariant> |
|
25 #include <afactivities_global.h> |
25 |
26 |
26 class HbMainWindow; |
27 class HbMainWindow; |
27 class MsgUnifiedEditorView; |
28 class MsgUnifiedEditorView; |
28 class MsgListView; |
29 class MsgListView; |
29 class MsgConversationBaseView; |
30 class MsgConversationBaseView; |
31 class MsgBaseView; |
32 class MsgBaseView; |
32 class DraftsListView; |
33 class DraftsListView; |
33 class MsgSettingsView; |
34 class MsgSettingsView; |
34 class HbAction; |
35 class HbAction; |
35 class HbView; |
36 class HbView; |
|
37 class MsgActivityHandler; |
|
38 class TsTaskSettings; |
36 |
39 |
37 class MsgViewManager: public QObject |
40 class MsgViewManager: public QObject |
38 { |
41 { |
39 Q_OBJECT |
42 Q_OBJECT |
40 |
43 |
101 * @param key key type. |
104 * @param key key type. |
102 * @return true if key event handled else false. |
105 * @return true if key event handled else false. |
103 */ |
106 */ |
104 bool handleKeyEvent(int key); |
107 bool handleKeyEvent(int key); |
105 |
108 |
|
109 /** |
|
110 * Sets the activity handler |
|
111 * @param activityHandler |
|
112 */ |
|
113 void setActivityHandler(MsgActivityHandler* activityHandler); |
|
114 |
106 private: |
115 private: |
107 /** |
116 /** |
108 * swiches back to last view after service request is complete. |
117 * swiches back to last view after service request is complete. |
109 */ |
118 */ |
110 void switchToLastSavedView(); |
119 void switchToLastSavedView(); |
175 |
184 |
176 /** |
185 /** |
177 * Appends the views to be deleted into a QList to be deleted when view is ready |
186 * Appends the views to be deleted into a QList to be deleted when view is ready |
178 */ |
187 */ |
179 void appendViewToBeDeleted(HbView* view); |
188 void appendViewToBeDeleted(HbView* view); |
180 |
|
181 /** |
|
182 * Save the editor data to be populated |
|
183 * @param editorData QVariantList |
|
184 */ |
|
185 void populateUniEditorAfterViewReady(const QVariantList& editorData); |
|
186 |
189 |
187 /** |
190 /** |
188 * opens unieditor as activity. |
191 * opens unieditor as activity. |
189 * @param activityMsgId activity msg id. |
192 * @param activityMsgId activity msg id. |
190 */ |
193 */ |
228 * @param action selected action (yes or no). |
231 * @param action selected action (yes or no). |
229 */ |
232 */ |
230 void onDialogSaveTone(HbAction* action); |
233 void onDialogSaveTone(HbAction* action); |
231 |
234 |
232 /** |
235 /** |
233 * When this slot is called the saved editor data is set to the editor |
236 * Send the app to background |
234 */ |
237 */ |
235 void populateUniEditorView(); |
238 void handleSendToBackGround(); |
|
239 |
|
240 public slots: |
|
241 |
|
242 /** |
|
243 * Set the view for the app |
|
244 */ |
|
245 void handleApplicationActive(); |
|
246 |
|
247 /** |
|
248 * Handler for activated signal |
|
249 */ |
|
250 void handleActivated(Af::ActivationReason reason, |
|
251 QString name, |
|
252 QVariantHash parameters); |
236 |
253 |
237 private: |
254 private: |
238 /** |
255 /** |
239 * main window reference not owned. |
256 * main window reference not owned. |
240 */ |
257 */ |
249 UnifiedViewer* mUniViewer; |
266 UnifiedViewer* mUniViewer; |
250 DraftsListView* mDraftsListView; |
267 DraftsListView* mDraftsListView; |
251 MsgSettingsView* mSettingsView; |
268 MsgSettingsView* mSettingsView; |
252 |
269 |
253 HbAction* mBackAction; |
270 HbAction* mBackAction; |
254 |
271 /** |
|
272 * Not owned |
|
273 */ |
|
274 MsgActivityHandler* mActivityHandler; |
|
275 TsTaskSettings* mClient; |
255 int mPreviousView; |
276 int mPreviousView; |
256 int mCurrentView; |
277 int mCurrentView; |
257 int mViewAtServiceRequest; |
278 int mViewAtServiceRequest; |
258 bool mServiceRequest; |
279 bool mServiceRequest; |
259 qint64 mConversationId; |
280 qint64 mConversationId; |
260 bool mViewServiceRequest; |
281 bool mViewServiceRequest; |
261 QList<HbView*> mViewTobeDeleted; |
282 QList<HbView*> mViewTobeDeleted; |
262 HbView* mDummyview; |
283 HbView* mDummyview; |
263 int mMessageId; |
284 int mMessageId; |
264 |
285 |
265 QVariantList mEditorData; |
|
266 QVariantList mViewerData; |
286 QVariantList mViewerData; |
|
287 /* |
|
288 * Keeps track of the app background status |
|
289 * if set then it means app is in background |
|
290 */ |
|
291 bool mBringtoForground; |
267 }; |
292 }; |
268 |
293 |
269 #endif /* MSGVIEWMANAGER_H_ */ |
294 #endif /* MSGVIEWMANAGER_H_ */ |