summaryrefslogtreecommitdiff
authordrw <drw>2005-06-15 22:39:20 (UTC)
committer drw <drw>2005-06-15 22:39:20 (UTC)
commite0205bac48b9d23af9feb48004c24fcf7a5e8200 (patch) (side-by-side diff)
tree2faa077192fd0bfc4fc409f0513cc0e82113fa9e
parentd2474c8e654d223b85b6200ce09fabd3a40af8e3 (diff)
downloadopie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.zip
opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.gz
opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.bz2
Resource -> OResource
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--examples/applet/applet.pro2
-rw-r--r--examples/applet/config.in2
-rw-r--r--examples/applet/simpleimpl.cpp25
-rw-r--r--examples/inputmethod/config.in2
-rw-r--r--examples/inputmethod/exampleboardimpl.cpp5
-rw-r--r--examples/inputmethod/inputmethod.pro2
-rw-r--r--examples/main-tab/config.in2
-rw-r--r--examples/main-tab/main-tab.pro2
-rw-r--r--examples/main-tab/opie-simple.control2
-rw-r--r--examples/main-tab/simple.cpp11
-rw-r--r--examples/menuapplet/config.in2
-rw-r--r--examples/menuapplet/example.cpp9
-rw-r--r--examples/menuapplet/menuapplet.pro2
-rw-r--r--examples/opieui/config.in2
-rw-r--r--examples/opieui/owidgetstack_example/owidgetstack_example.cpp14
-rw-r--r--examples/opieui/owidgetstack_example/owidgetstack_example.pro2
-rw-r--r--examples/simple-icon/config.in2
-rw-r--r--examples/simple-icon/opie-simple.control2
-rw-r--r--examples/simple-icon/simple.cpp5
-rw-r--r--examples/simple-main/config.in2
-rw-r--r--examples/simple-main/opie-simple.control2
-rw-r--r--examples/simple-main/simple.cpp8
-rw-r--r--examples/simple-pim/opie-simple.control2
-rw-r--r--examples/simple-pim/simple.cpp8
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
DEPENDSPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopieui2
+LIBS += -lqpe -lopiecore2 -lopieui2
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 @@
boolean "Taskbar Applet Example"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && EXAMPLES
+ 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 @@
#include "simpleimpl.h"
+#include <opie2/oresource.h> // for OResource loading
#include <opie2/otaskbarapplet.h>
#include <qpe/applnk.h> // for AppLnk
-#include <qpe/resource.h> // for Resource loading
#include <qlabel.h>
@@ -17,27 +17,10 @@ SimpleApplet::SimpleApplet(QWidget *parent)
: QWidget( parent, "Simple Applet" ) {
/*
- * we will load an Image, scale it for the right usage
+ * we will load an Pixmap, scaled for the right usage
* remember your applet might be used by different
* resolutions.
- * Then we will convert the image back to an Pixmap
- * and draw this Pimxap. We need to use Image because its
- * the only class that allows scaling.
*/
- QImage image = Resource::loadImage("Tux");
- /*
- * smooth scale to AppLnk smallIconSize for applest
- * smallIconSize gets adjusted to the resolution
- * so on some displays like SIMpad and a C-750 the smallIconSize
- * is greater than on a iPAQ h3870
- */
- image = image.smoothScale(AppLnk::smallIconSize(), AppLnk::smallIconSize() );
-
- /*
- * now we need to convert the Image to a Pixmap cause these
- * can be drawn more easily
- */
- m_pix = new QPixmap();
- m_pix->convertFromImage( image );
+ m_pix = new QPixmap( Opie::Core::OResource::loadPixmap("Tux", Opie::Core::OResource::SmallIcon) );
/*
@@ -45,5 +28,5 @@ SimpleApplet::SimpleApplet(QWidget *parent)
* Pixmap
*/
- setFixedHeight(AppLnk::smallIconSize() );
+ setFixedHeight( AppLnk::smallIconSize() );
setFixedWidth( AppLnk::smallIconSize() );
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 @@
boolean "Input Method Example"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES
+ 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 @@
#include <qsignalmapper.h>
#include <qpushbutton.h>
-#include <qpe/resource.h>
+
+#include <opie2/oresource.h>
#include "exampleboardimpl.h"
@@ -119,5 +120,5 @@ QPixmap *ExampleboardImpl::icon()
{
if ( !m_icn )
- m_icn = new QPixmap(Resource::loadPixmap("Tux"));
+ m_icn = new QPixmap(Opie::Core::OResource::loadPixmap("Tux", Opie::Core::OResource::SmallIcon));
return m_icn;
}
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
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += ../../launcher
-LIBS += -lqpe
+LIBS += -lqpe -lopiecore2
VERSION = 1.0.0
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 @@
boolean "Mainwindow with OTabWidget example"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIE2UI
+ 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
# we now also include opie
-LIBS += -lqpe -lopieui2
+LIBS += -lqpe -lopiecore2 -lopieui2
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
Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org>
Architecture: arm
-Depends: task-opie-minimal, opie-pics
+Depends: task-opie-minimal, libopiecore2, libopieui2, opie-pics
Description: A simple example
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 @@
#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>
@@ -88,5 +88,5 @@ void MainWindow::initUI() {
- 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" );
/*
@@ -97,6 +97,5 @@ void MainWindow::initUI() {
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");
@@ -174,9 +173,9 @@ Simple2::Simple2( QWidget* parent, const char* name, WFlags fl )
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 );
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 @@
boolean "O-Menu Applet"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES
+ 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 @@
#include "example.h"
-#include <qpe/applnk.h>
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
/* QT */
@@ -36,9 +35,5 @@ QString MenuAppletExample::text() const
QIconSet MenuAppletExample::icon() const
{
- QPixmap pix;
- QImage img = Resource::loadImage( "Tux" );
- if ( !img.isNull() )
- pix.convertFromImage( img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
- return pix;
+ return Opie::Core::OResource::loadPixmap( "Tux", Opie::Core::OResource::SmallIcon );
}
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
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe
+LIBS += -lqpe -lopiecore2
VERSION = 1.0.0
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 @@
config EXAMPLE_LIBOPIE2UI
boolean "libopieui2 examples"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && EXAMPLES
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 @@
#include <opie2/oapplicationfactory.h>
#include <opie2/owidgetstack.h>
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
/* QT */
@@ -45,5 +45,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
QPopupMenu *menu = new QPopupMenu( this );
- QAction* a = new QAction( tr("Show MainWidget"), Resource::loadPixmap("zoom"),
+ QAction* a = new QAction( tr("Show MainWidget"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 1 );
@@ -52,5 +52,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
a->addTo( menu );
- a = new QAction( tr("Show Details Small"), Resource::loadPixmap("zoom"),
+ a = new QAction( tr("Show Details Small"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 2 );
@@ -59,5 +59,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
a->addTo( menu );
- a = new QAction( tr("Show Details More"), Resource::loadPixmap("zoom"),
+ a = new QAction( tr("Show Details More"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 3 );
@@ -66,5 +66,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
a->addTo( menu );
- a = new QAction( tr("Show Details All"), Resource::loadPixmap("zoom"),
+ a = new QAction( tr("Show Details All"), Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, 0 );
sm->setMapping(a, 4 );
@@ -99,5 +99,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
QLabel *lbl = new QLabel(m_stack );
- lbl->setText(tr("Only small Details are shown here. Määh") );
+ lbl->setText(tr("Only small Details are shown here. M�h") );
m_stack->addWidget( lbl, 2 );
@@ -107,5 +107,5 @@ StackExample::StackExample( QWidget* parent, const char* name, WFlags fl )
lbl = new QLabel( m_stack );
- 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") );
+ 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") );
m_stack->addWidget( lbl, 4 );
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
DEPENDSPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopieui2
+LIBS += -lqpe -lopiecore2 -lopieui2
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 @@
boolean "Simples Widget which loads Pixmaps and plays sound"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES
+ 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
Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org>
Architecture: arm
-Depends: task-opie-minimal, opie-pics
+Depends: task-opie-minimal, libopiecore2, opie-pics
Description: A simple icon example
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 @@
#include <qpe/qpeapplication.h> // the QPEApplication
-#include <qpe/resource.h> // for loading icon
#include <qpe/sound.h> // for playing a sound
#include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching
-
+#include <opie2/oresource.h> // for loading icon
#include "simple.h"
@@ -54,5 +53,5 @@ Simple::Simple( QWidget* parent, const char* name, WFlags fl )
* 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 );
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 @@
boolean "Simple Mainwindow with Actions buttons and iconsets"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES
+ 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
Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org>
Architecture: arm
-Depends: task-opie-minimal, opie-pics
+Depends: task-opie-minimal, libopiecore2, opie-pics
Description: A simple example
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 @@
#include <qpe/qpeapplication.h> // the QPEApplication
-#include <qpe/resource.h>
#include <opie2/oapplicationfactory.h> // a template + macro to save the main method and allow quick launching
+#include <opie2/oresource.h>
#include "simple.h"
@@ -31,5 +31,5 @@ MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl )
: QMainWindow( parent, name, fl ) {
setCaption(tr("My MainWindow") );
- setIcon( Resource::loadPixmap("new") );
+ setIcon( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon) );
/*
* out mainwindow should have a menubar
@@ -129,5 +129,5 @@ void MainWindow::initUI() {
* into libqpe so the name without ending and directory is enough
*/
- 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" );
/*
@@ -139,5 +139,5 @@ void MainWindow::initUI() {
a = new QAction(tr("Fire"),
- Resource::loadIconSet("new"),
+ Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, "fire_button");
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
Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org>
Architecture: arm
-Depends: task-opie-minimal, opie-pics
+Depends: task-opie-minimal, libopiecore2, libopieui2, libopiepim2, opie-pics
Description: A simple example
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 */
#include <opie2/odebug.h> // for odebug streams
#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 <opie2/owait.h>
#include <qpe/qpeapplication.h> // the QPEApplication
-#include <qpe/resource.h>
#include <qpe/sound.h>
#include <qpe/qcopenvelope_qws.h>
@@ -132,5 +132,5 @@ void MainWindow::initUI() {
- 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" );
/*
@@ -142,5 +142,5 @@ void MainWindow::initUI() {
a = new QAction(tr("View Current"),
- Resource::loadIconSet("zoom"),
+ Opie::Core::OResource::loadPixmap("zoom", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, "view current");
/* a simple whats this online explanation of out button */
@@ -154,5 +154,5 @@ void MainWindow::initUI() {
a = new QAction(tr("Choose Date"),
- Resource::loadIconSet("day"),
+ Opie::Core::OResource::loadPixmap("day", Opie::Core::OResource::SmallIcon),
QString::null, 0, this, "choose date" );
a->addTo( fileMenu );