author | drw <drw> | 2005-06-15 22:39:20 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-15 22:39:20 (UTC) |
commit | e0205bac48b9d23af9feb48004c24fcf7a5e8200 (patch) (unidiff) | |
tree | 2faa077192fd0bfc4fc409f0513cc0e82113fa9e /examples/main-tab/simple.cpp | |
parent | d2474c8e654d223b85b6200ce09fabd3a40af8e3 (diff) | |
download | opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.zip opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.gz opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.bz2 |
Resource -> OResource
-rw-r--r-- | examples/main-tab/simple.cpp | 11 |
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 | |||
@@ -5,12 +5,12 @@ | |||
5 | #include <qpushbutton.h> // the header file for the QPushButton | 5 | #include <qpushbutton.h> // the header file for the QPushButton |
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
7 | 7 | ||
8 | #include <qpe/qpeapplication.h> // the QPEApplication | 8 | #include <qpe/qpeapplication.h> // the QPEApplication |
9 | #include <qpe/resource.h> | ||
10 | #include <qpe/sound.h> | 9 | #include <qpe/sound.h> |
11 | 10 | ||
12 | #include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching | 11 | #include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching |
12 | #include <opie2/oresource.h> | ||
13 | #include <opie2/otabwidget.h> | 13 | #include <opie2/otabwidget.h> |
14 | 14 | ||
15 | #include "simple.h" | 15 | #include "simple.h" |
16 | 16 | ||
@@ -86,19 +86,18 @@ void MainWindow::initUI() { | |||
86 | 86 | ||
87 | QPopupMenu *fileMenu = new QPopupMenu( this ); | 87 | QPopupMenu *fileMenu = new QPopupMenu( this ); |
88 | 88 | ||
89 | 89 | ||
90 | QAction *a = new QAction( tr("Quit"), Resource::loadIconSet("quit_icon"), | 90 | QAction *a = new QAction( tr("Quit"), Opie::Core::OResource::loadPixmap("quit_icon", Opie::Core::OResource::SmallIcon), |
91 | QString::null, 0, this, "quit_action" ); | 91 | QString::null, 0, this, "quit_action" ); |
92 | /* | 92 | /* |
93 | * Connect quit to the QApplication quit slot | 93 | * Connect quit to the QApplication quit slot |
94 | */ | 94 | */ |
95 | connect(a, SIGNAL(activated() ), | 95 | connect(a, SIGNAL(activated() ), |
96 | qApp, SLOT(quit() ) ); | 96 | qApp, SLOT(quit() ) ); |
97 | a->addTo( fileMenu ); | 97 | a->addTo( fileMenu ); |
98 | 98 | ||
99 | a = new QAction(tr("Fire"), | 99 | a = new QAction(tr("Fire"), Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon), |
100 | Resource::loadIconSet("new"), | ||
101 | QString::null, 0, this, "fire_button"); | 100 | QString::null, 0, this, "fire_button"); |
102 | 101 | ||
103 | /* see the power? */ | 102 | /* see the power? */ |
104 | a->addTo( fileMenu ); | 103 | a->addTo( fileMenu ); |
@@ -172,13 +171,13 @@ Simple2::Simple2( QWidget* parent, const char* name, WFlags fl ) | |||
172 | * of us and will be deleted when we're deleted. | 171 | * of us and will be deleted when we're deleted. |
173 | */ | 172 | */ |
174 | QLabel *lbl = new QLabel( this, "a name for the label" ); | 173 | QLabel *lbl = new QLabel( this, "a name for the label" ); |
175 | /* | 174 | /* |
176 | * Resource will search hard for a Pixmap in $OPIEDIR/pics | 175 | * OResource will search hard for a Pixmap in $OPIEDIR/pics |
177 | * to find 'logo/opielogo' You need to pass the subdir | 176 | * to find 'logo/opielogo' You need to pass the subdir |
178 | * but not the ending | 177 | * but not the ending |
179 | */ | 178 | */ |
180 | lbl->setPixmap( Resource::loadPixmap("logo/opielogo") ); | 179 | lbl->setPixmap( Opie::Core::OResource::loadPixmap("logo/opielogo", Opie::Core::OResource::SmallIcon) ); |
181 | layout->addWidget( lbl ); | 180 | layout->addWidget( lbl ); |
182 | 181 | ||
183 | 182 | ||
184 | /* creates a button as child of this widget */ | 183 | /* creates a button as child of this widget */ |