summaryrefslogtreecommitdiff
path: root/core/pim/osearch/contactitem.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/contactitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/contactitem.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp
index eedc374..639af46 100644
--- a/core/pim/osearch/contactitem.cpp
+++ b/core/pim/osearch/contactitem.cpp
@@ -1,66 +1,65 @@
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 <qpe/resource.h> 15#include <qpe/resource.h>
16#include <qpe/qcopenvelope_qws.h> 16#include <qpe/qcopenvelope_qws.h>
17 17
18#include <qpixmap.h>
19 18
20 19
21ContactItem::ContactItem(OListViewItem* parent, OPimContact *contact) 20ContactItem::ContactItem(OListViewItem* parent, OPimContact *contact)
22: ResultItem(parent) 21: ResultItem(parent)
23{ 22{
24 _contact = contact; 23 _contact = contact;
25 setText(0, _contact->toShortText()); 24 setText(0, _contact->toShortText());
26 setIcon(); 25 setIcon();
27} 26}
28 27
29void ContactItem::setIcon() 28void ContactItem::setIcon()
30{ 29{
31 QPixmap icon; 30 QPixmap icon;
32 switch ( _contact->lastHitField() ) { 31 switch ( _contact->lastHitField() ) {
33 case -1: 32 case -1:
34 icon = Resource::loadPixmap( "reset" ); 33 icon = Resource::loadPixmap( "reset" );
35 break; 34 break;
36 case Qtopia::BusinessPhone: 35 case Qtopia::BusinessPhone:
37 icon = Resource::loadPixmap( "addressbook/phonework" ); 36 icon = Resource::loadPixmap( "addressbook/phonework" );
38 break; 37 break;
39 case Qtopia::BusinessFax: 38 case Qtopia::BusinessFax:
40 icon = Resource::loadPixmap( "addressbook/faxwork" ); 39 icon = Resource::loadPixmap( "addressbook/faxwork" );
41 break; 40 break;
42 case Qtopia::BusinessMobile: 41 case Qtopia::BusinessMobile:
43 icon = Resource::loadPixmap( "addressbook/mobilework" ); 42 icon = Resource::loadPixmap( "addressbook/mobilework" );
44 break; 43 break;
45 case Qtopia::DefaultEmail: 44 case Qtopia::DefaultEmail:
46 case Qtopia::Emails: 45 case Qtopia::Emails:
47 icon = Resource::loadPixmap( "addressbook/email" ); 46 icon = Resource::loadPixmap( "addressbook/email" );
48 break; 47 break;
49 case Qtopia::HomePhone: 48 case Qtopia::HomePhone:
50 icon = Resource::loadPixmap( "addressbook/phonehome" ); 49 icon = Resource::loadPixmap( "addressbook/phonehome" );
51 break; 50 break;
52 case Qtopia::HomeFax: 51 case Qtopia::HomeFax:
53 icon = Resource::loadPixmap( "addressbook/faxhome" ); 52 icon = Resource::loadPixmap( "addressbook/faxhome" );
54 break; 53 break;
55 case Qtopia::HomeMobile: 54 case Qtopia::HomeMobile:
56 icon = Resource::loadPixmap( "addressbook/mobilehome" ); 55 icon = Resource::loadPixmap( "addressbook/mobilehome" );
57 break; 56 break;
58 case Qtopia::HomeWebPage: 57 case Qtopia::HomeWebPage:
59 icon = Resource::loadPixmap( "addressbook/webpagehome" ); 58 icon = Resource::loadPixmap( "addressbook/webpagehome" );
60 break; 59 break;
61 case Qtopia::BusinessWebPage: 60 case Qtopia::BusinessWebPage:
62 icon = Resource::loadPixmap( "addressbook/webpagework" ); 61 icon = Resource::loadPixmap( "addressbook/webpagework" );
63 break; 62 break;
64 case Qtopia::Title: 63 case Qtopia::Title:
65 case Qtopia::JobTitle: 64 case Qtopia::JobTitle:
66 case Qtopia::FirstName: 65 case Qtopia::FirstName: