summaryrefslogtreecommitdiff
path: root/core/pim/osearch/todoitem.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/todoitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/todoitem.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp
index c20f1fd..be780a1 100644
--- a/core/pim/osearch/todoitem.cpp
+++ b/core/pim/osearch/todoitem.cpp
@@ -1,67 +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 "todoitem.h" 13#include "todoitem.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 <qpixmap.h>
20 19
21 20
22TodoItem::TodoItem(OListViewItem* parent, OPimTodo *todo) 21TodoItem::TodoItem(OListViewItem* parent, OPimTodo *todo)
23: ResultItem(parent) 22: ResultItem(parent)
24{ 23{
25 _todo = todo; 24 _todo = todo;
26 setText( 0, todo->toShortText() ); 25 setText( 0, todo->toShortText() );
27 setIcon(); 26 setIcon();
28} 27}
29 28
30TodoItem::~TodoItem() 29TodoItem::~TodoItem()
31{ 30{
32 delete _todo; 31 delete _todo;
33} 32}
34 33
35QString TodoItem::toRichText() 34QString TodoItem::toRichText()
36{ 35{
37 return _todo->toRichText(); 36 return _todo->toRichText();
38} 37}
39 38
40void TodoItem::action( int act ) 39void TodoItem::action( int act )
41{ 40{
42 if (act == 0){ 41 if (act == 0){
43 QCopEnvelope e("QPE/Application/todolist", "show(int)"); 42 QCopEnvelope e("QPE/Application/todolist", "show(int)");
44 e << _todo->uid(); 43 e << _todo->uid();
45 }else if (act == 1){ 44 }else if (act == 1){
46 QCopEnvelope e("QPE/Application/todolist", "edit(int)"); 45 QCopEnvelope e("QPE/Application/todolist", "edit(int)");
47 e << _todo->uid(); 46 e << _todo->uid();
48 } 47 }
49} 48}
50 49
51QIntDict<QString> TodoItem::actions() 50QIntDict<QString> TodoItem::actions()
52{ 51{
53 QIntDict<QString> result; 52 QIntDict<QString> result;
54 result.insert( 0, new QString( QObject::tr("show") ) ); 53 result.insert( 0, new QString( QObject::tr("show") ) );
55 result.insert( 1, new QString( QObject::tr("edit") ) ); 54 result.insert( 1, new QString( QObject::tr("edit") ) );
56 return result; 55 return result;
57} 56}
58 57
59void TodoItem::setIcon() 58void TodoItem::setIcon()
60{ 59{
61 QPixmap icon; 60 QPixmap icon;
62 switch ( _todo->lastHitField() ) { 61 switch ( _todo->lastHitField() ) {
63 case -1: 62 case -1:
64 icon = Resource::loadPixmap( "reset" ); 63 icon = Resource::loadPixmap( "reset" );
65 break; 64 break;
66 case OPimTodo::Description: 65 case OPimTodo::Description:
67 icon = Resource::loadPixmap( "txt" ); 66 icon = Resource::loadPixmap( "txt" );