author | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-24 16:32:44 (UTC) |
commit | 6c89efd80c1e94a0c070025d07c7a4c656f2a81e (patch) (unidiff) | |
tree | 44e8cac0fe7b117be19ec8c1f14c9c888838fdb3 /kmicromail/mailistviewitem.cpp | |
parent | d4f5ce1bedd03191da5ecef2dc68381c10ef1fba (diff) | |
download | kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.zip kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.gz kdepimpi-6c89efd80c1e94a0c070025d07c7a4c656f2a81e.tar.bz2 |
view source
Diffstat (limited to 'kmicromail/mailistviewitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/mailistviewitem.cpp | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp index 484a635..ffb835c 100644 --- a/kmicromail/mailistviewitem.cpp +++ b/kmicromail/mailistviewitem.cpp | |||
@@ -1,11 +1,12 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | 1 | // CHANGED 2004-08-06 Lutz Rogowski |
2 | #include "mailistviewitem.h" | 2 | #include "mailistviewitem.h" |
3 | #include <libmailwrapper/abstractmail.h> | 3 | #include <libmailwrapper/abstractmail.h> |
4 | #include <qtextstream.h> | 4 | #include <qtextstream.h> |
5 | #include <kiconloader.h> | 5 | #include <kiconloader.h> |
6 | #include "koprefs.h" | ||
6 | //#include <qpe/resource.h> | 7 | //#include <qpe/resource.h> |
7 | 8 | ||
8 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) | 9 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) |
9 | :QListViewItem(parent,item),mail_data() | 10 | :QListViewItem(parent,item),mail_data() |
10 | { | 11 | { |
11 | } | 12 | } |
@@ -54,60 +55,16 @@ void MailListViewItem::showEntry() | |||
54 | } else { | 55 | } else { |
55 | //setText(3, fsize + "MB"); | 56 | //setText(3, fsize + "MB"); |
56 | mKeyMap.insert(3, "M" +fsort ); | 57 | mKeyMap.insert(3, "M" +fsort ); |
57 | } | 58 | } |
58 | setText(1,mail_data->getSubject()); | 59 | setText(1,mail_data->getSubject()); |
59 | setText(2,mail_data->getFrom()); | 60 | setText(2,mail_data->getFrom()); |
60 | #if 0 | ||
61 | QString date = mail_data->getDate(); | ||
62 | |||
63 | int kom = date.find( ",")+2; | ||
64 | if ( kom == 1 ) | ||
65 | kom = 0; | ||
66 | if ( date.mid(kom,1) == " ") | ||
67 | ++kom; | ||
68 | if ( date.mid(kom+1,1) == " " ) | ||
69 | date = "0" + date.mid( kom ); | ||
70 | else if ( kom ) | ||
71 | date = date.mid( kom ); | ||
72 | if ( kom || date.mid(2,1 ) == " ") { | ||
73 | QString mon = date.mid(3,3); | ||
74 | QString so = 00; | ||
75 | if ( mon == "Jan" ) | ||
76 | so = "01"; | ||
77 | else if ( mon == "Feb" ) | ||
78 | so = "02"; | ||
79 | else if ( mon == "Mar" ) | ||
80 | so = "03"; | ||
81 | else if ( mon == "Apr" ) | ||
82 | so = "04"; | ||
83 | else if ( mon == "May" ) | ||
84 | so = "05"; | ||
85 | else if ( mon == "Jun" ) | ||
86 | so = "06"; | ||
87 | else if ( mon == "Jul" ) | ||
88 | so = "07"; | ||
89 | else if ( mon == "Aug" ) | ||
90 | so = "08"; | ||
91 | else if ( mon == "Sep" ) | ||
92 | so = "09"; | ||
93 | else if ( mon == "Oct" ) | ||
94 | so = "10"; | ||
95 | else if ( mon == "Nov" ) | ||
96 | so = "11"; | ||
97 | else if ( mon == "Dec" ) | ||
98 | so = "12"; | ||
99 | date = date.mid(7,4)+so+date.left(2)+date.mid(12,14); | ||
100 | } | ||
101 | //qDebug("insert Date %s ", date.latin1()); | ||
102 | // if ( date.left(1) != "1" || date.left(1) != "2" ) | ||
103 | // date = date.mid(5); | ||
104 | mKeyMap.insert(4,date); | ||
105 | #endif | ||
106 | mKeyMap.insert(4,mail_data->getIsoDate()); | 61 | mKeyMap.insert(4,mail_data->getIsoDate()); |
107 | setText(4,mail_data->getDate()); | 62 | setText(4,mail_data->getDate()); |
63 | if ( KOPrefs::instance()->mShowToField ) | ||
64 | setText(5,mail_data->To()[0]); | ||
108 | } | 65 | } |
109 | 66 | ||
110 | void MailListViewItem::storeData(const RecMailP&data) | 67 | void MailListViewItem::storeData(const RecMailP&data) |
111 | { | 68 | { |
112 | mail_data = data; | 69 | mail_data = data; |
113 | } | 70 | } |