From 43c18630840a98aed8deb96b454957c40f0a4344 Mon Sep 17 00:00:00 2001 From: tille Date: Sun, 11 May 2003 19:19:30 +0000 Subject: improved applnk and doclnk searching clean up: - mainwindow: handling of searchgroups - searchgroups: introduced load, search and insertItem functions - flexible actions handling - doclnksearch inherits applnksearch --- (limited to 'core/pim/osearch/todoitem.cpp') 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 @@ -2,7 +2,7 @@ // // C++ Implementation: $MODULE$ // -// Description: +// Description: // // // Author: Patrick S. Vogt , (C) 2003 @@ -22,33 +22,31 @@ TodoItem::TodoItem(OListViewItem* parent, OTodo *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 TodoItem::actions() { -// QCopEnvelope e("QPE/Todolist", "edit(int)"); - QCopEnvelope e("QPE/Application/todolist", "edit(int)"); - e << _todo->uid(); + QIntDict result; + result.insert( 0, new QString( QObject::tr("show") ) ); + result.insert( 1, new QString( QObject::tr("edit") ) ); + return result; } -- cgit v0.9.0.2