summaryrefslogtreecommitdiff
path: root/examples/main-tab/simple.cpp
Side-by-side diff
Diffstat (limited to 'examples/main-tab/simple.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/main-tab/simple.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/main-tab/simple.cpp b/examples/main-tab/simple.cpp
index 7edb557..1e2d028 100644
--- a/examples/main-tab/simple.cpp
+++ b/examples/main-tab/simple.cpp
@@ -3,16 +3,16 @@
#include <qtoolbar.h> // toolbar
#include <qlabel.h> // a label
#include <qpushbutton.h> // the header file for the QPushButton
#include <qlayout.h>
#include <qpe/qpeapplication.h> // the QPEApplication
-#include <qpe/resource.h>
#include <qpe/sound.h>
#include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching
+#include <opie2/oresource.h>
#include <opie2/otabwidget.h>
#include "simple.h"
/*
* implementation of simple
@@ -84,23 +84,22 @@ void MainWindow::initUI() {
QMenuBar *mb = new QMenuBar( menuBarHolder );
QToolBar *tb = new QToolBar( this );
QPopupMenu *fileMenu = new QPopupMenu( this );
- QAction *a = new QAction( tr("Quit"), Resource::loadIconSet("quit_icon"),
+ QAction *a = new QAction( tr("Quit"), Opie::Core::OResource::loadPixmap("quit_icon", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, "quit_action" );
/*
* Connect quit to the QApplication quit slot
*/
connect(a, SIGNAL(activated() ),
qApp, SLOT(quit() ) );
a->addTo( fileMenu );
- a = new QAction(tr("Fire"),
- Resource::loadIconSet("new"),
+ a = new QAction(tr("Fire"), Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, "fire_button");
/* see the power? */
a->addTo( fileMenu );
a->addTo( tb );
m_fire = a;
@@ -170,17 +169,17 @@ Simple2::Simple2( QWidget* parent, const char* name, WFlags fl )
* creates a label
* The first parameter is this widget so the Label is a child
* of us and will be deleted when we're deleted.
*/
QLabel *lbl = new QLabel( this, "a name for the label" );
/*
- * Resource will search hard for a Pixmap in $OPIEDIR/pics
+ * OResource will search hard for a Pixmap in $OPIEDIR/pics
* to find 'logo/opielogo' You need to pass the subdir
* but not the ending
*/
- lbl->setPixmap( Resource::loadPixmap("logo/opielogo") );
+ lbl->setPixmap( Opie::Core::OResource::loadPixmap("logo/opielogo", Opie::Core::OResource::SmallIcon) );
layout->addWidget( lbl );
/* creates a button as child of this widget */
m_button = new QPushButton(this);
/*