Diffstat (limited to 'examples/menuapplet/example.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | examples/menuapplet/example.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
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,12 +1,11 @@ | |||
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 */ |
7 | #include <qiconset.h> | 6 | #include <qiconset.h> |
8 | #include <qpopupmenu.h> | 7 | #include <qpopupmenu.h> |
9 | #include <qmessagebox.h> | 8 | #include <qmessagebox.h> |
10 | 9 | ||
11 | 10 | ||
12 | MenuAppletExample::MenuAppletExample() | 11 | MenuAppletExample::MenuAppletExample() |
@@ -30,21 +29,17 @@ QString MenuAppletExample::name() const | |||
30 | QString MenuAppletExample::text() const | 29 | QString MenuAppletExample::text() const |
31 | { | 30 | { |
32 | return tr( "Click the white rabbit" ); | 31 | return tr( "Click the white rabbit" ); |
33 | } | 32 | } |
34 | 33 | ||
35 | 34 | ||
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 | ||
45 | QPopupMenu* MenuAppletExample::popup(QWidget*) const | 40 | QPopupMenu* MenuAppletExample::popup(QWidget*) const |
46 | { | 41 | { |
47 | /* no subdir */ | 42 | /* no subdir */ |
48 | return 0; | 43 | return 0; |
49 | } | 44 | } |
50 | 45 | ||