author | drw <drw> | 2005-04-15 17:18:32 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-15 17:18:32 (UTC) |
commit | e2d5048b65d95ba7d658aabadece4e91f17f6310 (patch) (side-by-side diff) | |
tree | f1ab32bf3790a315554fe4baa191d74f80d66933 /core/pim/osearch/contactitem.cpp | |
parent | 4bf8d42034beee5e28b25182e21cf74f3c2da6a8 (diff) | |
download | opie-e2d5048b65d95ba7d658aabadece4e91f17f6310.zip opie-e2d5048b65d95ba7d658aabadece4e91f17f6310.tar.gz opie-e2d5048b65d95ba7d658aabadece4e91f17f6310.tar.bz2 |
Resource -> OResource
Diffstat (limited to 'core/pim/osearch/contactitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/osearch/contactitem.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/core/pim/osearch/contactitem.cpp b/core/pim/osearch/contactitem.cpp index c89c6e2..81b6359 100644 --- a/core/pim/osearch/contactitem.cpp +++ b/core/pim/osearch/contactitem.cpp @@ -1,141 +1,142 @@ // // // C++ Implementation: $MODULE$ // // Description: // // // Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 // // Copyright: See COPYING file that comes with this distribution // // #include "contactitem.h" -#include <qpe/resource.h> +#include <opie2/oresource.h> + #include <qpe/qcopenvelope_qws.h> using namespace Opie; ContactItem::ContactItem(OListViewItem* parent, OPimContact *contact) : ResultItem(parent) { _contact = contact; setText(0, _contact->toShortText()); setIcon(); } void ContactItem::setIcon() { QPixmap icon; switch ( _contact->lastHitField() ) { case -1: - icon = Resource::loadPixmap( "reset" ); + icon = Opie::Core::OResource::loadPixmap( "reset", Opie::Core::OResource::SmallIcon ); break; case Qtopia::BusinessPhone: - icon = Resource::loadPixmap( "addressbook/phonework" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/phonework", Opie::Core::OResource::SmallIcon ); break; case Qtopia::BusinessFax: - icon = Resource::loadPixmap( "addressbook/faxwork" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/faxwork", Opie::Core::OResource::SmallIcon ); break; case Qtopia::BusinessMobile: - icon = Resource::loadPixmap( "addressbook/mobilework" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilework", Opie::Core::OResource::SmallIcon ); break; case Qtopia::DefaultEmail: case Qtopia::Emails: - icon = Resource::loadPixmap( "addressbook/email" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/email", Opie::Core::OResource::SmallIcon ); break; case Qtopia::HomePhone: - icon = Resource::loadPixmap( "addressbook/phonehome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/phonehome", Opie::Core::OResource::SmallIcon ); break; case Qtopia::HomeFax: - icon = Resource::loadPixmap( "addressbook/faxhome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/faxhome", Opie::Core::OResource::SmallIcon ); break; case Qtopia::HomeMobile: - icon = Resource::loadPixmap( "addressbook/mobilehome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilehome", Opie::Core::OResource::SmallIcon ); break; case Qtopia::HomeWebPage: - icon = Resource::loadPixmap( "addressbook/webpagehome" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagehome", Opie::Core::OResource::SmallIcon ); break; case Qtopia::BusinessWebPage: - icon = Resource::loadPixmap( "addressbook/webpagework" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagework", Opie::Core::OResource::SmallIcon ); break; case Qtopia::Title: case Qtopia::JobTitle: case Qtopia::FirstName: case Qtopia::MiddleName: case Qtopia::LastName: case Qtopia::Suffix: case Qtopia::Nickname: case Qtopia::FileAs: - icon = Resource::loadPixmap( "addressbook/identity" ); + icon = Opie::Core::OResource::loadPixmap( "addressbook/identity", Opie::Core::OResource::SmallIcon ); break; case Qtopia::HomeStreet: case Qtopia::HomeCity: case Qtopia::HomeState: case Qtopia::HomeZip: case Qtopia::HomeCountry: - icon = Resource::loadPixmap( "osearch/addresshome" ); + icon = Opie::Core::OResource::loadPixmap( "osearch/addresshome", Opie::Core::OResource::SmallIcon ); break; case Qtopia::Company: case Qtopia::BusinessCity: case Qtopia::BusinessStreet: case Qtopia::BusinessZip: case Qtopia::BusinessCountry: case Qtopia::Department: case Qtopia::Office: case Qtopia::Manager: case Qtopia::BusinessPager: case Qtopia::Profession: - icon = Resource::loadPixmap( "osearch/addresshome" ); + icon = Opie::Core::OResource::loadPixmap( "osearch/addresshome", Opie::Core::OResource::SmallIcon ); break; case Qtopia::Assistant: case Qtopia::Spouse: case Qtopia::Children: - icon = Resource::loadPixmap( "osearch/personal" ); + icon = Opie::Core::OResource::loadPixmap( "osearch/personal", Opie::Core::OResource::SmallIcon ); break; case Qtopia::Birthday: case Qtopia::Anniversary: - icon = Resource::loadPixmap( "osearch/clock" ); + icon = Opie::Core::OResource::loadPixmap( "osearch/clock", Opie::Core::OResource::SmallIcon ); break; case Qtopia::Notes: - icon = Resource::loadPixmap( "txt" ); + icon = Opie::Core::OResource::loadPixmap( "txt", Opie::Core::OResource::SmallIcon ); break; default: - icon = Resource::loadPixmap( "DocsIcon" ); + icon = Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ); break; } setPixmap( 0, icon ); } ContactItem::~ContactItem() { delete _contact; } QString ContactItem::toRichText() { return _contact->toRichText(); } void ContactItem::action( int act ) { if (act == 0){ QCopEnvelope e("QPE/Application/addressbook", "show(int)"); e << _contact->uid(); }else if(act == 1){ QCopEnvelope e("QPE/Application/addressbook", "edit(int)"); e << _contact->uid(); } } QIntDict<QString> ContactItem::actions() { QIntDict<QString> result; result.insert( 0, new QString( QObject::tr("show") ) ); result.insert( 1, new QString( QObject::tr("edit") ) ); return result; } |