Diffstat (limited to 'noncore/applets/autorotateapplet/autorotate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/autorotateapplet/autorotate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp index 34802fb..28b631b 100644 --- a/noncore/applets/autorotateapplet/autorotate.cpp +++ b/noncore/applets/autorotateapplet/autorotate.cpp | |||
@@ -1,56 +1,56 @@ | |||
1 | /* | 1 | /* |
2 | * copyright : (c) 2003 by Greg Gilbert | 2 | * copyright : (c) 2003 by Greg Gilbert |
3 | * email : greg@treke.net | 3 | * email : greg@treke.net |
4 | * based on the cardmon applet by Max Reiss | 4 | * based on the cardmon applet by Max Reiss |
5 | * * | 5 | * * |
6 | * This program is free software; you can redistribute it and/or modify * | 6 | * This program is free software; you can redistribute it and/or modify * |
7 | * it under the terms of the GNU General Public License as published by * | 7 | * it under the terms of the GNU General Public License as published by * |
8 | * the Free Software Foundation; either version 2 of the License, or * | 8 | * the Free Software Foundation; either version 2 of the License, or * |
9 | * (at your option) any later version. * | 9 | * (at your option) any later version. * |
10 | * * | 10 | * * |
11 | *************************************************************************/ | 11 | *************************************************************************/ |
12 | 12 | ||
13 | #include "autorotate.h" | 13 | #include "autorotate.h" |
14 | 14 | ||
15 | /* OPIE */ | 15 | /* OPIE */ |
16 | #include <opie2/odebug.h> | 16 | #include <opie2/odebug.h> |
17 | #include <opie2/otaskbarapplet.h> | 17 | #include <opie2/otaskbarapplet.h> |
18 | #include <opie2/oresource.h> | ||
18 | #include <qpe/applnk.h> | 19 | #include <qpe/applnk.h> |
19 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
20 | #include <qpe/resource.h> | ||
21 | using namespace Opie::Core; | 21 | using namespace Opie::Core; |
22 | 22 | ||
23 | /* QT */ | 23 | /* QT */ |
24 | #include <qpainter.h> | 24 | #include <qpainter.h> |
25 | 25 | ||
26 | AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) | 26 | AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) |
27 | { | 27 | { |
28 | setFixedWidth( AppLnk::smallIconSize() ); | 28 | setFixedWidth( AppLnk::smallIconSize() ); |
29 | setFixedHeight( AppLnk::smallIconSize() ); | 29 | setFixedHeight( AppLnk::smallIconSize() ); |
30 | 30 | ||
31 | enabledPm.convertFromImage( Resource::loadImage("autorotate/rotate").smoothScale( height(), width() ) ); | 31 | enabledPm = Opie::Core::OResource::loadImage("autorotate/rotate", Opie::Core::OResource::SmallIcon); |
32 | disabledPm.convertFromImage( Resource::loadImage("autorotate/norotate").smoothScale( height(), width() ) ); | 32 | disabledPm = Opie::Core::OResource::loadImage("autorotate/norotate", Opie::Core::OResource::SmallIcon); |
33 | 33 | ||
34 | repaint(true); | 34 | repaint(true); |
35 | popupMenu = 0; | 35 | popupMenu = 0; |
36 | show(); | 36 | show(); |
37 | } | 37 | } |
38 | 38 | ||
39 | AutoRotate::~AutoRotate() | 39 | AutoRotate::~AutoRotate() |
40 | { | 40 | { |
41 | if (popupMenu) { | 41 | if (popupMenu) { |
42 | delete popupMenu; | 42 | delete popupMenu; |
43 | } | 43 | } |
44 | } | 44 | } |
45 | 45 | ||
46 | int AutoRotate::position() | 46 | int AutoRotate::position() |
47 | { | 47 | { |
48 | return 7; | 48 | return 7; |
49 | } | 49 | } |
50 | 50 | ||
51 | void AutoRotate::mousePressEvent(QMouseEvent *) | 51 | void AutoRotate::mousePressEvent(QMouseEvent *) |
52 | { | 52 | { |
53 | QPopupMenu *menu = new QPopupMenu(this); | 53 | QPopupMenu *menu = new QPopupMenu(this); |
54 | menu->insertItem( isRotateEnabled()? "Disable Rotation" : "Enable Rotation" ,1 ); | 54 | menu->insertItem( isRotateEnabled()? "Disable Rotation" : "Enable Rotation" ,1 ); |
55 | 55 | ||
56 | QPoint p = mapToGlobal(QPoint(0, 0)); | 56 | QPoint p = mapToGlobal(QPoint(0, 0)); |