Diffstat (limited to 'noncore/net/mail/mailistviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mailistviewitem.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/noncore/net/mail/mailistviewitem.cpp b/noncore/net/mail/mailistviewitem.cpp index 0b926da..d3a0723 100644 --- a/noncore/net/mail/mailistviewitem.cpp +++ b/noncore/net/mail/mailistviewitem.cpp | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <libmailwrapper/abstractmail.h> | 2 | #include <libmailwrapper/abstractmail.h> |
3 | #include <qtextstream.h> | 3 | #include <qtextstream.h> |
4 | #include <qpe/resource.h> | 4 | #include <qpe/resource.h> |
5 | #include <qpe/timestring.h> | ||
5 | 6 | ||
6 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) | 7 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) |
7 | :QListViewItem(parent,item),mail_data() | 8 | :QListViewItem(parent,item),mail_data() |
@@ -13,7 +14,7 @@ void MailListViewItem::showEntry() | |||
13 | if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) { | 14 | if ( mail_data->getFlags().testBit( FLAG_ANSWERED ) == true) { |
14 | setPixmap( 0, Resource::loadPixmap( "mail/kmmsgreplied") ); | 15 | setPixmap( 0, Resource::loadPixmap( "mail/kmmsgreplied") ); |
15 | } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) { | 16 | } else if ( mail_data->getFlags().testBit( FLAG_SEEN ) == true ) { |
16 | /* I think it looks nicer if there are not such a log of icons but only on mails | 17 | /* I think it looks nicer if there are not such a lot of icons but only on mails |
17 | replied or new - Alwin*/ | 18 | replied or new - Alwin*/ |
18 | //setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") ); | 19 | //setPixmap( 0, Resource::loadPixmap( "mail/kmmsgunseen") ); |
19 | } else { | 20 | } else { |
@@ -48,11 +49,24 @@ void MailListViewItem::showEntry() | |||
48 | o.setf(QTextStream::fixed); | 49 | o.setf(QTextStream::fixed); |
49 | o << s << " " << q << "Byte"; | 50 | o << s << " " << q << "Byte"; |
50 | } | 51 | } |
51 | |||
52 | setText(1,mail_data->getSubject()); | 52 | setText(1,mail_data->getSubject()); |
53 | setText(2,mail_data->getFrom()); | 53 | setText(2,mail_data->getFrom()); |
54 | setText(3,fsize); | 54 | setText(3,fsize); |
55 | setText(4,mail_data->getDate()); | 55 | setText(4,mail_data->getStringDate()); |
56 | } | ||
57 | |||
58 | QString MailListViewItem::key(int col,bool) const | ||
59 | { | ||
60 | QString temp; | ||
61 | if (col == 4) { | ||
62 | temp.sprintf( "%08d",QDateTime().secsTo(mail_data->getDate())); | ||
63 | return temp; | ||
64 | } | ||
65 | if (col == 3) { | ||
66 | temp.sprintf( "%020d",mail_data->Msgsize()); | ||
67 | return temp; | ||
68 | } | ||
69 | return text(col); | ||
56 | } | 70 | } |
57 | 71 | ||
58 | void MailListViewItem::storeData(const RecMailP&data) | 72 | void MailListViewItem::storeData(const RecMailP&data) |