equal
deleted
inserted
replaced
64 */ |
64 */ |
65 void clearEditors(); |
65 void clearEditors(); |
66 |
66 |
67 /** |
67 /** |
68 * Save the content inside editor to drafts |
68 * Save the content inside editor to drafts |
69 * @return true if save is success else false. |
69 * @return valid message id if save is success |
70 */ |
70 * else invalid message id ( i.e. -1 ) |
71 bool saveContentToDrafts(); |
71 */ |
|
72 int saveContentToDrafts(); |
72 |
73 |
73 private slots: |
74 private slots: |
74 |
75 |
75 /** |
76 /** |
76 * Slot is called when menu is about to be shown. |
77 * Slot is called when menu is about to be shown. |
100 * This slot is called when save tone dialog is launched. |
101 * This slot is called when save tone dialog is launched. |
101 * @param action selected action (yes or no). |
102 * @param action selected action (yes or no). |
102 */ |
103 */ |
103 void onDialogSaveTone(HbAction* action); |
104 void onDialogSaveTone(HbAction* action); |
104 |
105 |
|
106 /** |
|
107 * This slot is called when the orientation is changed |
|
108 * @param newOrientation orientation |
|
109 */ |
|
110 void onOrientationChanged(Qt::Orientation newOrientation); |
|
111 |
|
112 /** |
|
113 * This slot is called when the orientation is about to bechanged |
|
114 */ |
|
115 void onOrientationAboutToBeChanged(); |
|
116 |
105 private: |
117 private: |
106 |
118 |
107 /** |
119 /** |
108 * View initialization function. |
120 * View initialization function. |
109 */ |
121 */ |
111 |
123 |
112 /** |
124 /** |
113 * Setup view menu items. |
125 * Setup view menu items. |
114 */ |
126 */ |
115 void setupMenu(); |
127 void setupMenu(); |
|
128 |
|
129 /** |
|
130 * Triggers model to fetch more conversations. |
|
131 */ |
|
132 void fetchMoreConversations(); |
116 |
133 |
117 /** |
134 /** |
118 * Populates ConvergedMessage for sending. |
135 * Populates ConvergedMessage for sending. |
119 * @param ConvergedMessage to be populated |
136 * @param ConvergedMessage to be populated |
120 * @see ConvergedMessage::MessageType |
137 * @see ConvergedMessage::MessageType |
179 * @param MsgConversationViewItem* item whose information is needed. |
196 * @param MsgConversationViewItem* item whose information is needed. |
180 * @param HbMenu context menu |
197 * @param HbMenu context menu |
181 * @see ConvergedMessage::MessageType |
198 * @see ConvergedMessage::MessageType |
182 */ |
199 */ |
183 void addDownloadItemToContextMenu(MsgConversationViewItem* item, HbMenu* contextMenu); |
200 void addDownloadItemToContextMenu(MsgConversationViewItem* item, HbMenu* contextMenu); |
184 |
|
185 /** |
|
186 * Validates if message can be forwarded |
|
187 * @param messageType |
|
188 * @param messageId |
|
189 * @return true if message can be forwarded |
|
190 * false if message cant be forwarded |
|
191 */ |
|
192 bool validateMsgForForward(int &messageType,qint32 &messageId); |
|
193 |
201 |
194 /** |
202 /** |
195 * Launches the BT message display service. |
203 * Launches the BT message display service. |
196 * @param index Index of the item activated/touched |
204 * @param index Index of the item activated/touched |
197 */ |
205 */ |
201 /** |
209 /** |
202 * Refreshes all widgets in the conversation view according to latest model |
210 * Refreshes all widgets in the conversation view according to latest model |
203 * data |
211 * data |
204 */ |
212 */ |
205 void refreshView(); |
213 void refreshView(); |
|
214 |
|
215 /** |
|
216 * This slot is called when the view is successfully added to main window |
|
217 */ |
|
218 void onViewReady(); |
206 |
219 |
207 private slots: |
220 private slots: |
208 |
221 |
209 /** |
222 /** |
210 * Utility method to scroll the list to show the bottom most item |
223 * Utility method to scroll the list to show the bottom most item |
211 */ |
224 */ |
212 void scrollToBottom(); |
225 void scrollToBottom(); |
|
226 |
|
227 void onConversationViewEmpty(); |
213 |
228 |
214 /** |
229 /** |
215 * Handler for long tap of a list item. |
230 * Handler for long tap of a list item. |
216 * @param viewItem Long tapped view item |
231 * @param viewItem Long tapped view item |
217 * @param point X and Y co-ordinates of long tap |
232 * @param point X and Y co-ordinates of long tap |
255 /** |
270 /** |
256 * slot to receive fetched contacts for addition |
271 * slot to receive fetched contacts for addition |
257 */ |
272 */ |
258 void contactsFetched(const QVariant& value); |
273 void contactsFetched(const QVariant& value); |
259 |
274 |
260 /* |
|
261 * Get audio files from audio-fetcher and launch editor |
|
262 */ |
|
263 void audiosFetched(const QVariant& result ); |
|
264 |
|
265 /** |
275 /** |
266 * slot to receive fetched contacts for vcard addition |
276 * slot to receive fetched contacts for vcard addition |
267 */ |
277 */ |
268 void contactsFetchedForVCards(const QVariant& value); |
278 void contactsFetchedForVCards(const QVariant& value); |
269 |
279 |
326 /** |
336 /** |
327 * Emitted when editor is tapped to reply. |
337 * Emitted when editor is tapped to reply. |
328 */ |
338 */ |
329 void replyStarted(); |
339 void replyStarted(); |
330 |
340 |
331 /** |
341 /** |
332 * This signal is emitted when vkb is open. |
342 * This signal is emitted when vkb is open/closed. |
333 */ |
343 * @param state True if keypad is opened else false. |
334 void hideChrome(bool); |
344 */ |
|
345 void vkbOpened(bool state); |
335 |
346 |
336 private slots: |
347 private slots: |
337 /** |
348 /** |
338 * Resizes the view when VKB is opened. |
349 * Resizes the view when VKB is opened. |
339 * This slot is triggered when user taps on the CV editor |
350 * This slot is triggered when user taps on the CV editor |
408 /** |
419 /** |
409 * Instance of the main layout. |
420 * Instance of the main layout. |
410 */ |
421 */ |
411 QGraphicsLinearLayout *mMainLayout; |
422 QGraphicsLinearLayout *mMainLayout; |
412 |
423 |
413 /** |
|
414 * Flag to track if item has been long pressed. |
|
415 * TODO: Remove it, once unique longpress and click event signal released in week16 |
|
416 */ |
|
417 bool mItemLongPressed; |
|
418 /* |
424 /* |
419 * Instance of VKB |
425 * Instance of VKB |
420 */ |
426 */ |
421 HbStaticVkbHost* mVkbHost; |
427 HbStaticVkbHost* mVkbHost; |
422 |
428 |
423 /** |
429 /** |
|
430 * variable holding the visible model index |
|
431 */ |
|
432 QModelIndex mVisibleIndex; |
|
433 |
|
434 /** |
424 * Flag to check it vkb is open. |
435 * Flag to check it vkb is open. |
425 */ |
436 */ |
426 bool mVkbopened; |
437 bool mVkbopened; |
427 |
438 |
|
439 /** |
|
440 * Flag is set when model is populated. |
|
441 * @see signal conversationModelPopulated() |
|
442 */ |
|
443 bool mModelPopulated; |
|
444 |
|
445 /** |
|
446 * Flag is set when |
|
447 */ |
|
448 bool mViewReady; |
428 }; |
449 }; |
429 |
450 |
430 #endif // MSG_CONVERSATION_VIEW_H |
451 #endif // MSG_CONVERSATION_VIEW_H |
431 // EOF |
452 // EOF |