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