Diffstat (limited to 'core/pim/osearch/todoitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/todoitem.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp index 34e790a..9172344 100644 --- a/core/pim/osearch/todoitem.cpp +++ b/core/pim/osearch/todoitem.cpp | |||
@@ -3,30 +3,28 @@ | |||
3 | // C++ Implementation: $MODULE$ | 3 | // C++ Implementation: $MODULE$ |
4 | // | 4 | // |
5 | // Description: | 5 | // Description: |
6 | // | 6 | // |
7 | // | 7 | // |
8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 | 8 | // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 |
9 | // | 9 | // |
10 | // Copyright: See COPYING file that comes with this distribution | 10 | // Copyright: See COPYING file that comes with this distribution |
11 | // | 11 | // |
12 | // | 12 | // |
13 | #include "todoitem.h" | 13 | #include "todoitem.h" |
14 | 14 | ||
15 | #include <opie2/oresource.h> | ||
15 | 16 | ||
16 | #include <qpe/resource.h> | ||
17 | #include <qpe/qcopenvelope_qws.h> | 17 | #include <qpe/qcopenvelope_qws.h> |
18 | 18 | ||
19 | |||
20 | |||
21 | using namespace Opie; | 19 | using namespace Opie; |
22 | TodoItem::TodoItem(OListViewItem* parent, OPimTodo *todo) | 20 | TodoItem::TodoItem(OListViewItem* parent, OPimTodo *todo) |
23 | : ResultItem(parent) | 21 | : ResultItem(parent) |
24 | { | 22 | { |
25 | _todo = todo; | 23 | _todo = todo; |
26 | setText( 0, todo->toShortText() ); | 24 | setText( 0, todo->toShortText() ); |
27 | setIcon(); | 25 | setIcon(); |
28 | } | 26 | } |
29 | 27 | ||
30 | TodoItem::~TodoItem() | 28 | TodoItem::~TodoItem() |
31 | { | 29 | { |
32 | delete _todo; | 30 | delete _todo; |
@@ -52,32 +50,32 @@ QIntDict<QString> TodoItem::actions() | |||
52 | { | 50 | { |
53 | QIntDict<QString> result; | 51 | QIntDict<QString> result; |
54 | result.insert( 0, new QString( QObject::tr("show") ) ); | 52 | result.insert( 0, new QString( QObject::tr("show") ) ); |
55 | result.insert( 1, new QString( QObject::tr("edit") ) ); | 53 | result.insert( 1, new QString( QObject::tr("edit") ) ); |
56 | return result; | 54 | return result; |
57 | } | 55 | } |
58 | 56 | ||
59 | void TodoItem::setIcon() | 57 | void TodoItem::setIcon() |
60 | { | 58 | { |
61 | QPixmap icon; | 59 | QPixmap icon; |
62 | switch ( _todo->lastHitField() ) { | 60 | switch ( _todo->lastHitField() ) { |
63 | case -1: | 61 | case -1: |
64 | icon = Resource::loadPixmap( "reset" ); | 62 | icon = Opie::Core::OResource::loadPixmap( "reset", Opie::Core::OResource::SmallIcon ); |
65 | break; | 63 | break; |
66 | case OPimTodo::Description: | 64 | case OPimTodo::Description: |
67 | icon = Resource::loadPixmap( "txt" ); | 65 | icon = Opie::Core::OResource::loadPixmap( "txt", Opie::Core::OResource::SmallIcon ); |
68 | break; | 66 | break; |
69 | case OPimTodo::Summary: | 67 | case OPimTodo::Summary: |
70 | icon = Resource::loadPixmap( "osearch/summary" ); | 68 | icon = Opie::Core::OResource::loadPixmap( "osearch/summary", Opie::Core::OResource::SmallIcon ); |
71 | break; | 69 | break; |
72 | case OPimTodo::Priority: | 70 | case OPimTodo::Priority: |
73 | icon = Resource::loadPixmap( "todo/priority1" ); | 71 | icon = Opie::Core::OResource::loadPixmap( "todo/priority1", Opie::Core::OResource::SmallIcon ); |
74 | break; | 72 | break; |
75 | case OPimTodo::HasDate: | 73 | case OPimTodo::HasDate: |
76 | icon = Resource::loadPixmap( "osearch/clock" ); | 74 | icon = Opie::Core::OResource::loadPixmap( "osearch/clock", Opie::Core::OResource::SmallIcon ); |
77 | break; | 75 | break; |
78 | default: | 76 | default: |
79 | icon = Resource::loadPixmap( "DocsIcon" ); | 77 | icon = Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ); |
80 | break; | 78 | break; |
81 | } | 79 | } |
82 | setPixmap( 0, icon ); | 80 | setPixmap( 0, icon ); |
83 | } | 81 | } |