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/simple-main | |
parent | d2474c8e654d223b85b6200ce09fabd3a40af8e3 (diff) | |
download | opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.zip opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.gz opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.bz2 |
Resource -> OResource
-rw-r--r-- | examples/simple-main/config.in | 2 | ||||
-rw-r--r-- | examples/simple-main/opie-simple.control | 2 | ||||
-rw-r--r-- | examples/simple-main/simple.cpp | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/examples/simple-main/config.in b/examples/simple-main/config.in index 57cf603..bc509ea 100644 --- a/examples/simple-main/config.in +++ b/examples/simple-main/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config SIMPLE_MAIN | 1 | config SIMPLE_MAIN |
2 | boolean "Simple Mainwindow with Actions buttons and iconsets" | 2 | boolean "Simple Mainwindow with Actions buttons and iconsets" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && EXAMPLES |
diff --git a/examples/simple-main/opie-simple.control b/examples/simple-main/opie-simple.control index 331b2f4..3cde394 100644 --- a/examples/simple-main/opie-simple.control +++ b/examples/simple-main/opie-simple.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Package: opie-simple-main-example | 1 | Package: opie-simple-main-example |
2 | Files: bin/simple-main apps/Examples/simple-main.desktop | 2 | Files: bin/simple-main apps/Examples/simple-main.desktop |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/examples | 4 | Section: opie/examples |
5 | Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org> | 5 | Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal, opie-pics | 7 | Depends: task-opie-minimal, libopiecore2, opie-pics |
8 | Description: A simple example | 8 | Description: A simple example |
9 | Version: $QPE_VERSION$EXTRAVERSION | 9 | Version: $QPE_VERSION$EXTRAVERSION |
diff --git a/examples/simple-main/simple.cpp b/examples/simple-main/simple.cpp index cf00cc6..b227a1f 100644 --- a/examples/simple-main/simple.cpp +++ b/examples/simple-main/simple.cpp | |||
@@ -3,15 +3,15 @@ | |||
3 | #include <qtoolbar.h> // toolbar | 3 | #include <qtoolbar.h> // toolbar |
4 | #include <qlabel.h> // a label | 4 | #include <qlabel.h> // a label |
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 | 9 | ||
11 | #include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching | 10 | #include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching |
11 | #include <opie2/oresource.h> | ||
12 | 12 | ||
13 | #include "simple.h" | 13 | #include "simple.h" |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * implementation of simple | 16 | * implementation of simple |
17 | */ | 17 | */ |
@@ -27,13 +27,13 @@ | |||
27 | using namespace Opie::Core; | 27 | using namespace Opie::Core; |
28 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) | 28 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) |
29 | 29 | ||
30 | MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) | 30 | MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) |
31 | : QMainWindow( parent, name, fl ) { | 31 | : QMainWindow( parent, name, fl ) { |
32 | setCaption(tr("My MainWindow") ); | 32 | setCaption(tr("My MainWindow") ); |
33 | setIcon( Resource::loadPixmap("new") ); | 33 | setIcon( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon) ); |
34 | /* | 34 | /* |
35 | * out mainwindow should have a menubar | 35 | * out mainwindow should have a menubar |
36 | * a toolbar, a mainwidget and use Resource | 36 | * a toolbar, a mainwidget and use Resource |
37 | * to get the IconSets | 37 | * to get the IconSets |
38 | */ | 38 | */ |
39 | /* | 39 | /* |
@@ -125,23 +125,23 @@ void MainWindow::initUI() { | |||
125 | */ | 125 | */ |
126 | /* | 126 | /* |
127 | * Note if you want a picture out of the inline directory | 127 | * Note if you want a picture out of the inline directory |
128 | * you musn't prefix inline/ inline means these pics are built in | 128 | * you musn't prefix inline/ inline means these pics are built in |
129 | * into libqpe so the name without ending and directory is enough | 129 | * into libqpe so the name without ending and directory is enough |
130 | */ | 130 | */ |
131 | QAction *a = new QAction( tr("Quit"), Resource::loadIconSet("quit_icon"), | 131 | QAction *a = new QAction( tr("Quit"), Opie::Core::OResource::loadPixmap("quit_icon", Opie::Core::OResource::SmallIcon), |
132 | QString::null, 0, this, "quit_action" ); | 132 | QString::null, 0, this, "quit_action" ); |
133 | /* | 133 | /* |
134 | * Connect quit to the QApplication quit slot | 134 | * Connect quit to the QApplication quit slot |
135 | */ | 135 | */ |
136 | connect(a, SIGNAL(activated() ), | 136 | connect(a, SIGNAL(activated() ), |
137 | qApp, SLOT(quit() ) ); | 137 | qApp, SLOT(quit() ) ); |
138 | a->addTo( fileMenu ); | 138 | a->addTo( fileMenu ); |
139 | 139 | ||
140 | a = new QAction(tr("Fire"), | 140 | a = new QAction(tr("Fire"), |
141 | Resource::loadIconSet("new"), | 141 | Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon), |
142 | QString::null, 0, this, "fire_button"); | 142 | QString::null, 0, this, "fire_button"); |
143 | 143 | ||
144 | /* see the power? */ | 144 | /* see the power? */ |
145 | a->addTo( fileMenu ); | 145 | a->addTo( fileMenu ); |
146 | a->addTo( tb ); | 146 | a->addTo( tb ); |
147 | m_fire = a; | 147 | m_fire = a; |