24 |
24 |
25 // USER INCLUDES |
25 // USER INCLUDES |
26 #include "convergedmessage.h" |
26 #include "convergedmessage.h" |
27 #include "debugtraces.h" |
27 #include "debugtraces.h" |
28 |
28 |
|
29 // LOCALIZATION |
|
30 #define LOC_MESSAGE_RESEND hbTrId("txt_common_menu_resend_message") |
|
31 |
29 // LOCAL CONSTANTS |
32 // LOCAL CONSTANTS |
30 const QString DATE_TIME_FORMAT("dd/MM/yy hh:mm ap"); //Date format. |
33 const QString DATE_TIME_FORMAT("dd/MM/yy hh:mm ap"); //Date format. |
|
34 const QString TIME_FORMAT("hh:mm ap"); |
31 |
35 |
32 const QString MSG_HIGH_PRIORITY_ICON("qtg_small_priority_high.svg"); |
36 const QString MSG_HIGH_PRIORITY_ICON("qtg_small_priority_high"); |
33 const QString MSG_LOW_PRIORITY_ICON("qtg_small_priority_low.svg"); |
37 const QString MSG_LOW_PRIORITY_ICON("qtg_small_priority_low"); |
34 |
38 |
35 //--------------------------------------------------------------- |
39 //--------------------------------------------------------------- |
36 // UniViewerDetailsWidget::UniViewerDetailsWidget |
40 // UniViewerDetailsWidget::UniViewerDetailsWidget |
37 // @see header file |
41 // @see header file |
38 //--------------------------------------------------------------- |
42 //--------------------------------------------------------------- |
39 UniViewerDetailsWidget::UniViewerDetailsWidget(QGraphicsItem *parent) : |
43 UniViewerDetailsWidget::UniViewerDetailsWidget(QGraphicsItem *parent) : |
40 HbWidget(parent), mSubjectLabel(NULL), |
44 HbWidget(parent), mSubjectLabel(0), mPriorityIcon(0) |
41 mPriorityIcon(NULL) |
|
42 { |
45 { |
43 // This is the only permanent item & will not be removed |
46 // Permanent items & will not be removed |
|
47 |
44 mTime = new HbTextItem(this); |
48 mTime = new HbTextItem(this); |
45 HbStyle::setItemName(mTime, "timeLabel"); |
49 HbStyle::setItemName(mTime, "timeLabel"); |
46 } |
50 } |
47 |
51 |
48 //--------------------------------------------------------------- |
52 //--------------------------------------------------------------- |
71 |
75 |
72 //--------------------------------------------------------------- |
76 //--------------------------------------------------------------- |
73 //UniViewerDetailsWidget :: setTimeStamp |
77 //UniViewerDetailsWidget :: setTimeStamp |
74 // @see header file |
78 // @see header file |
75 //--------------------------------------------------------------- |
79 //--------------------------------------------------------------- |
76 void UniViewerDetailsWidget::setTimeStamp(const QDateTime &aTimeStamp) |
80 void UniViewerDetailsWidget::setTimeStamp(const QDateTime &aTimeStamp, const int &aSendingState) |
77 { |
81 { |
78 mTime->setText(aTimeStamp.toString(DATE_TIME_FORMAT)); |
82 |
|
83 if (aSendingState == ConvergedMessage::Resend) { |
|
84 mTime->setText(LOC_MESSAGE_RESEND + aTimeStamp.toString(TIME_FORMAT)); |
|
85 } |
|
86 else { |
|
87 mTime->setText(aTimeStamp.toString(DATE_TIME_FORMAT)); |
|
88 } |
79 } |
89 } |
80 |
90 |
81 //--------------------------------------------------------------- |
91 //--------------------------------------------------------------- |
82 // UniViewerDetailsWidget::setPriorityIcon |
92 // UniViewerDetailsWidget::setPriorityIcon |
83 // @see header file |
93 // @see header file |