equal
deleted
inserted
replaced
25 #include <HbTextItem> |
25 #include <HbTextItem> |
26 #include <HbIconItem> |
26 #include <HbIconItem> |
27 #include <HbIconAnimationManager> |
27 #include <HbIconAnimationManager> |
28 #include <HbIconAnimator> |
28 #include <HbIconAnimator> |
29 #include <ccsdefs.h> |
29 #include <ccsdefs.h> |
30 #include <hbinstance> |
30 #include <HbInstance> |
31 |
31 |
32 // USER INCLUDES |
32 // USER INCLUDES |
33 #include "msgconversationwidget.h" |
33 #include "msgconversationwidget.h" |
34 #include "msgviewdefines.h" |
34 #include "msgviewdefines.h" |
35 #include "msgviewutils.h" |
35 #include "msgviewutils.h" |
41 const QString MSG_FAIL_ICON("qtg_small_fail"); |
41 const QString MSG_FAIL_ICON("qtg_small_fail"); |
42 const QString ANIMATION_FILE(":/qtg_anim_loading.axml"); |
42 const QString ANIMATION_FILE(":/qtg_anim_loading.axml"); |
43 const QString ANIMATION_ICON_NAME("qtg_anim_loading"); |
43 const QString ANIMATION_ICON_NAME("qtg_anim_loading"); |
44 const QString VCARD_ICON("qtg_large_mycard"); |
44 const QString VCARD_ICON("qtg_large_mycard"); |
45 const QString IMAGE_ICON("qtg_small_image"); |
45 const QString IMAGE_ICON("qtg_small_image"); |
46 const QString CORRUPTED_ICON("qtg_large_corrupted"); |
46 const QString CORRUPTED_ICON("qtg_small_corrupted"); |
47 const QString MSG_VIDEO_ICON("qtg_large_video_player"); |
47 const QString MSG_VIDEO_ICON("qtg_small_video"); |
48 |
48 |
49 // LOCALIZATION |
49 // LOCALIZATION |
50 #define LOC_RINGING_TONE hbTrId("txt_messaging_dpopinfo_ringing_tone") |
50 #define LOC_RINGING_TONE hbTrId("txt_messaging_dpopinfo_ringing_tone") |
51 #define LOC_BUSINESS_CARD hbTrId("txt_messaging_list_business_card") |
51 #define LOC_BUSINESS_CARD hbTrId("txt_messaging_list_business_card") |
52 #define LOC_CALENDAR_EVENT hbTrId("txt_messaging_list_calendar_event") |
52 #define LOC_CALENDAR_EVENT hbTrId("txt_messaging_list_calendar_event") |
294 { |
294 { |
295 mConversation->setImage(true); |
295 mConversation->setImage(true); |
296 HbIcon previewIcon; |
296 HbIcon previewIcon; |
297 if (msgProperty & EPreviewProtectedImage) |
297 if (msgProperty & EPreviewProtectedImage) |
298 { |
298 { |
299 // TODO: Change to official icon. |
|
300 previewIcon = HbIcon(IMAGE_ICON); |
299 previewIcon = HbIcon(IMAGE_ICON); |
301 } |
300 } |
302 else if (msgProperty & EPreviewCorruptedImage) |
301 else if (msgProperty & EPreviewCorruptedImage) |
303 { |
302 { |
304 // TODO: Change to official icon. |
303 // TODO: Change to official icon. |
314 |
313 |
315 bool hasVideo = (msgProperty & EPreviewVideo) ? true : false; |
314 bool hasVideo = (msgProperty & EPreviewVideo) ? true : false; |
316 if (hasVideo) |
315 if (hasVideo) |
317 { |
316 { |
318 mConversation->setVideo(true); |
317 mConversation->setVideo(true); |
|
318 HbIcon videoPreviewIcon; |
|
319 if (msgProperty & EPreviewProtectedVideo) |
|
320 { |
|
321 videoPreviewIcon = HbIcon(MSG_VIDEO_ICON); |
|
322 } |
|
323 else if (msgProperty & EPreviewCorruptedVideo) |
|
324 { |
|
325 videoPreviewIcon = HbIcon(CORRUPTED_ICON); |
|
326 } |
|
327 else |
|
328 { |
|
329 videoPreviewIcon = HbIcon(MSG_VIDEO_ICON); |
|
330 } |
|
331 mConversation->setPreviewIcon(videoPreviewIcon); |
319 } |
332 } |
320 |
333 bool hasAudio = (msgProperty & EPreviewAudio) ? true : false; |
321 bool hasAudio = (msgProperty & EPreviewAudio) ? true : false; |
|
322 if (hasAudio) |
334 if (hasAudio) |
323 { |
335 { |
324 mConversation->setAudio(true); |
336 mConversation->setAudio(true); |
325 // Protected content is also set as corrupted hence first check protected. |
|
326 if (msgProperty & EPreviewProtectedAudio) |
337 if (msgProperty & EPreviewProtectedAudio) |
327 { |
338 { |
328 mConversation->displayAudioIcon(); |
339 mConversation->displayAudioIcon(); |
329 } |
340 } |
330 else if (msgProperty & EPreviewCorruptedAudio) |
341 else if (msgProperty & EPreviewCorruptedAudio) |
331 { |
342 { |
332 // TODO: Change to official icon. |
343 mConversation->displayAudioIcon(CORRUPTED_ICON); |
333 mConversation->displayAudioIcon(CORRUPTED_ICON); |
|
334 } |
344 } |
335 else |
345 else |
336 { |
346 { |
337 mConversation->displayAudioIcon(); |
347 mConversation->displayAudioIcon(); |
338 } |
348 } |