summaryrefslogtreecommitdiff
path: root/core/pim
authordrw <drw>2005-04-06 22:41:05 (UTC)
committer drw <drw>2005-04-06 22:41:05 (UTC)
commit6ea302df768201e4ab8dd2ec797a5cc9ea6589bf (patch) (side-by-side diff)
tree9cffcfa9fecd49d0d6a0498de0cccd9aef52bf75 /core/pim
parentcd1b15147d372d8786c855764d397553651c358d (diff)
downloadopie-6ea302df768201e4ab8dd2ec797a5cc9ea6589bf.zip
opie-6ea302df768201e4ab8dd2ec797a5cc9ea6589bf.tar.gz
opie-6ea302df768201e4ab8dd2ec797a5cc9ea6589bf.tar.bz2
Use OResource for loading images
Diffstat (limited to 'core/pim') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp22
-rw-r--r--core/pim/addressbook/addressbook.cpp26
-rw-r--r--core/pim/addressbook/configdlg.cpp13
-rw-r--r--core/pim/addressbook/contacteditor.cpp9
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
@@ -21,9 +21,9 @@
#include <opie2/odebug.h>
#include <opie2/opimrecordlist.h>
+#include <opie2/oresource.h>
#include <qpe/timestring.h>
-#include <qpe/resource.h>
#include "abtable.h"
@@ -629,12 +629,12 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
case Qtopia::DefaultEmail:
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:
item.value = entry.homeStreet();
@@ -654,22 +654,22 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
case Qtopia::HomePhone:
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:
item.value = entry.company();
@@ -689,7 +689,7 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
case Qtopia::BusinessWebPage:
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:
item.value = entry.jobTitle();
@@ -703,17 +703,17 @@ ContactItem AbTable::findContactContact( const Opie::OPimContact &entry, int /*
case Qtopia::BusinessPhone:
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:
item.value = entry.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
@@ -27,13 +27,11 @@
#include <opie2/ofiledialog.h>
#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>
#include <qaction.h>
@@ -93,27 +91,33 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
m_searchBar->setStretchableWidget( m_searchEdit );
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 );
// Insert Contact menu items
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()) );
insertItemMenuItems( items );
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
@@ -2,9 +2,8 @@
#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>
#include <qradiobutton.h>
@@ -25,10 +24,10 @@ ConfigDlg::ConfigDlg( QWidget *parent, const char *name):
setWFlags ( WStyle_ContextHelp );
// 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" ) ) );
// Get the translation maps between Field ID and translated strings
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
@@ -24,11 +24,11 @@
#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>
#include <qlayout.h>
@@ -217,7 +217,8 @@ void ContactEditor::init() {
labCat->show();
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 );
tabMain->addTab( m_generalWidget, "addressbook/AddressBookSmall", tr( "General" ) );
@@ -530,7 +531,7 @@ void ContactEditor::init() {
birthdayButton->setPopup( m1 );
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 );
@@ -555,7 +556,7 @@ void ContactEditor::init() {
anniversaryButton->setPopup( m1 );
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 );
gl->addWidget( hBox, counter , 1 );