summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/contactitem.cpp4
-rw-r--r--core/pim/osearch/eventitem.cpp4
-rw-r--r--core/pim/osearch/todoitem.cpp4
3 files changed, 8 insertions, 4 deletions
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp
index 3928b1f..1d24b18 100644
--- a/core/pim/osearch/contactitem.cpp
+++ b/core/pim/osearch/contactitem.cpp
@@ -1,143 +1,143 @@
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 <qpixmap.h> 15#include <qpixmap.h>
16#include <opie/ocontact.h> 16#include <opie/ocontact.h>
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18#include <qpe/qcopenvelope_qws.h> 18#include <qpe/qcopenvelope_qws.h>
19 19
20ContactItem::ContactItem(OListViewItem* parent, OContact *contact) 20ContactItem::ContactItem(OListViewItem* parent, OContact *contact)
21: ResultItem(parent) 21: ResultItem(parent)
22{ 22{
23 _contact = contact; 23 _contact = contact;
24 setText(0, _contact->toShortText()); 24 setText(0, _contact->toShortText());
25 setIcon(); 25 setIcon();
26} 26}
27 27
28void ContactItem::setIcon() 28void ContactItem::setIcon()
29{ 29{
30 QPixmap icon; 30 QPixmap icon;
31 switch ( _contact->lastHitField() ) { 31 switch ( _contact->lastHitField() ) {
32 case -1: 32 case -1:
33 icon = Resource::loadPixmap( "reset" ); 33 icon = Resource::loadPixmap( "reset" );
34 break; 34 break;
35 case Qtopia::BusinessPhone: 35 case Qtopia::BusinessPhone:
36 icon = Resource::loadPixmap( "addressbook/phonework" ); 36 icon = Resource::loadPixmap( "addressbook/phonework" );
37 break; 37 break;
38 case Qtopia::BusinessFax: 38 case Qtopia::BusinessFax:
39 icon = Resource::loadPixmap( "addressbook/faxwork" ); 39 icon = Resource::loadPixmap( "addressbook/faxwork" );
40 break; 40 break;
41 case Qtopia::BusinessMobile: 41 case Qtopia::BusinessMobile:
42 icon = Resource::loadPixmap( "addressbook/mobilework" ); 42 icon = Resource::loadPixmap( "addressbook/mobilework" );
43 break; 43 break;
44 case Qtopia::DefaultEmail: 44 case Qtopia::DefaultEmail:
45 icon = Resource::loadPixmap( "addressbook/email" ); 45 icon = Resource::loadPixmap( "addressbook/email" );
46 break; 46 break;
47 case Qtopia::Emails: 47 case Qtopia::Emails:
48 icon = Resource::loadPixmap( "addressbook/email" ); 48 icon = Resource::loadPixmap( "addressbook/email" );
49 break; 49 break;
50 case Qtopia::HomePhone: 50 case Qtopia::HomePhone:
51 qDebug("homephone");
52 icon = Resource::loadPixmap( "addressbook/phonehome" ); 51 icon = Resource::loadPixmap( "addressbook/phonehome" );
53 break; 52 break;
54 case Qtopia::HomeFax: 53 case Qtopia::HomeFax:
55 icon = Resource::loadPixmap( "addressbook/faxhome" ); 54 icon = Resource::loadPixmap( "addressbook/faxhome" );
56 break; 55 break;
57 case Qtopia::HomeMobile: 56 case Qtopia::HomeMobile:
58 icon = Resource::loadPixmap( "addressbook/mobilehome" ); 57 icon = Resource::loadPixmap( "addressbook/mobilehome" );
59 break; 58 break;
60 case Qtopia::HomeWebPage: 59 case Qtopia::HomeWebPage:
61 icon = Resource::loadPixmap( "addressbook/webpagehome" ); 60 icon = Resource::loadPixmap( "addressbook/webpagehome" );
62 break; 61 break;
63 case Qtopia::BusinessWebPage: 62 case Qtopia::BusinessWebPage:
64 icon = Resource::loadPixmap( "addressbook/webpagework" ); 63 icon = Resource::loadPixmap( "addressbook/webpagework" );
65 break; 64 break;
66 case Qtopia::Title: 65 case Qtopia::Title:
66 case Qtopia::JobTitle:
67 case Qtopia::FirstName: 67 case Qtopia::FirstName:
68 case Qtopia::MiddleName: 68 case Qtopia::MiddleName:
69 case Qtopia::LastName: 69 case Qtopia::LastName:
70 case Qtopia::Suffix: 70 case Qtopia::Suffix:
71 case Qtopia::Nickname: 71 case Qtopia::Nickname:
72 case Qtopia::FileAs: 72 case Qtopia::FileAs:
73 icon = Resource::loadPixmap( "addressbook/identity" ); 73 icon = Resource::loadPixmap( "addressbook/identity" );
74 break; 74 break;
75 case Qtopia::HomeStreet: 75 case Qtopia::HomeStreet:
76 case Qtopia::HomeCity: 76 case Qtopia::HomeCity:
77 case Qtopia::HomeState: 77 case Qtopia::HomeState:
78 case Qtopia::HomeZip: 78 case Qtopia::HomeZip:
79 case Qtopia::HomeCountry: 79 case Qtopia::HomeCountry:
80 icon = Resource::loadPixmap( "addressbook/addresshome" ); 80 icon = Resource::loadPixmap( "addressbook/addresshome" );
81 break; 81 break;
82 case Qtopia::Company: 82 case Qtopia::Company:
83 case Qtopia::BusinessCity: 83 case Qtopia::BusinessCity:
84 case Qtopia::BusinessStreet: 84 case Qtopia::BusinessStreet:
85 case Qtopia::BusinessZip: 85 case Qtopia::BusinessZip:
86 case Qtopia::BusinessCountry: 86 case Qtopia::BusinessCountry:
87 case Qtopia::JobTitle:
88 case Qtopia::Department: 87 case Qtopia::Department:
89 case Qtopia::Office: 88 case Qtopia::Office:
90 case Qtopia::Manager: 89 case Qtopia::Manager:
91 case Qtopia::BusinessPager: 90 case Qtopia::BusinessPager:
92 case Qtopia::Profession: 91 case Qtopia::Profession:
93 icon = Resource::loadPixmap( "addressbook/addresshome" ); 92 icon = Resource::loadPixmap( "addressbook/addresshome" );
94 break; 93 break;
95 case Qtopia::Assistant: 94 case Qtopia::Assistant:
96 case Qtopia::Spouse: 95 case Qtopia::Spouse:
97 case Qtopia::Children: 96 case Qtopia::Children:
98 icon = Resource::loadPixmap( "osearch/personal" ); 97 icon = Resource::loadPixmap( "osearch/personal" );
99 break; 98 break;
100 case Qtopia::Birthday: 99 case Qtopia::Birthday:
101 case Qtopia::Anniversary: 100 case Qtopia::Anniversary:
102 icon = Resource::loadPixmap( "osearch/clock" ); 101 icon = Resource::loadPixmap( "osearch/clock" );
103 break; 102 break;
104 case Qtopia::Notes: 103 case Qtopia::Notes:
104 icon = Resource::loadPixmap( "txt" );
105 break; 105 break;
106 default: 106 default:
107 icon = Resource::loadPixmap( "DocsIcon" ); 107 icon = Resource::loadPixmap( "DocsIcon" );
108 break; 108 break;
109 } 109 }
110 setPixmap( 0, icon ); 110 setPixmap( 0, icon );
111} 111}
112 112
113ContactItem::~ContactItem() 113ContactItem::~ContactItem()
114{ 114{
115 delete _contact; 115 delete _contact;
116} 116}
117 117
118 118
119QString ContactItem::toRichText() 119QString ContactItem::toRichText()
120{ 120{
121 return _contact->toRichText(); 121 return _contact->toRichText();
122} 122}
123 123
124void ContactItem::action( int act ) 124void ContactItem::action( int act )
125{ 125{
126if (act == 0){ 126if (act == 0){
127 QCopEnvelope e("QPE/Application/addressbook", "show(int)"); 127 QCopEnvelope e("QPE/Application/addressbook", "show(int)");
128 e << _contact->uid(); 128 e << _contact->uid();
129}else if(act == 1){ 129}else if(act == 1){
130 QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); 130 QCopEnvelope e("QPE/Application/addressbook", "edit(int)");
131 e << _contact->uid(); 131 e << _contact->uid();
132} 132}
133 133
134} 134}
135 135
136QIntDict<QString> ContactItem::actions() 136QIntDict<QString> ContactItem::actions()
137{ 137{
138 QIntDict<QString> result; 138 QIntDict<QString> result;
139 result.insert( 0, new QString( QObject::tr("show") ) ); 139 result.insert( 0, new QString( QObject::tr("show") ) );
140 result.insert( 1, new QString( QObject::tr("edit") ) ); 140 result.insert( 1, new QString( QObject::tr("edit") ) );
141 return result; 141 return result;
142 142
143} 143}
diff --git a/core/pim/osearch/eventitem.cpp b/core/pim/osearch/eventitem.cpp
index 5b7a840..24ce8e8 100644
--- a/core/pim/osearch/eventitem.cpp
+++ b/core/pim/osearch/eventitem.cpp
@@ -3,80 +3,82 @@
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 <qdatetime.h>
16#include <qpixmap.h> 16#include <qpixmap.h>
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18#include <qpe/qcopenvelope_qws.h> 18#include <qpe/qcopenvelope_qws.h>
19#include <opie/oevent.h> 19#include <opie/oevent.h>
20 20
21EventItem::EventItem(OListViewItem* parent, OEvent *event) 21EventItem::EventItem(OListViewItem* parent, OEvent *event)
22 : ResultItem(parent) 22 : ResultItem(parent)
23{ 23{
24 _event = event; 24 _event = event;
25 setText(0, _event->toShortText() ); 25 setText(0, _event->toShortText() );
26 setIcon(); 26 setIcon();
27} 27}
28 28
29 29
30EventItem::~EventItem() 30EventItem::~EventItem()
31{ 31{
32} 32}
33 33
34 34
35QString EventItem::toRichText() 35QString EventItem::toRichText()
36{ 36{
37 return _event->toRichText(); 37 return _event->toRichText();
38} 38}
39 39
40void EventItem::action( int act ) 40void EventItem::action( int act )
41{ 41{
42 if (act == 0){ 42 if (act == 0){
43 QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)"); 43 QCopEnvelope e("QPE/Application/datebook", "viewDefault(QDate)");
44 e << _event->startDateTime().date(); 44 e << _event->startDateTime().date();
45 }else if(act == 1){ 45 }else if(act == 1){
46 QCopEnvelope e("QPE/Application/datebook", "editEvent(int)"); 46 QCopEnvelope e("QPE/Application/datebook", "editEvent(int)");
47 e << _event->uid(); 47 e << _event->uid();
48 } 48 }
49} 49}
50 50
51QIntDict<QString> EventItem::actions() 51QIntDict<QString> EventItem::actions()
52{ 52{
53 QIntDict<QString> result; 53 QIntDict<QString> result;
54 result.insert( 0, new QString( QObject::tr("show") ) ); 54 result.insert( 0, new QString( QObject::tr("show") ) );
55 result.insert( 1, new QString( QObject::tr("edit") ) ); 55 result.insert( 1, new QString( QObject::tr("edit") ) );
56 return result; 56 return result;
57} 57}
58 58
59void EventItem::setIcon() 59void EventItem::setIcon()
60{ 60{
61 QPixmap icon; 61 QPixmap icon;
62 switch ( _event->lastHitField() ) { 62 switch ( _event->lastHitField() ) {
63 case -1: 63 case -1:
64 icon = Resource::loadPixmap( "reset" ); 64 icon = Resource::loadPixmap( "reset" );
65 break; 65 break;
66 case Qtopia::DatebookDescription: 66 case Qtopia::DatebookDescription:
67 icon = Resource::loadPixmap( "osearch/summary" );
68 break;
67 case Qtopia::Notes: 69 case Qtopia::Notes:
68 icon = Resource::loadPixmap( "osearch/personal" ); 70 icon = Resource::loadPixmap( "txt" );
69 break; 71 break;
70 case Qtopia::Location: 72 case Qtopia::Location:
71 icon = Resource::loadPixmap( "home" ); 73 icon = Resource::loadPixmap( "home" );
72 break; 74 break;
73 case Qtopia::StartDateTime: 75 case Qtopia::StartDateTime:
74 case Qtopia::EndDateTime: 76 case Qtopia::EndDateTime:
75 icon = Resource::loadPixmap( "osearch/clock" ); 77 icon = Resource::loadPixmap( "osearch/clock" );
76 break; 78 break;
77 default: 79 default:
78 icon = Resource::loadPixmap( "DocsIcon" ); 80 icon = Resource::loadPixmap( "DocsIcon" );
79 break; 81 break;
80 } 82 }
81 setPixmap( 0, icon ); 83 setPixmap( 0, icon );
82} 84}
diff --git a/core/pim/osearch/todoitem.cpp b/core/pim/osearch/todoitem.cpp
index de4ea97..9808a04 100644
--- a/core/pim/osearch/todoitem.cpp
+++ b/core/pim/osearch/todoitem.cpp
@@ -1,79 +1,81 @@
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#include <opie/otodo.h> 15#include <opie/otodo.h>
16#include <qpixmap.h> 16#include <qpixmap.h>
17#include <qpe/resource.h> 17#include <qpe/resource.h>
18#include <qpe/qcopenvelope_qws.h> 18#include <qpe/qcopenvelope_qws.h>
19 19
20TodoItem::TodoItem(OListViewItem* parent, OTodo *todo) 20TodoItem::TodoItem(OListViewItem* parent, OTodo *todo)
21: ResultItem(parent) 21: ResultItem(parent)
22{ 22{
23 _todo = todo; 23 _todo = todo;
24 setText( 0, todo->toShortText() ); 24 setText( 0, todo->toShortText() );
25 setIcon(); 25 setIcon();
26} 26}
27 27
28TodoItem::~TodoItem() 28TodoItem::~TodoItem()
29{ 29{
30 delete _todo; 30 delete _todo;
31} 31}
32 32
33QString TodoItem::toRichText() 33QString TodoItem::toRichText()
34{ 34{
35 return _todo->toRichText(); 35 return _todo->toRichText();
36} 36}
37 37
38void TodoItem::action( int act ) 38void TodoItem::action( int act )
39{ 39{
40 if (act == 0){ 40 if (act == 0){
41 QCopEnvelope e("QPE/Application/todolist", "show(int)"); 41 QCopEnvelope e("QPE/Application/todolist", "show(int)");
42 e << _todo->uid(); 42 e << _todo->uid();
43 }else if (act == 1){ 43 }else if (act == 1){
44 QCopEnvelope e("QPE/Application/todolist", "edit(int)"); 44 QCopEnvelope e("QPE/Application/todolist", "edit(int)");
45 e << _todo->uid(); 45 e << _todo->uid();
46 } 46 }
47} 47}
48 48
49QIntDict<QString> TodoItem::actions() 49QIntDict<QString> TodoItem::actions()
50{ 50{
51 QIntDict<QString> result; 51 QIntDict<QString> result;
52 result.insert( 0, new QString( QObject::tr("show") ) ); 52 result.insert( 0, new QString( QObject::tr("show") ) );
53 result.insert( 1, new QString( QObject::tr("edit") ) ); 53 result.insert( 1, new QString( QObject::tr("edit") ) );
54 return result; 54 return result;
55} 55}
56 56
57void TodoItem::setIcon() 57void TodoItem::setIcon()
58{ 58{
59 QPixmap icon; 59 QPixmap icon;
60 switch ( _todo->lastHitField() ) { 60 switch ( _todo->lastHitField() ) {
61 case -1: 61 case -1:
62 icon = Resource::loadPixmap( "reset" ); 62 icon = Resource::loadPixmap( "reset" );
63 break; 63 break;
64 case OTodo::Description: 64 case OTodo::Description:
65 icon = Resource::loadPixmap( "txt" );
66 break;
65 case OTodo::Summary: 67 case OTodo::Summary:
66 icon = Resource::loadPixmap( "osearch/personal" ); 68 icon = Resource::loadPixmap( "osearch/summary" );
67 break; 69 break;
68 case OTodo::Priority: 70 case OTodo::Priority:
69 icon = Resource::loadPixmap( "todo/priority1" ); 71 icon = Resource::loadPixmap( "todo/priority1" );
70 break; 72 break;
71 case OTodo::HasDate: 73 case OTodo::HasDate:
72 icon = Resource::loadPixmap( "osearch/clock" ); 74 icon = Resource::loadPixmap( "osearch/clock" );
73 break; 75 break;
74 default: 76 default:
75 icon = Resource::loadPixmap( "DocsIcon" ); 77 icon = Resource::loadPixmap( "DocsIcon" );
76 break; 78 break;
77 } 79 }
78 setPixmap( 0, icon ); 80 setPixmap( 0, icon );
79} 81}