Diffstat (limited to 'core/pim/osearch/adresssearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/adresssearch.cpp | 19 |
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 | |||
@@ -11,23 +11,22 @@ | |||
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 | ||
23 | AdressSearch::AdressSearch(QListView* parent, QString name): | 22 | AdressSearch::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(); |
@@ -44,14 +43,14 @@ AdressSearch::~AdressSearch() | |||
44 | 43 | ||
45 | void AdressSearch::load() | 44 | void AdressSearch::load() |
46 | { | 45 | { |
47 | _contacts = new OContactAccess("osearch"); | 46 | _contacts = new OPimContactAccess("osearch"); |
48 | } | 47 | } |
49 | 48 | ||
50 | int AdressSearch::search() | 49 | int 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 | } |