summaryrefslogtreecommitdiff
path: root/examples/applet
authordrw <drw>2005-06-15 22:39:20 (UTC)
committer drw <drw>2005-06-15 22:39:20 (UTC)
commite0205bac48b9d23af9feb48004c24fcf7a5e8200 (patch) (unidiff)
tree2faa077192fd0bfc4fc409f0513cc0e82113fa9e /examples/applet
parentd2474c8e654d223b85b6200ce09fabd3a40af8e3 (diff)
downloadopie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.zip
opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.gz
opie-e0205bac48b9d23af9feb48004c24fcf7a5e8200.tar.bz2
Resource -> OResource
Diffstat (limited to 'examples/applet') (more/less context) (show whitespace changes)
-rw-r--r--examples/applet/applet.pro2
-rw-r--r--examples/applet/config.in2
-rw-r--r--examples/applet/simpleimpl.cpp23
3 files changed, 5 insertions, 22 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
@@ -12,3 +12,3 @@ DEPENDSPATH += $(OPIEDIR)/include
12 12
13LIBS += -lqpe -lopieui2 13LIBS += -lqpe -lopiecore2 -lopieui2
14 14
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
@@ -3,2 +3,2 @@
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
@@ -3,2 +3,3 @@
3 3
4#include <opie2/oresource.h> // for OResource loading
4#include <opie2/otaskbarapplet.h> 5#include <opie2/otaskbarapplet.h>
@@ -6,3 +7,2 @@
6#include <qpe/applnk.h> // for AppLnk 7#include <qpe/applnk.h> // for AppLnk
7#include <qpe/resource.h> // for Resource loading
8 8
@@ -18,25 +18,8 @@ SimpleApplet::SimpleApplet(QWidget *parent)
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