summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/contactitem.cpp16
-rw-r--r--core/pim/osearch/contactitem.h2
-rw-r--r--core/pim/osearch/eventitem.cpp12
-rw-r--r--core/pim/osearch/eventitem.h1
4 files changed, 30 insertions, 1 deletions
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
@@ -1,35 +1,51 @@
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 "contactitem.h" 13#include "contactitem.h"
14 14
15#include <opie/ocontact.h> 15#include <opie/ocontact.h>
16#include <qpe/qcopenvelope_qws.h>
16 17
17ContactItem::ContactItem(OListViewItem* parent, OContact *contact) 18ContactItem::ContactItem(OListViewItem* parent, OContact *contact)
18: ResultItem(parent) 19: ResultItem(parent)
19{ 20{
20 _contact = contact; 21 _contact = contact;
21 setText(0, _contact->toShortText()); 22 setText(0, _contact->toShortText());
22} 23}
23 24
24 25
25ContactItem::~ContactItem() 26ContactItem::~ContactItem()
26{ 27{
27 delete _contact; 28 delete _contact;
28} 29}
29 30
30 31
31QString ContactItem::toRichText() 32QString ContactItem::toRichText()
32{ 33{
33 return _contact->toRichText(); 34 return _contact->toRichText();
34} 35}
35 36
37
38void ContactItem::editItem()
39{
40 QCopEnvelope e("QPE/Application/addressbook", "editEvent(int)");
41 //QCopEnvelope e("QPE/Addressbook", "editEvent(int)");
42 e << _contact->uid();
43}
44
45void ContactItem::showItem()
46{
47 QCopEnvelope e("QPE/Application/addressbook", "editEvent(int)");
48 //QCopEnvelope e("QPE/Addressbook", "viewDefault(QDate)");
49 e << _contact->uid();
50}
51
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
@@ -1,37 +1,39 @@
1// 1//
2// 2//
3// C++ Interface: $MODULE$ 3// C++ Interface: $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#ifndef CONTACTITEM_H 13#ifndef CONTACTITEM_H
14#define CONTACTITEM_H 14#define CONTACTITEM_H
15 15
16#include "resultitem.h" 16#include "resultitem.h"
17 17
18class OContact; 18class OContact;
19 19
20/** 20/**
21@author Patrick S. Vogt 21@author Patrick S. Vogt
22*/ 22*/
23class ContactItem : public ResultItem 23class ContactItem : public ResultItem
24{ 24{
25public: 25public:
26 ContactItem(OListViewItem* parent, OContact *contact); 26 ContactItem(OListViewItem* parent, OContact *contact);
27 27
28 ~ContactItem(); 28 ~ContactItem();
29 29
30 virtual QString toRichText(); 30 virtual QString toRichText();
31 virtual void showItem();
32 virtual void editItem();
31 33
32private: 34private:
33 OContact *_contact; 35 OContact *_contact;
34 36
35}; 37};
36 38
37#endif 39#endif
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
@@ -1,40 +1,50 @@
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 "eventitem.h" 13#include "eventitem.h"
14 14
15#include <qdatetime.h>
15#include <qpe/qcopenvelope_qws.h> 16#include <qpe/qcopenvelope_qws.h>
16#include <opie/oevent.h> 17#include <opie/oevent.h>
17 18
18EventItem::EventItem(OListViewItem* parent, OEvent *event) 19EventItem::EventItem(OListViewItem* parent, OEvent *event)
19 : ResultItem(parent) 20 : ResultItem(parent)
20{ 21{
21 _event = event; 22 _event = event;
22 setText(0, _event->toShortText() ); 23 setText(0, _event->toShortText() );
23} 24}
24 25
25 26
26EventItem::~EventItem() 27EventItem::~EventItem()
27{ 28{
28} 29}
29 30
30 31
31QString EventItem::toRichText() 32QString EventItem::toRichText()
32{ 33{
33 return _event->toRichText(); 34 return _event->toRichText();
34} 35}
35 36
36void EventItem::editItem() 37void EventItem::editItem()
37{ 38{
38 QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); 39 QCopEnvelope e("QPE/Application/datebook", "editEvent(int)");
39 e << _event->uid(); 40 e << _event->uid();
40} 41}
42
43void EventItem::showItem()
44{
45 QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)");
46 QDate day = _event->startDateTime().date();
47 qDebug("sending view day %s",day.toString().latin1());
48 e << day;
49}
50
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
@@ -1,38 +1,39 @@
1// 1//
2// 2//
3// C++ Interface: $MODULE$ 3// C++ Interface: $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#ifndef EVENTITEM_H 13#ifndef EVENTITEM_H
14#define EVENTITEM_H 14#define EVENTITEM_H
15 15
16#include "resultitem.h" 16#include "resultitem.h"
17 17
18class OEvent; 18class OEvent;
19 19
20/** 20/**
21@author Patrick S. Vogt 21@author Patrick S. Vogt
22*/ 22*/
23class EventItem : public ResultItem 23class EventItem : public ResultItem
24{ 24{
25public: 25public:
26 EventItem(OListViewItem* parent, OEvent *event); 26 EventItem(OListViewItem* parent, OEvent *event);
27 27
28 ~EventItem(); 28 ~EventItem();
29 29
30 virtual QString toRichText(); 30 virtual QString toRichText();
31 virtual void editItem(); 31 virtual void editItem();
32 virtual void showItem();
32 33
33private: 34private:
34 OEvent *_event; 35 OEvent *_event;
35 36
36}; 37};
37 38
38#endif 39#endif