author | tille <tille> | 2003-05-11 19:19:30 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-11 19:19:30 (UTC) |
commit | 43c18630840a98aed8deb96b454957c40f0a4344 (patch) (unidiff) | |
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 @@ | |||
1 | // | 1 | // |
2 | // | 2 | // |
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 <opie/otodo.h> | 15 | #include <opie/otodo.h> |
16 | #include <qpe/qcopenvelope_qws.h> | 16 | #include <qpe/qcopenvelope_qws.h> |
17 | 17 | ||
18 | TodoItem::TodoItem(OListViewItem* parent, OTodo *todo) | 18 | TodoItem::TodoItem(OListViewItem* parent, OTodo *todo) |
19 | : ResultItem(parent) | 19 | : ResultItem(parent) |
20 | { | 20 | { |
21 | _todo = todo; | 21 | _todo = todo; |
22 | setText( 0, todo->toShortText() ); | 22 | setText( 0, todo->toShortText() ); |
23 | } | 23 | } |
24 | 24 | ||
25 | |||
26 | TodoItem::~TodoItem() | 25 | TodoItem::~TodoItem() |
27 | { | 26 | { |
28 | delete _todo; | 27 | delete _todo; |
29 | } | 28 | } |
30 | 29 | ||
31 | |||
32 | void TodoItem::expand() | ||
33 | { | ||
34 | ResultItem::expand(); | ||
35 | } | ||
36 | |||
37 | QString TodoItem::toRichText() | 30 | QString TodoItem::toRichText() |
38 | { | 31 | { |
39 | return _todo->toRichText(); | 32 | return _todo->toRichText(); |
40 | } | 33 | } |
41 | 34 | ||
42 | void TodoItem::showItem() | 35 | void TodoItem::action( int act ) |
43 | { | 36 | { |
44 | //QCopEnvelope e("QPE/Todolist", "show(int)"); | 37 | if (act == 0){ |
45 | QCopEnvelope e("QPE/Application/todolist", "show(int)"); | 38 | QCopEnvelope e("QPE/Application/todolist", "show(int)"); |
46 | e << _todo->uid(); | 39 | e << _todo->uid(); |
40 | }else if (act == 1){ | ||
41 | QCopEnvelope e("QPE/Application/todolist", "edit(int)"); | ||
42 | e << _todo->uid(); | ||
43 | } | ||
47 | } | 44 | } |
48 | 45 | ||
49 | void TodoItem::editItem() | 46 | QIntDict<QString> TodoItem::actions() |
50 | { | 47 | { |
51 | //QCopEnvelope e("QPE/Todolist", "edit(int)"); | 48 | QIntDict<QString> result; |
52 | QCopEnvelope e("QPE/Application/todolist", "edit(int)"); | 49 | result.insert( 0, new QString( QObject::tr("show") ) ); |
53 | e << _todo->uid(); | 50 | result.insert( 1, new QString( QObject::tr("edit") ) ); |
51 | return result; | ||
54 | } | 52 | } |