equal
deleted
inserted
replaced
40 Q_PROPERTY(bool hasAudio READ hasAudio WRITE setAudio) |
40 Q_PROPERTY(bool hasAudio READ hasAudio WRITE setAudio) |
41 Q_PROPERTY(bool hasVideo READ hasVideo WRITE setVideo) |
41 Q_PROPERTY(bool hasVideo READ hasVideo WRITE setVideo) |
42 Q_PROPERTY(bool isPlayable READ isPlayable WRITE setPlayable) |
42 Q_PROPERTY(bool isPlayable READ isPlayable WRITE setPlayable) |
43 Q_PROPERTY(bool isIncoming READ isIncoming WRITE setIncoming) |
43 Q_PROPERTY(bool isIncoming READ isIncoming WRITE setIncoming) |
44 Q_PROPERTY(bool isMMS READ isMMS WRITE setMMS) |
44 Q_PROPERTY(bool isMMS READ isMMS WRITE setMMS) |
|
45 Q_PROPERTY(bool isMMSNotification READ isMMSNotification WRITE setMMSNotification) |
45 Q_PROPERTY(bool isUnread READ isUnread WRITE setUnread) |
46 Q_PROPERTY(bool isUnread READ isUnread WRITE setUnread) |
46 Q_PROPERTY(int sendingState READ sendingState WRITE setSendingState) |
47 Q_PROPERTY(int sendingState READ sendingState WRITE setSendingState) |
|
48 Q_PROPERTY(int notificationState READ notificationState WRITE setNotificationState) |
47 |
49 |
48 Q_ENUMS(MessageState) |
50 Q_ENUMS(MessageState) |
49 |
51 |
50 public: |
52 public: |
51 |
53 |
133 bool hasAudio(); |
135 bool hasAudio(); |
134 |
136 |
135 /** |
137 /** |
136 * Displays audio icon if audio media is present. |
138 * Displays audio icon if audio media is present. |
137 */ |
139 */ |
138 void displayAudioIcon(); |
140 void displayAudioIcon(const QString &iconPath = QString()); |
139 |
141 |
140 /** |
142 /** |
141 * Specify if this widget's message has video |
143 * Specify if this widget's message has video |
142 * @param bool |
144 * @param bool |
143 */ |
145 */ |
195 * Get to find if this widget is of type MMS |
197 * Get to find if this widget is of type MMS |
196 * @return bool |
198 * @return bool |
197 */ |
199 */ |
198 bool isMMS(); |
200 bool isMMS(); |
199 |
201 |
|
202 /** |
|
203 * Set to know if this widget if of type MMS Notification |
|
204 * @return bool |
|
205 */ |
|
206 void setMMSNotification(bool isMMSNotification = true); |
|
207 |
|
208 /** |
|
209 * Get to find if this widget is of type MMS Notification |
|
210 * @return bool |
|
211 */ |
|
212 bool isMMSNotification(); |
|
213 |
200 /** |
214 /** |
201 * Set the sending state. |
215 * Set the sending state. |
202 * Maps ConvergedMessage::SendingState to MessageState. |
216 * Maps ConvergedMessage::SendingState to MessageState. |
203 * @see ConvergedMessage::SendingState |
217 * @see ConvergedMessage::SendingState |
204 */ |
218 */ |
209 * @return Returns one of the states from enum SendingState. |
223 * @return Returns one of the states from enum SendingState. |
210 */ |
224 */ |
211 int sendingState(); |
225 int sendingState(); |
212 |
226 |
213 /** |
227 /** |
|
228 * Set the notification state. |
|
229 * Maps ConvergedMessage::NotificationState to MessageState. |
|
230 * @see ConvergedMessage::NotificationState |
|
231 */ |
|
232 void setNotificationState(int state); |
|
233 |
|
234 /** |
|
235 * Returns the notification state. |
|
236 * @return Returns one of the states from enum NotificationState. |
|
237 */ |
|
238 int notificationState(); |
|
239 |
|
240 /** |
214 * Sets the Timestamp. |
241 * Sets the Timestamp. |
215 * @param timeStamp Timestamp to be set. |
242 * @param timeStamp Timestamp to be set. |
216 */ |
243 */ |
217 void setTimeStamp(const QString &timeStamp); |
244 void setTimeStamp(const QString &timeStamp); |
218 |
245 |
220 * Draws the new message frame. |
247 * Draws the new message frame. |
221 */ |
248 */ |
222 void drawNewItemFrame(); |
249 void drawNewItemFrame(); |
223 |
250 |
224 /** |
251 /** |
225 * Draws the bubble frame. |
252 * Draws the normal/highlighted state bubble frame. |
226 */ |
253 */ |
227 void drawBubbleFrame(); |
254 void drawBubbleFrame(); |
|
255 |
|
256 /** |
|
257 * Draws the pressed state bubble frame. |
|
258 */ |
|
259 void drawPressedBubbleFrame(); |
|
260 |
|
261 /** |
|
262 * Function to receive item pressed events. |
|
263 * @see MsgConversationViewItem::pressStateChanged |
|
264 */ |
|
265 void pressStateChanged(bool pressed, bool animate); |
228 |
266 |
229 private: |
267 private: |
230 |
268 |
231 /** |
269 /** |
232 * Initialize the widget. |
270 * Initialize the widget. |
245 Sent = 0x01, |
283 Sent = 0x01, |
246 Sending = 0x02, |
284 Sending = 0x02, |
247 Pending = 0x03, |
285 Pending = 0x03, |
248 Failed = 0x04 |
286 Failed = 0x04 |
249 }; |
287 }; |
|
288 |
|
289 /** |
|
290 * Enum defining MMS Notification's Msg State |
|
291 * These are added here so that notification state |
|
292 * can be used inside css in future |
|
293 * @attention This enum can have values from 0 to 255 only |
|
294 * Add any new states only at the bottom of this enum |
|
295 */ |
|
296 enum NotificationState |
|
297 { |
|
298 NotifUnknown = 0x00, |
|
299 NotifReadyForFetching = 0x01, |
|
300 NotifRetrieving = 0x02, |
|
301 NotifExpired = 0x03, |
|
302 NotifFailed = 0x04, |
|
303 }; |
250 |
304 |
251 private: |
305 private: |
252 |
306 |
253 /** |
307 /** |
254 * Info if message has attachment. |
308 * Info if message has attachment. |
295 /** |
349 /** |
296 * Holds info if this widget is MMS |
350 * Holds info if this widget is MMS |
297 */ |
351 */ |
298 bool mIsMMS; |
352 bool mIsMMS; |
299 |
353 |
|
354 /** |
|
355 * Holds info if this widget is MMS Notification |
|
356 */ |
|
357 bool mIsMMSNotification; |
|
358 |
300 /** |
359 /** |
301 * Info about message priority. |
360 * Info about message priority. |
302 * @attention Stores high/low/normal priority. |
361 * @attention Stores high/low/normal priority. |
303 * @see ConvergedMessage::Priority |
362 * @see ConvergedMessage::Priority |
304 */ |
363 */ |
308 * Holds sending state information. |
367 * Holds sending state information. |
309 */ |
368 */ |
310 int mSendingState; |
369 int mSendingState; |
311 |
370 |
312 /** |
371 /** |
|
372 * Holds Notification state information. |
|
373 */ |
|
374 int mNotificationState; |
|
375 |
|
376 /** |
313 * Graphics Item to hold new message icon. |
377 * Graphics Item to hold new message icon. |
314 * Owned |
378 * Owned |
315 */ |
379 */ |
316 HbFrameItem *mNewFrameItem; |
380 HbFrameItem *mNewFrameItem; |
317 |
381 |