author | tille <tille> | 2003-05-11 19:19:30 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-11 19:19:30 (UTC) |
commit | 43c18630840a98aed8deb96b454957c40f0a4344 (patch) (side-by-side diff) | |
tree | 60e5b68d1d172c77560d5af7bea83e81be7144a6 /core/pim/osearch/todoitem.cpp | |
parent | 38dc2fd6258f11ba0507c7bd8f8dfd5b39bc0df5 (diff) | |
download | opie-43c18630840a98aed8deb96b454957c40f0a4344.zip opie-43c18630840a98aed8deb96b454957c40f0a4344.tar.gz opie-43c18630840a98aed8deb96b454957c40f0a4344.tar.bz2 |
improved applnk and doclnk searching
clean up:
- mainwindow: handling of searchgroups
- searchgroups: introduced load, search and insertItem functions
- flexible actions handling
- doclnksearch inherits applnksearch
Diffstat (limited to 'core/pim/osearch/todoitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/todoitem.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp index 145b423..8b354f1 100644 --- a/core/pim/osearch/todoitem.cpp +++ b/core/pim/osearch/todoitem.cpp @@ -1,54 +1,52 @@ // // // C++ Implementation: $MODULE$ // -// Description: +// Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #include "todoitem.h" #include <opie/otodo.h> #include <qpe/qcopenvelope_qws.h> TodoItem::TodoItem(OListViewItem* parent, OTodo *todo) : ResultItem(parent) { _todo = todo; setText( 0, todo->toShortText() ); } - TodoItem::~TodoItem() { delete _todo; } - -void TodoItem::expand() -{ - ResultItem::expand(); -} - QString TodoItem::toRichText() { return _todo->toRichText(); } -void TodoItem::showItem() +void TodoItem::action( int act ) { -// QCopEnvelope e("QPE/Todolist", "show(int)"); - QCopEnvelope e("QPE/Application/todolist", "show(int)"); - e << _todo->uid(); + if (act == 0){ + QCopEnvelope e("QPE/Application/todolist", "show(int)"); + e << _todo->uid(); + }else if (act == 1){ + QCopEnvelope e("QPE/Application/todolist", "edit(int)"); + e << _todo->uid(); + } } -void TodoItem::editItem() +QIntDict<QString> TodoItem::actions() { -// QCopEnvelope e("QPE/Todolist", "edit(int)"); - QCopEnvelope e("QPE/Application/todolist", "edit(int)"); - e << _todo->uid(); + QIntDict<QString> result; + result.insert( 0, new QString( QObject::tr("show") ) ); + result.insert( 1, new QString( QObject::tr("edit") ) ); + return result; } |