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 | |
parent | d2474c8e654d223b85b6200ce09fabd3a40af8e3 (diff) | |
download | opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.zip opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.gz opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.bz2 |
Resource -> OResource
24 files changed, 47 insertions, 70 deletions
diff --git a/examples/applet/applet.pro b/examples/applet/applet.pro index 6890141..1daf1b2 100644 --- a/examples/applet/applet.pro +++ b/examples/applet/applet.pro | |||
@@ -11,5 +11,5 @@ INCLUDEPATH += $(OPIEDIR)/include | |||
11 | DEPENDSPATH += $(OPIEDIR)/include | 11 | DEPENDSPATH += $(OPIEDIR)/include |
12 | 12 | ||
13 | LIBS += -lqpe -lopieui2 | 13 | LIBS += -lqpe -lopiecore2 -lopieui2 |
14 | 14 | ||
15 | 15 | ||
diff --git a/examples/applet/config.in b/examples/applet/config.in index f6a5d20..0d4d800 100644 --- a/examples/applet/config.in +++ b/examples/applet/config.in | |||
@@ -2,3 +2,3 @@ | |||
2 | boolean "Taskbar Applet Example" | 2 | boolean "Taskbar Applet Example" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && EXAMPLES | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && EXAMPLES |
diff --git a/examples/applet/simpleimpl.cpp b/examples/applet/simpleimpl.cpp index ff651ca..d7e2db9 100644 --- a/examples/applet/simpleimpl.cpp +++ b/examples/applet/simpleimpl.cpp | |||
@@ -2,8 +2,8 @@ | |||
2 | #include "simpleimpl.h" | 2 | #include "simpleimpl.h" |
3 | 3 | ||
4 | #include <opie2/oresource.h> // for OResource loading | ||
4 | #include <opie2/otaskbarapplet.h> | 5 | #include <opie2/otaskbarapplet.h> |
5 | 6 | ||
6 | #include <qpe/applnk.h> // for AppLnk | 7 | #include <qpe/applnk.h> // for AppLnk |
7 | #include <qpe/resource.h> // for Resource loading | ||
8 | 8 | ||
9 | #include <qlabel.h> | 9 | #include <qlabel.h> |
@@ -17,27 +17,10 @@ SimpleApplet::SimpleApplet(QWidget *parent) | |||
17 | : QWidget( parent, "Simple Applet" ) { | 17 | : QWidget( parent, "Simple Applet" ) { |
18 | /* | 18 | /* |
19 | * we will load an Image, scale it for the right usage | 19 | * we will load an Pixmap, scaled for the right usage |
20 | * remember your applet might be used by different | 20 | * remember your applet might be used by different |
21 | * resolutions. | 21 | * resolutions. |
22 | * Then we will convert the image back to an Pixmap | ||
23 | * and draw this Pimxap. We need to use Image because its | ||
24 | * the only class that allows scaling. | ||
25 | */ | 22 | */ |
26 | 23 | ||
27 | QImage image = Resource::loadImage("Tux"); | 24 | m_pix = new QPixmap( Opie::Core::OResource::loadPixmap("Tux", Opie::Core::OResource::SmallIcon) ); |
28 | /* | ||
29 | * smooth scale to AppLnk smallIconSize for applest | ||
30 | * smallIconSize gets adjusted to the resolution | ||
31 | * so on some displays like SIMpad and a C-750 the smallIconSize | ||
32 | * is greater than on a iPAQ h3870 | ||
33 | */ | ||
34 | image = image.smoothScale(AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | ||
35 | |||
36 | /* | ||
37 | * now we need to convert the Image to a Pixmap cause these | ||
38 | * can be drawn more easily | ||
39 | */ | ||
40 | m_pix = new QPixmap(); | ||
41 | m_pix->convertFromImage( image ); | ||
42 | 25 | ||
43 | /* | 26 | /* |
@@ -45,5 +28,5 @@ SimpleApplet::SimpleApplet(QWidget *parent) | |||
45 | * Pixmap | 28 | * Pixmap |
46 | */ | 29 | */ |
47 | setFixedHeight(AppLnk::smallIconSize() ); | 30 | setFixedHeight( AppLnk::smallIconSize() ); |
48 | setFixedWidth( AppLnk::smallIconSize() ); | 31 | setFixedWidth( AppLnk::smallIconSize() ); |
49 | 32 | ||
diff --git a/examples/inputmethod/config.in b/examples/inputmethod/config.in index c0aa7e8..85b9725 100644 --- a/examples/inputmethod/config.in +++ b/examples/inputmethod/config.in | |||
@@ -2,3 +2,3 @@ | |||
2 | boolean "Input Method Example" | 2 | boolean "Input Method Example" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && EXAMPLES |
diff --git a/examples/inputmethod/exampleboardimpl.cpp b/examples/inputmethod/exampleboardimpl.cpp index 36989a2..6c7196b 100644 --- a/examples/inputmethod/exampleboardimpl.cpp +++ b/examples/inputmethod/exampleboardimpl.cpp | |||
@@ -4,5 +4,6 @@ | |||
4 | #include <qsignalmapper.h> | 4 | #include <qsignalmapper.h> |
5 | #include <qpushbutton.h> | 5 | #include <qpushbutton.h> |
6 | #include <qpe/resource.h> | 6 | |
7 | #include <opie2/oresource.h> | ||
7 | 8 | ||
8 | #include "exampleboardimpl.h" | 9 | #include "exampleboardimpl.h" |
@@ -119,5 +120,5 @@ QPixmap *ExampleboardImpl::icon() | |||
119 | { | 120 | { |
120 | if ( !m_icn ) | 121 | if ( !m_icn ) |
121 | m_icn = new QPixmap(Resource::loadPixmap("Tux")); | 122 | m_icn = new QPixmap(Opie::Core::OResource::loadPixmap("Tux", Opie::Core::OResource::SmallIcon)); |
122 | return m_icn; | 123 | return m_icn; |
123 | } | 124 | } |
diff --git a/examples/inputmethod/inputmethod.pro b/examples/inputmethod/inputmethod.pro index ea98dd5..56881ff 100644 --- a/examples/inputmethod/inputmethod.pro +++ b/examples/inputmethod/inputmethod.pro | |||
@@ -7,5 +7,5 @@ DESTDIR = $(OPIEDIR)/plugins/inputmethods | |||
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += ../../launcher | 8 | DEPENDPATH += ../../launcher |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe -lopiecore2 |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
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 | |||
@@ -2,3 +2,3 @@ | |||
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 | |||
@@ -13,5 +13,5 @@ DEPENDPATH += $(OPIEDIR)/include | |||
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 | |||
@@ -5,5 +5,5 @@ 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 | |||
@@ -7,8 +7,8 @@ | |||
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 | ||
@@ -88,5 +88,5 @@ void MainWindow::initUI() { | |||
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 | /* |
@@ -97,6 +97,5 @@ void MainWindow::initUI() { | |||
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 | ||
@@ -174,9 +173,9 @@ Simple2::Simple2( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
diff --git a/examples/menuapplet/config.in b/examples/menuapplet/config.in index 3167478..9425d9f 100644 --- a/examples/menuapplet/config.in +++ b/examples/menuapplet/config.in | |||
@@ -2,3 +2,3 @@ | |||
2 | boolean "O-Menu Applet" | 2 | boolean "O-Menu Applet" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && EXAMPLES |
diff --git a/examples/menuapplet/example.cpp b/examples/menuapplet/example.cpp index 8ae77da..079030f 100644 --- a/examples/menuapplet/example.cpp +++ b/examples/menuapplet/example.cpp | |||
@@ -1,6 +1,5 @@ | |||
1 | #include "example.h" | 1 | #include "example.h" |
2 | 2 | ||
3 | #include <qpe/applnk.h> | 3 | #include <opie2/oresource.h> |
4 | #include <qpe/resource.h> | ||
5 | 4 | ||
6 | /* QT */ | 5 | /* QT */ |
@@ -36,9 +35,5 @@ QString MenuAppletExample::text() const | |||
36 | QIconSet MenuAppletExample::icon() const | 35 | QIconSet MenuAppletExample::icon() const |
37 | { | 36 | { |
38 | QPixmap pix; | 37 | return Opie::Core::OResource::loadPixmap( "Tux", Opie::Core::OResource::SmallIcon ); |
39 | QImage img = Resource::loadImage( "Tux" ); | ||
40 | if ( !img.isNull() ) | ||
41 | pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
42 | return pix; | ||
43 | } | 38 | } |
44 | 39 | ||
diff --git a/examples/menuapplet/menuapplet.pro b/examples/menuapplet/menuapplet.pro index 1e20e78..e8858ec 100644 --- a/examples/menuapplet/menuapplet.pro +++ b/examples/menuapplet/menuapplet.pro | |||
@@ -7,5 +7,5 @@ DESTDIR = $(OPIEDIR)/plugins/applets | |||
7 | INCLUDEPATH += $(OPIEDIR)/include | 7 | INCLUDEPATH += $(OPIEDIR)/include |
8 | DEPENDPATH += $(OPIEDIR)/include | 8 | DEPENDPATH += $(OPIEDIR)/include |
9 | LIBS += -lqpe | 9 | LIBS += -lqpe -lopiecore2 |
10 | VERSION = 1.0.0 | 10 | VERSION = 1.0.0 |
11 | 11 | ||
diff --git a/examples/opieui/config.in b/examples/opieui/config.in index f538430..cf5fd01 100644 --- a/examples/opieui/config.in +++ b/examples/opieui/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config EXAMPLE_LIBOPIE2UI | 1 | config EXAMPLE_LIBOPIE2UI |
2 | boolean "libopieui2 examples" | 2 | boolean "libopieui2 examples" |
3 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI | 3 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && EXAMPLES |
4 | 4 | ||
diff --git a/examples/opieui/owidgetstack_example/owidgetstack_example.cpp b/examples/opieui/owidgetstack_example/owidgetstack_example.cpp index 272e42b..ded3b0c 100644 --- a/examples/opieui/owidgetstack_example/owidgetstack_example.cpp +++ b/examples/opieui/owidgetstack_example/owidgetstack_example.cpp | |||
@@ -8,5 +8,5 @@ | |||
8 | #include <opie2/oapplicationfactory.h> | 8 | #include <opie2/oapplicationfactory.h> |
9 | #include <opie2/owidgetstack.h> | 9 | #include <opie2/owidgetstack.h> |
10 | #include <qpe/resource.h> | 10 | #include <opie2/oresource.h> |
11 | 11 | ||
12 | /* QT */ | 12 | /* QT */ |
@@ -45,5 +45,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | |||
45 | QPopupMenu *menu = new QPopupMenu( this ); | 45 | QPopupMenu *menu = new QPopupMenu( this ); |
46 | 46 | ||
47 | QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"), | 47 | QAction* a = new QAction( tr("Show MainWidget"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon), |
48 | QString::null, 0, this, 0 ); | 48 | QString::null, 0, this, 0 ); |
49 | sm->setMapping(a, 1 ); | 49 | sm->setMapping(a, 1 ); |
@@ -52,5 +52,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | |||
52 | a->addTo( menu ); | 52 | a->addTo( menu ); |
53 | 53 | ||
54 | a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"), | 54 | a = new QAction( tr("Show Details Small"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon), |
55 | QString::null, 0, this, 0 ); | 55 | QString::null, 0, this, 0 ); |
56 | sm->setMapping(a, 2 ); | 56 | sm->setMapping(a, 2 ); |
@@ -59,5 +59,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | |||
59 | a->addTo( menu ); | 59 | a->addTo( menu ); |
60 | 60 | ||
61 | a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"), | 61 | a = new QAction( tr("Show Details More"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon), |
62 | QString::null, 0, this, 0 ); | 62 | QString::null, 0, this, 0 ); |
63 | sm->setMapping(a, 3 ); | 63 | sm->setMapping(a, 3 ); |
@@ -66,5 +66,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | |||
66 | a->addTo( menu ); | 66 | a->addTo( menu ); |
67 | 67 | ||
68 | a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"), | 68 | a = new QAction( tr("Show Details All"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon), |
69 | QString::null, 0, this, 0 ); | 69 | QString::null, 0, this, 0 ); |
70 | sm->setMapping(a, 4 ); | 70 | sm->setMapping(a, 4 ); |
@@ -99,5 +99,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | |||
99 | 99 | ||
100 | QLabel *lbl = new QLabel(m_stack ); | 100 | QLabel *lbl = new QLabel(m_stack ); |
101 | lbl->setText(tr("Only small Details are shown here. Määh") ); | 101 | lbl->setText(tr("Only small Details are shown here. M�h") ); |
102 | m_stack->addWidget( lbl, 2 ); | 102 | m_stack->addWidget( lbl, 2 ); |
103 | 103 | ||
@@ -107,5 +107,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl ) | |||
107 | 107 | ||
108 | lbl = new QLabel( m_stack ); | 108 | lbl = new QLabel( m_stack ); |
109 | lbl->setText( tr("<qt>Ne nicht in Bayerisch Gmain sondern in Berlin<br>Vermiss und meine Augen werden nicht eckig, da mein Bildschirm abgerundet ist<br>Es lebe Hamburg Süd,weiss du, verstehst du? ;)<br>Susi ist dOOf, es lebe die Ofenecke...", "hard to translate that") ); | 109 | lbl->setText( tr("<qt>Ne nicht in Bayerisch Gmain sondern in Berlin<br>Vermiss und meine Augen werden nicht eckig, da mein Bildschirm abgerundet ist<br>Es lebe Hamburg Sd,weiss du, verstehst du? ;)<br>Susi ist dOOf, es lebe die Ofenecke...", "hard to translate that") ); |
110 | m_stack->addWidget( lbl, 4 ); | 110 | m_stack->addWidget( lbl, 4 ); |
111 | 111 | ||
diff --git a/examples/opieui/owidgetstack_example/owidgetstack_example.pro b/examples/opieui/owidgetstack_example/owidgetstack_example.pro index 4cfce9c..8960f03 100644 --- a/examples/opieui/owidgetstack_example/owidgetstack_example.pro +++ b/examples/opieui/owidgetstack_example/owidgetstack_example.pro | |||
@@ -9,5 +9,5 @@ INCLUDEPATH += $(OPIEDIR)/include | |||
9 | DEPENDSPATH += $(OPIEDIR)/include | 9 | DEPENDSPATH += $(OPIEDIR)/include |
10 | 10 | ||
11 | LIBS += -lqpe -lopieui2 | 11 | LIBS += -lqpe -lopiecore2 -lopieui2 |
12 | 12 | ||
13 | include( $(OPIEDIR)/include.pro ) | 13 | include( $(OPIEDIR)/include.pro ) |
diff --git a/examples/simple-icon/config.in b/examples/simple-icon/config.in index ec5e1ee..f0f9181 100644 --- a/examples/simple-icon/config.in +++ b/examples/simple-icon/config.in | |||
@@ -2,3 +2,3 @@ | |||
2 | boolean "Simples Widget which loads Pixmaps and plays sound" | 2 | boolean "Simples Widget which loads Pixmaps and plays sound" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && EXAMPLES |
diff --git a/examples/simple-icon/opie-simple.control b/examples/simple-icon/opie-simple.control index 5adcf01..5e326ab 100644 --- a/examples/simple-icon/opie-simple.control +++ b/examples/simple-icon/opie-simple.control | |||
@@ -5,5 +5,5 @@ 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 icon example | 8 | Description: A simple icon example |
9 | Version: $QPE_VERSION$EXTRAVERSION | 9 | Version: $QPE_VERSION$EXTRAVERSION |
diff --git a/examples/simple-icon/simple.cpp b/examples/simple-icon/simple.cpp index fec1823..2c98ec0 100644 --- a/examples/simple-icon/simple.cpp +++ b/examples/simple-icon/simple.cpp | |||
@@ -4,9 +4,8 @@ | |||
4 | 4 | ||
5 | #include <qpe/qpeapplication.h> // the QPEApplication | 5 | #include <qpe/qpeapplication.h> // the QPEApplication |
6 | #include <qpe/resource.h> // for loading icon | ||
7 | #include <qpe/sound.h> // for playing a sound | 6 | #include <qpe/sound.h> // for playing a sound |
8 | 7 | ||
9 | #include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching | 8 | #include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching |
10 | 9 | #include <opie2/oresource.h> // for loading icon | |
11 | #include "simple.h" | 10 | #include "simple.h" |
12 | 11 | ||
@@ -54,5 +53,5 @@ Simple::Simple( QWidget* parent, const char* name, WFlags fl ) | |||
54 | * but not the ending | 53 | * but not the ending |
55 | */ | 54 | */ |
56 | lbl->setPixmap( Resource::loadPixmap("logo/opielogo") ); | 55 | lbl->setPixmap( Opie::Core::OResource::loadPixmap("logo/opielogo", Opie::Core::OResource::SmallIcon) ); |
57 | layout->addWidget( lbl ); | 56 | layout->addWidget( lbl ); |
58 | 57 | ||
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 | |||
@@ -2,3 +2,3 @@ | |||
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 | |||
@@ -5,5 +5,5 @@ 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 | |||
@@ -7,7 +7,7 @@ | |||
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" |
@@ -31,5 +31,5 @@ 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 |
@@ -129,5 +129,5 @@ void MainWindow::initUI() { | |||
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 | /* |
@@ -139,5 +139,5 @@ void MainWindow::initUI() { | |||
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 | ||
diff --git a/examples/simple-pim/opie-simple.control b/examples/simple-pim/opie-simple.control index 1b54f91..80ad85b 100644 --- a/examples/simple-pim/opie-simple.control +++ b/examples/simple-pim/opie-simple.control | |||
@@ -5,5 +5,5 @@ 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, libopiepim2, 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-pim/simple.cpp b/examples/simple-pim/simple.cpp index 00c5600..6019d04 100644 --- a/examples/simple-pim/simple.cpp +++ b/examples/simple-pim/simple.cpp | |||
@@ -9,8 +9,8 @@ This includes qpe stuff which will eventually be merged with libopie2 */ | |||
9 | #include <opie2/odebug.h> // for odebug streams | 9 | #include <opie2/odebug.h> // for odebug streams |
10 | #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> | ||
11 | #include <opie2/otabwidget.h> | 12 | #include <opie2/otabwidget.h> |
12 | #include <opie2/owait.h> | 13 | #include <opie2/owait.h> |
13 | #include <qpe/qpeapplication.h> // the QPEApplication | 14 | #include <qpe/qpeapplication.h> // the QPEApplication |
14 | #include <qpe/resource.h> | ||
15 | #include <qpe/sound.h> | 15 | #include <qpe/sound.h> |
16 | #include <qpe/qcopenvelope_qws.h> | 16 | #include <qpe/qcopenvelope_qws.h> |
@@ -132,5 +132,5 @@ void MainWindow::initUI() { | |||
132 | 132 | ||
133 | 133 | ||
134 | QAction *a = new QAction( tr("Quit"), Resource::loadIconSet("quit_icon"), | 134 | QAction *a = new QAction( tr("Quit"), Opie::Core::OResource::loadPixmap("quit_icon", Opie::Core::OResource::SmallIcon), |
135 | QString::null, 0, this, "quit_action" ); | 135 | QString::null, 0, this, "quit_action" ); |
136 | /* | 136 | /* |
@@ -142,5 +142,5 @@ void MainWindow::initUI() { | |||
142 | 142 | ||
143 | a = new QAction(tr("View Current"), | 143 | a = new QAction(tr("View Current"), |
144 | Resource::loadIconSet("zoom"), | 144 | Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon), |
145 | QString::null, 0, this, "view current"); | 145 | QString::null, 0, this, "view current"); |
146 | /* a simple whats this online explanation of out button */ | 146 | /* a simple whats this online explanation of out button */ |
@@ -154,5 +154,5 @@ void MainWindow::initUI() { | |||
154 | 154 | ||
155 | a = new QAction(tr("Choose Date"), | 155 | a = new QAction(tr("Choose Date"), |
156 | Resource::loadIconSet("day"), | 156 | Opie::Core::OResource::loadPixmap("day", Opie::Core::OResource::SmallIcon), |
157 | QString::null, 0, this, "choose date" ); | 157 | QString::null, 0, this, "choose date" ); |
158 | a->addTo( fileMenu ); | 158 | a->addTo( fileMenu ); |