author | tille <tille> | 2003-05-14 15:25:08 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-14 15:25:08 (UTC) |
commit | 0042c63bd72905598928621e6e849cd6303ddf27 (patch) (side-by-side diff) | |
tree | f56dc5935cc9a4ec0d4df46d219fd7fc29fe1526 /core/pim/osearch/todoitem.cpp | |
parent | dbda71abdc7c13ac0acde21320ee00726d95dec4 (diff) | |
download | opie-0042c63bd72905598928621e6e849cd6303ddf27.zip opie-0042c63bd72905598928621e6e849cd6303ddf27.tar.gz opie-0042c63bd72905598928621e6e849cd6303ddf27.tar.bz2 |
icons for todo, contact and event results indication the matching field
Diffstat (limited to 'core/pim/osearch/todoitem.cpp') (more/less context) (ignore whitespace changes)
-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 @@ -14,4 +14,6 @@ #include <opie/otodo.h> +#include <qpixmap.h> +#include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> @@ -21,4 +23,5 @@ TodoItem::TodoItem(OListViewItem* parent, OTodo *todo) _todo = todo; setText( 0, todo->toShortText() ); + setIcon(); } @@ -51,2 +54,26 @@ QIntDict<QString> TodoItem::actions() return result; } + +void TodoItem::setIcon() +{ + QPixmap icon; + switch ( _todo->lastHitField() ) { + case -1: + icon = Resource::loadPixmap( "reset" ); + break; + case OTodo::Description: + case OTodo::Summary: + icon = Resource::loadPixmap( "osearch/personal" ); + break; + case OTodo::Priority: + icon = Resource::loadPixmap( "todo/priority1" ); + break; + case OTodo::HasDate: + icon = Resource::loadPixmap( "osearch/clock" ); + break; + default: + icon = Resource::loadPixmap( "DocsIcon" ); + break; + } + setPixmap( 0, icon ); +} |