Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

adresssearch.cpp

Go to the documentation of this file.
00001 //
00002 //
00003 // C++ Implementation: $MODULE$
00004 //
00005 // Description:
00006 //
00007 //
00008 // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
00009 //
00010 // Copyright: See COPYING file that comes with this distribution
00011 //
00012 //
00013 #include "adresssearch.h"
00014 #include "contactitem.h"
00015 
00016 #include <opie2/oresource.h>
00017 
00018 //#include <qwhatsthis.h>
00019 
00020 using namespace Opie;
00021 AdressSearch::AdressSearch(QListView* parent, QString name):
00022         SearchGroup(parent, name)
00023 {
00024         _contacts = 0;
00025     setPixmap( 0, Opie::Core::OResource::loadPixmap( "addressbook/AddressBook", Opie::Core::OResource::SmallIcon ) );
00026 
00027 
00028 //      QWhatsThis::add( this, QObject::tr("Search the addressbook") );
00029 /*      QPixmap pix = Resource::loadPixmap( "addressbook/AddressBook" );
00030         QImage img = pix.convertToImage();
00031         img.smoothScale( 14, 14 );
00032         pix.convertFromImage( img );
00033         setPixmap( 0, pix );*/
00034 }
00035 
00036 
00037 AdressSearch::~AdressSearch()
00038 {
00039         delete _contacts;
00040 }
00041 
00042 void AdressSearch::load()
00043 {
00044         _contacts = new OPimContactAccess("osearch");
00045 }
00046 
00047 int AdressSearch::search()
00048 {
00049         OPimRecordList<OPimContact> results = _contacts->matchRegexp(_search);
00050         for (uint i = 0; i < results.count(); i++) {
00051                 (void)new ContactItem( this, new OPimContact( results[i] ));
00052         }
00053         return results.count();
00054 }
00055 
00056 void AdressSearch::insertItem( void* )
00057 {
00058 
00059 }

Generated on Sat Nov 5 16:15:54 2005 for OPIE by  doxygen 1.4.2