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/eventitem.cpp') diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp index 758ad85..3b84b42 100644 --- a/core/pim/osearch/eventitem.cpp +++ b/core/pim/osearch/eventitem.cpp @@ -34,17 +34,21 @@ QString EventItem::toRichText() return _event->toRichText(); } -void EventItem::editItem() +void EventItem::action( int act ) { - QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); - e << _event->uid(); + if (act == 0){ + QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); + e << _event->startDateTime().date(); + }else if(act == 1){ + QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); + e << _event->uid(); + } } -void EventItem::showItem() +QIntDict EventItem::actions() { - QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); - QDate day = _event->startDateTime().date(); - qDebug("sending view day %s",day.toString().latin1()); - e << day; + 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