summaryrefslogtreecommitdiff
path: root/core/pim/osearch/adresssearch.cpp
authorharlekin <harlekin>2004-03-01 16:38:12 (UTC)
committer harlekin <harlekin>2004-03-01 16:38:12 (UTC)
commit49615014f281a58bd9bde5543692ffddab052755 (patch) (unidiff)
treefea29073a62a2217ce25976e492772f0636dce80 /core/pim/osearch/adresssearch.cpp
parent032f2d909293fb29e6c7e3cf9cce1a12484c80f7 (diff)
downloadopie-49615014f281a58bd9bde5543692ffddab052755.zip
opie-49615014f281a58bd9bde5543692ffddab052755.tar.gz
opie-49615014f281a58bd9bde5543692ffddab052755.tar.bz2
osearch libopie1->libopie2
Diffstat (limited to 'core/pim/osearch/adresssearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/adresssearch.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp
index 7681ea2..dbd6df6 100644
--- a/core/pim/osearch/adresssearch.cpp
+++ b/core/pim/osearch/adresssearch.cpp
@@ -8,29 +8,28 @@
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"
15
16#include <qpe/resource.h>
14 17
15#include <qstring.h> 18#include <qstring.h>
16#include <qiconset.h> 19#include <qiconset.h>
17//#include <qwhatsthis.h> 20//#include <qwhatsthis.h>
18#include <qpe/resource.h>
19#include <opie/ocontactaccess.h>
20
21#include "contactitem.h"
22 21
23AdressSearch::AdressSearch(QListView* parent, QString name): 22AdressSearch::AdressSearch(QListView* parent, QString name):
24 SearchGroup(parent, name) 23 SearchGroup(parent, name)
25{ 24{
26 _contacts = 0; 25 _contacts = 0;
27 QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" ); 26 QIconSet is = Resource::loadIconSet( "addressbook/AddressBookSmall" );
28 setPixmap( 0, is.pixmap( QIconSet::Large, true ) ); 27 setPixmap( 0, is.pixmap( QIconSet::Large, true ) );
29 28
30 29
31 //QWhatsThis::add( this, QObject::tr("Search the addressbook") ); 30 //QWhatsThis::add( this, QObject::tr("Search the addressbook") );
32 /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); 31 /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" );
33 QImage img = pix.convertToImage(); 32 QImage img = pix.convertToImage();
34 img.smoothScale( 14, 14 ); 33 img.smoothScale( 14, 14 );
35 pix.convertFromImage( img ); 34 pix.convertFromImage( img );
36 setPixmap( 0, pix );*/ 35 setPixmap( 0, pix );*/
@@ -41,20 +40,20 @@ AdressSearch::~AdressSearch()
41{ 40{
42 delete _contacts; 41 delete _contacts;
43} 42}
44 43
45void AdressSearch::load() 44void AdressSearch::load()
46{ 45{
47 _contacts = new OContactAccess("osearch"); 46 _contacts = new OPimContactAccess("osearch");
48} 47}
49 48
50int AdressSearch::search() 49int AdressSearch::search()
51{ 50{
52 ORecordList<OContact> results = _contacts->matchRegexp(_search); 51 OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search);
53 for (uint i = 0; i < results.count(); i++) { 52 for (uint i = 0; i < results.count(); i++) {
54 (void)new ContactItem( this, new OContact( results[i] )); 53 (void)new ContactItem( this, new OPimContact( results[i] ));
55 } 54 }
56 return results.count(); 55 return results.count();
57} 56}
58 57
59void AdressSearch::insertItem( void* ) 58void AdressSearch::insertItem( void* )
60{ 59{