summaryrefslogtreecommitdiff
path: root/core/pim/osearch/eventitem.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/eventitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/eventitem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp
index 8dcfc70..7bcf340 100644
--- a/core/pim/osearch/eventitem.cpp
+++ b/core/pim/osearch/eventitem.cpp
@@ -1,67 +1,68 @@
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 15
16#include <qpe/resource.h> 16#include <qpe/resource.h>
17#include <qpe/qcopenvelope_qws.h> 17#include <qpe/qcopenvelope_qws.h>
18 18
19 19
20using namespace Opie;
20EventItem::EventItem(OListViewItem* parent, OPimEvent *event) 21EventItem::EventItem(OListViewItem* parent, OPimEvent *event)
21 : ResultItem(parent) 22 : ResultItem(parent)
22{ 23{
23 _event = event; 24 _event = event;
24 setText(0, _event->toShortText() ); 25 setText(0, _event->toShortText() );
25 setIcon(); 26 setIcon();
26} 27}
27 28
28 29
29EventItem::~EventItem() 30EventItem::~EventItem()
30{ 31{
31} 32}
32 33
33 34
34QString EventItem::toRichText() 35QString EventItem::toRichText()
35{ 36{
36 return _event->toRichText(); 37 return _event->toRichText();
37} 38}
38 39
39void EventItem::action( int act ) 40void EventItem::action( int act )
40{ 41{
41 if (act == 0){ 42 if (act == 0){
42 QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); 43 QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)");
43 e << _event->startDateTime().date(); 44 e << _event->startDateTime().date();
44 }else if(act == 1){ 45 }else if(act == 1){
45 QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); 46 QCopEnvelope e("QPE/Application/datebook", "editEvent(int)");
46 e << _event->uid(); 47 e << _event->uid();
47 } 48 }
48} 49}
49 50
50QIntDict<QString> EventItem::actions() 51QIntDict<QString> EventItem::actions()
51{ 52{
52 QIntDict<QString> result; 53 QIntDict<QString> result;
53 result.insert( 0, new QString( QObject::tr("show") ) ); 54 result.insert( 0, new QString( QObject::tr("show") ) );
54 result.insert( 1, new QString( QObject::tr("edit") ) ); 55 result.insert( 1, new QString( QObject::tr("edit") ) );
55 return result; 56 return result;
56} 57}
57 58
58void EventItem::setIcon() 59void EventItem::setIcon()
59{ 60{
60 QPixmap icon; 61 QPixmap icon;
61 switch ( _event->lastHitField() ) { 62 switch ( _event->lastHitField() ) {
62 case -1: 63 case -1:
63 icon = Resource::loadPixmap( "reset" ); 64 icon = Resource::loadPixmap( "reset" );
64 // QWhatsThis::add( icon, QObject::tr("Enter your search terms here") ); 65 // QWhatsThis::add( icon, QObject::tr("Enter your search terms here") );
65 break; 66 break;
66 case Qtopia::DatebookDescription: 67 case Qtopia::DatebookDescription:
67 icon = Resource::loadPixmap( "osearch/summary" ); 68 icon = Resource::loadPixmap( "osearch/summary" );