author | tille <tille> | 2003-05-13 13:46:19 (UTC) |
---|---|---|
committer | tille <tille> | 2003-05-13 13:46:19 (UTC) |
commit | ba4bb8e673fba43ae7a232942dea14d166991530 (patch) (unidiff) | |
tree | e775ad637d5256eb1412e576c1bd5e77ed50406d /core/pim/osearch/adresssearch.cpp | |
parent | 1461a41433a732e3a615508e5de23f8acd91de6a (diff) | |
download | opie-ba4bb8e673fba43ae7a232942dea14d166991530.zip opie-ba4bb8e673fba43ae7a232942dea14d166991530.tar.gz opie-ba4bb8e673fba43ae7a232942dea14d166991530.tar.bz2 |
icons ;)
Diffstat (limited to 'core/pim/osearch/adresssearch.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/adresssearch.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/pim/osearch/adresssearch.cpp b/core/pim/osearch/adresssearch.cpp index 69ad9ef..252fb40 100644 --- a/core/pim/osearch/adresssearch.cpp +++ b/core/pim/osearch/adresssearch.cpp | |||
@@ -1,48 +1,56 @@ | |||
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 | 14 | ||
15 | #include <opie/ocontactaccess.h> | 15 | #include <opie/ocontactaccess.h> |
16 | #include <qstring.h> | 16 | #include <qstring.h> |
17 | #include <qiconset.h> | ||
18 | #include <qpe/resource.h> | ||
17 | 19 | ||
18 | #include "contactitem.h" | 20 | #include "contactitem.h" |
19 | //#include <qdir.h> | ||
20 | 21 | ||
21 | AdressSearch::AdressSearch(QListView* parent, QString name): | 22 | AdressSearch::AdressSearch(QListView* parent, QString name): |
22 | SearchGroup(parent, name) | 23 | SearchGroup(parent, name) |
23 | { | 24 | { |
24 | _contacts = 0; | 25 | _contacts = 0; |
26 | QIconSet is = Resource::loadIconSet( "addressbook/AddressBook" ); | ||
27 | setPixmap( 0, is.pixmap( QIconSet::Small, true ) ); | ||
28 | /*QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" ); | ||
29 | QImage img = pix.convertToImage(); | ||
30 | img.smoothScale( 14, 14 ); | ||
31 | pix.convertFromImage( img ); | ||
32 | setPixmap( 0, pix );*/ | ||
25 | } | 33 | } |
26 | 34 | ||
27 | 35 | ||
28 | AdressSearch::~AdressSearch() | 36 | AdressSearch::~AdressSearch() |
29 | { | 37 | { |
30 | delete _contacts; | 38 | delete _contacts; |
31 | } | 39 | } |
32 | 40 | ||
33 | void AdressSearch::load() | 41 | void AdressSearch::load() |
34 | { | 42 | { |
35 | _contacts = new OContactAccess("osearch"); | 43 | _contacts = new OContactAccess("osearch"); |
36 | } | 44 | } |
37 | 45 | ||
38 | int AdressSearch::search() | 46 | int AdressSearch::search() |
39 | { | 47 | { |
40 | ORecordList<OContact> results = _contacts->matchRegexp(_search); | 48 | ORecordList<OContact> results = _contacts->matchRegexp(_search); |
41 | for (uint i = 0; i < results.count(); i++) { | 49 | for (uint i = 0; i < results.count(); i++) { |
42 | new ContactItem( this, new OContact( results[i] )); | 50 | new ContactItem( this, new OContact( results[i] )); |
43 | } | 51 | } |
44 | return results.count(); | 52 | return results.count(); |
45 | } | 53 | } |
46 | 54 | ||
47 | void AdressSearch::insertItem( void* ) | 55 | void AdressSearch::insertItem( void* ) |
48 | { | 56 | { |