Diffstat (limited to 'core/pim/osearch/eventitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/eventitem.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp index 3b84b42..5b7a840 100644 --- a/core/pim/osearch/eventitem.cpp +++ b/core/pim/osearch/eventitem.cpp | |||
@@ -15,2 +15,4 @@ | |||
15 | #include <qdatetime.h> | 15 | #include <qdatetime.h> |
16 | #include <qpixmap.h> | ||
17 | #include <qpe/resource.h> | ||
16 | #include <qpe/qcopenvelope_qws.h> | 18 | #include <qpe/qcopenvelope_qws.h> |
@@ -23,2 +25,3 @@ EventItem::EventItem(OListViewItem* parent, OEvent *event) | |||
23 | setText(0, _event->toShortText() ); | 25 | setText(0, _event->toShortText() ); |
26 | setIcon(); | ||
24 | } | 27 | } |
@@ -54 +57,26 @@ QIntDict<QString> EventItem::actions() | |||
54 | } | 57 | } |
58 | |||
59 | void EventItem::setIcon() | ||
60 | { | ||
61 | QPixmap icon; | ||
62 | switch ( _event->lastHitField() ) { | ||
63 | case -1: | ||
64 | icon = Resource::loadPixmap( "reset" ); | ||
65 | break; | ||
66 | case Qtopia::DatebookDescription: | ||
67 | case Qtopia::Notes: | ||
68 | icon = Resource::loadPixmap( "osearch/personal" ); | ||
69 | break; | ||
70 | case Qtopia::Location: | ||
71 | icon = Resource::loadPixmap( "home" ); | ||
72 | break; | ||
73 | case Qtopia::StartDateTime: | ||
74 | case Qtopia::EndDateTime: | ||
75 | icon = Resource::loadPixmap( "osearch/clock" ); | ||
76 | break; | ||
77 | default: | ||
78 | icon = Resource::loadPixmap( "DocsIcon" ); | ||
79 | break; | ||
80 | } | ||
81 | setPixmap( 0, icon ); | ||
82 | } | ||