summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mailit/emaillistitem.cpp
authorllornkcor <llornkcor>2003-05-24 01:20:33 (UTC)
committer llornkcor <llornkcor>2003-05-24 01:20:33 (UTC)
commit62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (side-by-side diff)
tree2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/unsupported/mailit/emaillistitem.cpp
parent0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (diff)
downloadopie-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.cpp96
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 @@
#include "emaillistitem.h"
EmailListItem::EmailListItem(QListView *parent, Email mailIn, bool inbox)
- : QListViewItem(parent)
+ : QListViewItem(parent)
{
- QString temp;
-
- mail = mailIn;
-
- if (inbox) {
- setText(0, mail.from);
- } else {
- QStringList::Iterator it = mail.recipients.begin();
- temp = *it;
- if (mail.recipients.count() > 1)
- temp += "...";
- setText(0, temp);
- }
- setText(1, mail.subject);
- setText(2,mail.date);
-
- if (mailIn.files.count()>0)
- {
- setPixmap(0, Resource::loadPixmap("mailit/attach"));
- }
-
- selected = FALSE;
+ QString temp;
+
+ mail = mailIn;
+
+ if (inbox) {
+ setText(0, mail.from);
+ } else {
+ QStringList::Iterator it = mail.recipients.begin();
+ temp = *it;
+ if (mail.recipients.count() > 1)
+ temp += "...";
+ setText(0, temp);
+ }
+ setText(1, mail.subject);
+ setText(2,mail.date);
+
+ if (mailIn.files.count()>0)
+ {
+ setPixmap(0, Resource::loadPixmap("mailit/attach"));
+ }
+
+ selected = FALSE;
}
Email* EmailListItem::getMail()
{
- return &mail;
+ return &mail;
}
void EmailListItem::setMail(Email newMail)
{
- mail = newMail;
- repaint();
+ mail = newMail;
+ repaint();
}
void EmailListItem::setItemSelected(bool enable)
{
- selected = enable;
- setSelected(enable);
- repaint();
+ selected = enable;
+ setSelected(enable);
+ repaint();
}
bool EmailListItem::isItemSelected()
{
- return selected;
+ return selected;
}
void EmailListItem::paintCell( QPainter *p, const QColorGroup &cg,
- int column, int width, int alignment )
+ int column, int width, int alignment )
{
- QColorGroup _cg( cg );
- QColor c = _cg.text();
+ QColorGroup _cg( cg );
+ QColor c = _cg.text();
- if ( (! mail.read) && (mail.received) )
- _cg.setColor( QColorGroup::Text, Qt::blue);
- if (!mail.downloaded)
- _cg.setColor( QColorGroup::Text, Qt::red);
-
-/* if (selected) {
- _cg.setColor(QColorGroup::Base, Qt::blue);
- _cg.setColor(QColorGroup::Text, Qt::yellow);
- if (isSelected()) {
- _cg.setColor(QColorGroup::HighlightedText, Qt::yellow);
- } else {
- _cg.setColor(QColorGroup::Highlight, Qt::blue);
- }
- }
-*/
+ if ( (! mail.read) && (mail.received) )
+ _cg.setColor( QColorGroup::Text, Qt::blue);
+ if (!mail.downloaded)
+ _cg.setColor( QColorGroup::Text, Qt::red);
+
+/* if (selected) {
+ _cg.setColor(QColorGroup::Base, Qt::blue);
+ _cg.setColor(QColorGroup::Text, Qt::yellow);
+ if (isSelected()) {
+ _cg.setColor(QColorGroup::HighlightedText, Qt::yellow);
+ } else {
+ _cg.setColor(QColorGroup::Highlight, Qt::blue);
+ }
+ }
+*/
QListViewItem::paintCell( p, _cg, column, width, alignment );
_cg.setColor( QColorGroup::Text, c );