From 49cc0e47343578c0dfe1294afdf574ebfc1f4f4b Mon Sep 17 00:00:00 2001 From: tille Date: Fri, 09 May 2003 10:08:58 +0000 Subject: datebook displays defaultview (or editor) for found day now (with patch) addressbook (and todo) calls implemented, but not yet working --- (limited to 'core/pim/osearch') diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp index 86879aa..a25ac23 100644 --- a/core/pim/osearch/contactitem.cpp +++ b/core/pim/osearch/contactitem.cpp @@ -13,6 +13,7 @@ #include "contactitem.h" #include +#include ContactItem::ContactItem(OListViewItem* parent, OContact *contact) : ResultItem(parent) @@ -33,3 +34,18 @@ QString ContactItem::toRichText() return _contact->toRichText(); } + +void ContactItem::editItem() +{ + QCopEnvelope e("QPE/Application/addressbook", "editEvent(int)"); +// QCopEnvelope e("QPE/Addressbook", "editEvent(int)"); + e << _contact->uid(); +} + +void ContactItem::showItem() +{ + QCopEnvelope e("QPE/Application/addressbook", "editEvent(int)"); +// QCopEnvelope e("QPE/Addressbook", "viewDefault(QDate)"); + e << _contact->uid(); +} + diff --git a/core/pim/osearch/contactitem.h b/core/pim/osearch/contactitem.h index 3f2915c..431adef 100644 --- a/core/pim/osearch/contactitem.h +++ b/core/pim/osearch/contactitem.h @@ -28,6 +28,8 @@ public: ~ContactItem(); virtual QString toRichText(); + virtual void showItem(); + virtual void editItem(); private: OContact *_contact; diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp index bf5b2b9..758ad85 100644 --- a/core/pim/osearch/eventitem.cpp +++ b/core/pim/osearch/eventitem.cpp @@ -2,7 +2,7 @@ // // C++ Implementation: $MODULE$ // -// Description: +// Description: // // // Author: Patrick S. Vogt , (C) 2003 @@ -12,6 +12,7 @@ // #include "eventitem.h" +#include #include #include @@ -38,3 +39,12 @@ void EventItem::editItem() QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); e << _event->uid(); } + +void EventItem::showItem() +{ + QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); + QDate day = _event->startDateTime().date(); + qDebug("sending view day %s",day.toString().latin1()); + e << day; +} + diff --git a/core/pim/osearch/eventitem.h b/core/pim/osearch/eventitem.h index c3483de..999f0ac 100644 --- a/core/pim/osearch/eventitem.h +++ b/core/pim/osearch/eventitem.h @@ -29,6 +29,7 @@ public: virtual QString toRichText(); virtual void editItem(); + virtual void showItem(); private: OEvent *_event; -- cgit v0.9.0.2