-rw-r--r-- | examples/main-tab/config.in | 2 | ||||
-rw-r--r-- | examples/main-tab/main-tab.pro | 2 | ||||
-rw-r--r-- | examples/main-tab/opie-simple.control | 2 | ||||
-rw-r--r-- | examples/main-tab/simple.cpp | 11 |
4 files changed, 8 insertions, 9 deletions
diff --git a/examples/main-tab/config.in b/examples/main-tab/config.in index a40df56..640679e 100644 --- a/examples/main-tab/config.in +++ b/examples/main-tab/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config MAIN_TAB_EXAMPLE | 1 | config MAIN_TAB_EXAMPLE |
2 | boolean "Mainwindow with OTabWidget example" | 2 | boolean "Mainwindow with OTabWidget example" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIE2UI | 4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIE2CORE && LIBOPIE2UI |
diff --git a/examples/main-tab/main-tab.pro b/examples/main-tab/main-tab.pro index a0df875..033a028 100644 --- a/examples/main-tab/main-tab.pro +++ b/examples/main-tab/main-tab.pro | |||
@@ -7,11 +7,11 @@ HEADERS = simple.h | |||
7 | SOURCES = simple.cpp | 7 | SOURCES = simple.cpp |
8 | 8 | ||
9 | 9 | ||
10 | INCLUDEPATH += $(OPIEDIR)/include | 10 | INCLUDEPATH += $(OPIEDIR)/include |
11 | DEPENDPATH += $(OPIEDIR)/include | 11 | DEPENDPATH += $(OPIEDIR)/include |
12 | 12 | ||
13 | 13 | ||
14 | # we now also include opie | 14 | # we now also include opie |
15 | LIBS += -lqpe -lopieui2 | 15 | LIBS += -lqpe -lopiecore2 -lopieui2 |
16 | 16 | ||
17 | include( $(OPIEDIR)/include.pro ) | 17 | include( $(OPIEDIR)/include.pro ) |
diff --git a/examples/main-tab/opie-simple.control b/examples/main-tab/opie-simple.control index 8525a94..2046281 100644 --- a/examples/main-tab/opie-simple.control +++ b/examples/main-tab/opie-simple.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Package: opie-main-tab-example | 1 | Package: opie-main-tab-example |
2 | Files: bin/main-tab apps/Examples/main-tab.desktop | 2 | Files: bin/main-tab apps/Examples/main-tab.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, libopieui2, 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/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 | |||
@@ -1,20 +1,20 @@ | |||
1 | #include <qaction.h> // action | 1 | #include <qaction.h> // action |
2 | #include <qmenubar.h> // menubar | 2 | #include <qmenubar.h> // menubar |
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 | #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 | ||
17 | /* | 17 | /* |
18 | * implementation of simple | 18 | * implementation of simple |
19 | */ | 19 | */ |
20 | 20 | ||
@@ -82,27 +82,26 @@ void MainWindow::initUI() { | |||
82 | 82 | ||
83 | menuBarHolder->setHorizontalStretchable( true ); | 83 | menuBarHolder->setHorizontalStretchable( true ); |
84 | QMenuBar *mb = new QMenuBar( menuBarHolder ); | 84 | QMenuBar *mb = new QMenuBar( menuBarHolder ); |
85 | QToolBar *tb = new QToolBar( this ); | 85 | QToolBar *tb = new QToolBar( this ); |
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 ); |
105 | a->addTo( tb ); | 104 | a->addTo( tb ); |
106 | m_fire = a; | 105 | m_fire = a; |
107 | 106 | ||
108 | 107 | ||
@@ -168,21 +167,21 @@ Simple2::Simple2( QWidget* parent, const char* name, WFlags fl ) | |||
168 | 167 | ||
169 | /* | 168 | /* |
170 | * creates a label | 169 | * creates a label |
171 | * The first parameter is this widget so the Label is a child | 170 | * The first parameter is this widget so the Label is a child |
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 */ |
185 | m_button = new QPushButton(this); | 184 | m_button = new QPushButton(this); |
186 | /* | 185 | /* |
187 | * another way to call tr. The first parameter is the string | 186 | * another way to call tr. The first parameter is the string |
188 | * to translate and the second a hint to the translator | 187 | * to translate and the second a hint to the translator |