author | drw <drw> | 2005-04-06 22:41:05 (UTC) |
---|---|---|
committer | drw <drw> | 2005-04-06 22:41:05 (UTC) |
commit | 6ea302df768201e4ab8dd2ec797a5cc9ea6589bf (patch) (side-by-side diff) | |
tree | 9cffcfa9fecd49d0d6a0498de0cccd9aef52bf75 | |
parent | cd1b15147d372d8786c855764d397553651c358d (diff) | |
download | opie-6ea302df768201e4ab8dd2ec797a5cc9ea6589bf.zip opie-6ea302df768201e4ab8dd2ec797a5cc9ea6589bf.tar.gz opie-6ea302df768201e4ab8dd2ec797a5cc9ea6589bf.tar.bz2 |
Use OResource for loading images
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 22 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 26 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg.cpp | 13 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 9 |
4 files changed, 37 insertions, 33 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index 60f3177..539d6ba 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -22,7 +22,7 @@ #include <opie2/odebug.h> #include <opie2/opimrecordlist.h> +#include <opie2/oresource.h> #include <qpe/timestring.h> -#include <qpe/resource.h> #include "abtable.h" @@ -630,10 +630,10 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* item.value = entry.defaultEmail(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/email" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/email" ); break; case Qtopia::Emails: item.value = entry.emails(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/email" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/email" ); break; case Qtopia::HomeStreet: @@ -655,20 +655,20 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* item.value = entry.homePhone(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/phonehome" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/phonehome" ); break; case Qtopia::HomeFax: item.value = entry.homeFax(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/faxhome" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/faxhome" ); break; case Qtopia::HomeMobile: item.value = entry.homeMobile(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/mobilehome" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilehome" ); break; case Qtopia::HomeWebPage: item.value = entry.homeWebpage(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/webpagehome" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagehome" ); break; case Qtopia::Company: @@ -690,5 +690,5 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* item.value = entry.businessWebpage(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/webpagework" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/webpagework" ); break; case Qtopia::JobTitle: @@ -704,15 +704,15 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /* item.value = entry.businessPhone(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/phonework" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/phonework" ); break; case Qtopia::BusinessFax: item.value = entry.businessFax(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/faxwork" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/faxwork" ); break; case Qtopia::BusinessMobile: item.value = entry.businessMobile(); if ( !item.value.isEmpty() ) - item.icon = Resource::loadPixmap( "addressbook/mobilework" ); + item.icon = Opie::Core::OResource::loadPixmap( "addressbook/mobilework" ); break; case Qtopia::BusinessPager: diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index faae0a9..4fa9253 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -28,11 +28,9 @@ #include <opie2/opimcontact.h> #include <opie2/ocontactaccessbackend_vcard.h> +#include <opie2/oresource.h> -#include <qpe/resource.h> #include <qpe/ir.h> #include <qpe/qpemessagebox.h> #include <qmenubar.h> -// #include <qtoolbar.h> -// #include <qmenubar.h> #include <qpe/qpeapplication.h> @@ -94,5 +92,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, connect( m_searchEdit, SIGNAL(returnPressed()), this, SLOT(slotFind()) ); - QAction *a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "find" ), QString::null, 0, this, 0 ); + QAction *a = new QAction( tr( "Start Search" ), + Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ), + QString::null, 0, this, 0 ); connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); a->addTo( m_searchBar ); @@ -101,18 +101,22 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, QActionGroup *items = new QActionGroup( this, QString::null, false ); - m_actionMail = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ), - QString::null, 0, items, 0 ); + m_actionMail = new QAction( tr( "Write Mail To" ), + Opie::Core::OResource::loadPixmap( "addressbook/sendmail" ), + QString::null, 0, items, 0 ); connect( m_actionMail, SIGNAL(activated()), this, SLOT(writeMail()) ); - a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), - QString::null, 0, items, 0 ); + a = new QAction( tr("Import vCard"), + Opie::Core::OResource::loadPixmap( "addressbook/fileimport" ), + QString::null, 0, items, 0 ); connect( a, SIGNAL(activated()), this, SLOT(importvCard()) ); - a = new QAction( tr("Export vCard"), Resource::loadPixmap( "addressbook/fileexport"), + a = new QAction( tr("Export vCard"), + Opie::Core::OResource::loadPixmap( "addressbook/fileexport" ), QString::null, 0, items, 0 ); connect( a, SIGNAL(activated()), this, SLOT(exportvCard()) ); - m_actionPersonal = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ), - QString::null, 0, items, 0 , true ); + m_actionPersonal = new QAction( tr("My Personal Details"), + Opie::Core::OResource::loadPixmap( "addressbook/identity" ), + QString::null, 0, items, 0 , true ); connect( m_actionPersonal, SIGNAL(activated()), this, SLOT(slotPersonalView()) ); diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index 61e6c7e..a491fc7 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp @@ -3,7 +3,6 @@ #include <opie2/odebug.h> #include <opie2/opimcontact.h> -#include "opie2/opimcontactfields.h" - -#include <qpe/resource.h> +#include <opie2/opimcontactfields.h> +#include <opie2/oresource.h> #include <qcheckbox.h> @@ -26,8 +25,8 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name): // Set Pics to Buttons and Tabs - m_upButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/up" ) ) ); - m_downButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/down" ) ) ); - m_addButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/add" ) ) ); - m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) ); + m_upButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/up" ) ) ); + m_downButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/down" ) ) ); + m_addButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/add" ) ) ); + m_removeButton->setIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "addressbook/sub" ) ) ); diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index dec4c7c..4a0059a 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -25,9 +25,9 @@ #include <opie2/odebug.h> #include <opie2/opimcontact.h> +#include <opie2/oresource.h> #include <qpe/categoryselect.h> #include <qpe/qpeapplication.h> #include <qpe/qpedialog.h> -#include <qpe/resource.h> #include <qlabel.h> @@ -218,5 +218,6 @@ void ContactEditor::init() { cmbCat->show(); - btnNote = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Notes..." ), container ); + btnNote = new QPushButton( Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ), + tr( "Notes..." ), container ); gl->addWidget( btnNote, 9, 1 ); @@ -531,5 +532,5 @@ void ContactEditor::init() { birthdayButton->setPopupDelay(0); - QPushButton* deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), + QPushButton* deleteButton = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), tr( "Delete" ), hBox, 0 ); @@ -556,5 +557,5 @@ void ContactEditor::init() { anniversaryButton->setPopupDelay(0); - deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), + deleteButton = new QPushButton( Opie::Core::OResource::loadPixmap( "trash", Opie::Core::OResource::SmallIcon ), tr( "Delete" ), hBox, 0 ); |