equal
deleted
inserted
replaced
18 |
18 |
19 #ifndef MSGVIEWMANAGER_H_ |
19 #ifndef MSGVIEWMANAGER_H_ |
20 #define MSGVIEWMANAGER_H_ |
20 #define MSGVIEWMANAGER_H_ |
21 |
21 |
22 #include <QObject> |
22 #include <QObject> |
|
23 #include <QVariantList> |
23 #include <QVariant> |
24 #include <QVariant> |
24 |
25 |
25 class HbMainWindow; |
26 class HbMainWindow; |
26 class MsgUnifiedEditorView; |
27 class MsgUnifiedEditorView; |
27 class MsgListView; |
28 class MsgListView; |
30 class MsgBaseView; |
31 class MsgBaseView; |
31 class DraftsListView; |
32 class DraftsListView; |
32 class MsgSettingsView; |
33 class MsgSettingsView; |
33 class HbAction; |
34 class HbAction; |
34 class HbView; |
35 class HbView; |
|
36 class MsgAudioFetcherView; |
35 |
37 |
36 class MsgViewManager: public QObject |
38 class MsgViewManager: public QObject |
37 { |
39 { |
38 Q_OBJECT |
40 Q_OBJECT |
39 |
41 |
40 public: |
42 public: |
41 /** |
43 /** |
42 * constructor |
44 * constructor |
43 */ |
45 */ |
44 MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, QObject* parent = 0); |
46 MsgViewManager(bool serviceRequest, HbMainWindow* mainWindow, |
|
47 QObject* parent = 0,int activityMsgId = -1); |
45 |
48 |
46 /** |
49 /** |
47 * Destructor. |
50 * Destructor. |
48 */ |
51 */ |
49 ~MsgViewManager(); |
52 ~MsgViewManager(); |
82 * Opens the viewer to view the message. |
85 * Opens the viewer to view the message. |
83 * @param msgId message id of the message. |
86 * @param msgId message id of the message. |
84 */ |
87 */ |
85 void view(int msgId); |
88 void view(int msgId); |
86 |
89 |
|
90 /** |
|
91 * Returns the current active view. |
|
92 */ |
|
93 int currentView(); |
|
94 |
|
95 /** |
|
96 * Saves the content of editor or Cv to draft. |
|
97 */ |
|
98 int saveContentToDraft(); |
87 private: |
99 private: |
88 /** |
100 /** |
89 * swiches back to last view after service request is complete. |
101 * swiches back to last view after service request is complete. |
90 */ |
102 */ |
91 void switchToLastSavedView(); |
103 void switchToLastSavedView(); |
156 |
168 |
157 /** |
169 /** |
158 * Appends the views to be deleted into a QList to be deleted when view is ready |
170 * Appends the views to be deleted into a QList to be deleted when view is ready |
159 */ |
171 */ |
160 void appendViewToBeDeleted(HbView* view); |
172 void appendViewToBeDeleted(HbView* view); |
|
173 |
|
174 /** |
|
175 * Save the editor data to be populated |
|
176 * @param editorData QVariantList |
|
177 */ |
|
178 void populateUniEditorAfterViewReady(const QVariantList& editorData); |
|
179 |
|
180 /** |
|
181 * Launch Audio fetcher view |
|
182 */ |
|
183 void switchToAudioFetcher(const QVariantList& data); |
|
184 |
|
185 /** |
|
186 * opens unieditor as activity. |
|
187 * @param activityMsgId activity msg id. |
|
188 */ |
|
189 void openUniEditorActivity(int activityMsgId); |
|
190 |
|
191 /** |
|
192 * find contact id corresponding to given phone no. |
|
193 * @param phoneNum |
|
194 */ |
|
195 qint32 findContactId(const QString address); |
161 |
196 |
162 private slots: |
197 private slots: |
163 /** |
198 /** |
164 * this slot is called on mainwindows back action. |
199 * this slot is called on mainwindows back action. |
165 */ |
200 */ |
189 /** |
224 /** |
190 * This slot is called when save tone dialog is launched. |
225 * This slot is called when save tone dialog is launched. |
191 * @param action selected action (yes or no). |
226 * @param action selected action (yes or no). |
192 */ |
227 */ |
193 void onDialogSaveTone(HbAction* action); |
228 void onDialogSaveTone(HbAction* action); |
|
229 |
|
230 /** |
|
231 * When this slot is called the saved editor data is set to the editor |
|
232 */ |
|
233 void populateUniEditorView(); |
194 |
234 |
195 private: |
235 private: |
196 /** |
236 /** |
197 * main window reference not owned. |
237 * main window reference not owned. |
198 */ |
238 */ |
205 MsgListView* mListView; |
245 MsgListView* mListView; |
206 MsgConversationBaseView* mConversationView; |
246 MsgConversationBaseView* mConversationView; |
207 UnifiedViewer* mUniViewer; |
247 UnifiedViewer* mUniViewer; |
208 DraftsListView* mDraftsListView; |
248 DraftsListView* mDraftsListView; |
209 MsgSettingsView* mSettingsView; |
249 MsgSettingsView* mSettingsView; |
|
250 MsgAudioFetcherView* mAudioFetcherView; |
210 HbAction* mBackAction; |
251 HbAction* mBackAction; |
211 |
252 |
212 int mPreviousView; |
253 int mPreviousView; |
213 int mCurrentView; |
254 int mCurrentView; |
214 int mViewAtServiceRequest; |
255 int mViewAtServiceRequest; |
216 qint64 mConversationId; |
257 qint64 mConversationId; |
217 bool mViewServiceRequest; |
258 bool mViewServiceRequest; |
218 QList<HbView*> mViewTobeDeleted; |
259 QList<HbView*> mViewTobeDeleted; |
219 HbView* mDummyview; |
260 HbView* mDummyview; |
220 int mMessageId; |
261 int mMessageId; |
|
262 |
|
263 QVariantList mEditorData; |
221 }; |
264 }; |
222 |
265 |
223 #endif /* MSGVIEWMANAGER_H_ */ |
266 #endif /* MSGVIEWMANAGER_H_ */ |