author | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
commit | 62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (unidiff) | |
tree | 2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/unsupported/mailit/emaillistitem.cpp | |
parent | 0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (diff) | |
download | opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.zip opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.gz opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.bz2 |
QString to const QString
Diffstat (limited to 'noncore/unsupported/mailit/emaillistitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/emaillistitem.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/noncore/unsupported/mailit/emaillistitem.cpp b/noncore/unsupported/mailit/emaillistitem.cpp index b925a1c..fc9f766 100644 --- a/noncore/unsupported/mailit/emaillistitem.cpp +++ b/noncore/unsupported/mailit/emaillistitem.cpp | |||
@@ -22,77 +22,77 @@ | |||
22 | #include "emaillistitem.h" | 22 | #include "emaillistitem.h" |
23 | 23 | ||
24 | EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox) | 24 | EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox) |
25 | : QListViewItem(parent) | 25 | : QListViewItem(parent) |
26 | { | 26 | { |
27 | QString temp; | 27 | QString temp; |
28 | 28 | ||
29 | mail = mailIn; | 29 | mail = mailIn; |
30 | 30 | ||
31 | if (inbox) { | 31 | if (inbox) { |
32 | setText(0, mail.from); | 32 | setText(0, mail.from); |
33 | } else { | 33 | } else { |
34 | QStringList::Iterator it = mail.recipients.begin(); | 34 | QStringList::Iterator it = mail.recipients.begin(); |
35 | temp = *it; | 35 | temp = *it; |
36 | if (mail.recipients.count() > 1) | 36 | if (mail.recipients.count() > 1) |
37 | temp += "..."; | 37 | temp += "..."; |
38 | setText(0, temp); | 38 | setText(0, temp); |
39 | } | 39 | } |
40 | setText(1, mail.subject); | 40 | setText(1, mail.subject); |
41 | setText(2,mail.date); | 41 | setText(2,mail.date); |
42 | 42 | ||
43 | if (mailIn.files.count()>0) | 43 | if (mailIn.files.count()>0) |
44 | { | 44 | { |
45 | setPixmap(0, Resource::loadPixmap("mailit/attach")); | 45 | setPixmap(0, Resource::loadPixmap("mailit/attach")); |
46 | } | 46 | } |
47 | 47 | ||
48 | selected = FALSE; | 48 | selected = FALSE; |
49 | } | 49 | } |
50 | 50 | ||
51 | Email* EmailListItem::getMail() | 51 | Email* EmailListItem::getMail() |
52 | { | 52 | { |
53 | return &mail; | 53 | return &mail; |
54 | } | 54 | } |
55 | 55 | ||
56 | void EmailListItem::setMail(Email newMail) | 56 | void EmailListItem::setMail(Email newMail) |
57 | { | 57 | { |
58 | mail = newMail; | 58 | mail = newMail; |
59 | repaint(); | 59 | repaint(); |
60 | } | 60 | } |
61 | 61 | ||
62 | void EmailListItem::setItemSelected(bool enable) | 62 | void EmailListItem::setItemSelected(bool enable) |
63 | { | 63 | { |
64 | selected = enable; | 64 | selected = enable; |
65 | setSelected(enable); | 65 | setSelected(enable); |
66 | repaint(); | 66 | repaint(); |
67 | } | 67 | } |
68 | 68 | ||
69 | bool EmailListItem::isItemSelected() | 69 | bool EmailListItem::isItemSelected() |
70 | { | 70 | { |
71 | return selected; | 71 | return selected; |
72 | } | 72 | } |
73 | 73 | ||
74 | void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg, | 74 | void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg, |
75 | int column, int width, int alignment ) | 75 | int column, int width, int alignment ) |
76 | { | 76 | { |
77 | 77 | ||
78 | QColorGroup _cg( cg ); | 78 | QColorGroup _cg( cg ); |
79 | QColor c = _cg.text(); | 79 | QColor c = _cg.text(); |
80 | 80 | ||
81 | if ( (! mail.read) && (mail.received) ) | 81 | if ( (! mail.read) && (mail.received) ) |
82 | _cg.setColor( QColorGroup::Text, Qt::blue); | 82 | _cg.setColor( QColorGroup::Text, Qt::blue); |
83 | if (!mail.downloaded) | 83 | if (!mail.downloaded) |
84 | _cg.setColor( QColorGroup::Text, Qt::red); | 84 | _cg.setColor( QColorGroup::Text, Qt::red); |
85 | 85 | ||
86 | /*if (selected) { | 86 | /* if (selected) { |
87 | _cg.setColor(QColorGroup::Base, Qt::blue); | 87 | _cg.setColor(QColorGroup::Base, Qt::blue); |
88 | _cg.setColor(QColorGroup::Text, Qt::yellow); | 88 | _cg.setColor(QColorGroup::Text, Qt::yellow); |
89 | if (isSelected()) { | 89 | if (isSelected()) { |
90 | _cg.setColor(QColorGroup::HighlightedText, Qt::yellow); | 90 | _cg.setColor(QColorGroup::HighlightedText, Qt::yellow); |
91 | } else { | 91 | } else { |
92 | _cg.setColor(QColorGroup::Highlight, Qt::blue); | 92 | _cg.setColor(QColorGroup::Highlight, Qt::blue); |
93 | } | 93 | } |
94 | } | 94 | } |
95 | */ | 95 | */ |
96 | QListViewItem::paintCell( p, _cg, column, width, alignment ); | 96 | QListViewItem::paintCell( p, _cg, column, width, alignment ); |
97 | 97 | ||
98 | _cg.setColor( QColorGroup::Text, c ); | 98 | _cg.setColor( QColorGroup::Text, c ); |