-rw-r--r-- | core/pim/osearch/todoitem.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp index 8b354f1..de4ea97 100644 --- a/core/pim/osearch/todoitem.cpp +++ b/core/pim/osearch/todoitem.cpp | |||
@@ -15,2 +15,4 @@ | |||
15 | #include <opie/otodo.h> | 15 | #include <opie/otodo.h> |
16 | #include <qpixmap.h> | ||
17 | #include <qpe/resource.h> | ||
16 | #include <qpe/qcopenvelope_qws.h> | 18 | #include <qpe/qcopenvelope_qws.h> |
@@ -22,2 +24,3 @@ TodoItem::TodoItem(OListViewItem* parent, OTodo *todo) | |||
22 | setText( 0, todo->toShortText() ); | 24 | setText( 0, todo->toShortText() ); |
25 | setIcon(); | ||
23 | } | 26 | } |
@@ -52 +55,25 @@ QIntDict<QString> TodoItem::actions() | |||
52 | } | 55 | } |
56 | |||
57 | void TodoItem::setIcon() | ||
58 | { | ||
59 | QPixmap icon; | ||
60 | switch ( _todo->lastHitField() ) { | ||
61 | case -1: | ||
62 | icon = Resource::loadPixmap( "reset" ); | ||
63 | break; | ||
64 | case OTodo::Description: | ||
65 | case OTodo::Summary: | ||
66 | icon = Resource::loadPixmap( "osearch/personal" ); | ||
67 | break; | ||
68 | case OTodo::Priority: | ||
69 | icon = Resource::loadPixmap( "todo/priority1" ); | ||
70 | break; | ||
71 | case OTodo::HasDate: | ||
72 | icon = Resource::loadPixmap( "osearch/clock" ); | ||
73 | break; | ||
74 | default: | ||
75 | icon = Resource::loadPixmap( "DocsIcon" ); | ||
76 | break; | ||
77 | } | ||
78 | setPixmap( 0, icon ); | ||
79 | } | ||