summaryrefslogtreecommitdiff
path: root/core/pim/osearch/adresssearch.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/adresssearch.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/adresssearch.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp
index dbd6df6..6891f03 100644
--- a/core/pim/osearch/adresssearch.cpp
+++ b/core/pim/osearch/adresssearch.cpp
@@ -1,61 +1,59 @@
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 "adresssearch.h" 13#include "adresssearch.h"
14#include "contactitem.h" 14#include "contactitem.h"
15 15
16#include <qpe/resource.h> 16#include <qpe/resource.h>
17 17
18#include <qstring.h>
19#include <qiconset.h>
20//#include <qwhatsthis.h> 18//#include <qwhatsthis.h>
21 19
22AdressSearch::AdressSearch(QListView* parent, QString name): 20AdressSearch::AdressSearch(QListView* parent, QString name):
23 SearchGroup(parent, name) 21 SearchGroup(parent, name)
24{ 22{
25 _contacts = 0; 23 _contacts = 0;
26 QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" ); 24 QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" );
27 setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); 25 setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
28 26
29 27
30 //QWhatsThis::add( this, QObject::tr("Search the addressbook") ); 28 //QWhatsThis::add( this, QObject::tr("Search the addressbook") );
31 /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); 29 /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" );
32 QImage img = pix.convertToImage(); 30 QImage img = pix.convertToImage();
33 img.smoothScale( 14, 14 ); 31 img.smoothScale( 14, 14 );
34 pix.convertFromImage( img ); 32 pix.convertFromImage( img );
35 setPixmap( 0, pix );*/ 33 setPixmap( 0, pix );*/
36} 34}
37 35
38 36
39AdressSearch::~AdressSearch() 37AdressSearch::~AdressSearch()
40{ 38{
41 delete _contacts; 39 delete _contacts;
42} 40}
43 41
44void AdressSearch::load() 42void AdressSearch::load()
45{ 43{
46 _contacts = new OPimContactAccess("osearch"); 44 _contacts = new OPimContactAccess("osearch");
47} 45}
48 46
49int AdressSearch::search() 47int AdressSearch::search()
50{ 48{
51 OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search); 49 OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search);
52 for (uint i = 0; i < results.count(); i++) { 50 for (uint i = 0; i < results.count(); i++) {
53 (void)new ContactItem( this, new OPimContact( results[i] )); 51 (void)new ContactItem( this, new OPimContact( results[i] ));
54 } 52 }
55 return results.count(); 53 return results.count();
56} 54}
57 55
58void AdressSearch::insertItem( void* ) 56void AdressSearch::insertItem( void* )
59{ 57{
60 58
61} 59}