Diffstat (limited to 'noncore/applets/autorotateapplet/autorotate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/autorotateapplet/autorotate.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp index 94be0ae..ae7fbd0 100644 --- a/noncore/applets/autorotateapplet/autorotate.cpp +++ b/noncore/applets/autorotateapplet/autorotate.cpp | |||
@@ -13,26 +13,25 @@ | |||
13 | #include "autorotate.h" | 13 | #include "autorotate.h" |
14 | 14 | ||
15 | /* OPIE */ | 15 | /* OPIE */ |
16 | #include <opie2/odevice.h> | 16 | #include <opie2/odevice.h> |
17 | #include <opie2/otaskbarapplet.h> | 17 | #include <opie2/otaskbarapplet.h> |
18 | #include <qpe/applnk.h> | 18 | #include <qpe/applnk.h> |
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
21 | 21 | ||
22 | /* QT */ | 22 | /* QT */ |
23 | #include <qpainter.h> | 23 | #include <qpainter.h> |
24 | 24 | ||
25 | using namespace Opie; | 25 | using namespace Opie::Ui; |
26 | |||
27 | AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) | 26 | AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) |
28 | { | 27 | { |
29 | setFixedWidth( AppLnk::smallIconSize() ); | 28 | setFixedWidth( AppLnk::smallIconSize() ); |
30 | setFixedHeight( AppLnk::smallIconSize() ); | 29 | setFixedHeight( AppLnk::smallIconSize() ); |
31 | 30 | ||
32 | enabledPm.convertFromImage( Resource::loadImage("autorotate/rotate").smoothScale( height(), width() ) ); | 31 | enabledPm.convertFromImage( Resource::loadImage("autorotate/rotate").smoothScale( height(), width() ) ); |
33 | disabledPm.convertFromImage( Resource::loadImage("autorotate/norotate").smoothScale( height(), width() ) ); | 32 | disabledPm.convertFromImage( Resource::loadImage("autorotate/norotate").smoothScale( height(), width() ) ); |
34 | 33 | ||
35 | repaint(true); | 34 | repaint(true); |
36 | popupMenu = 0; | 35 | popupMenu = 0; |
37 | show(); | 36 | show(); |
38 | } | 37 | } |
@@ -85,17 +84,14 @@ bool AutoRotate::isRotateEnabled() | |||
85 | Config cfg( "qpe" ); | 84 | Config cfg( "qpe" ); |
86 | cfg.setGroup( "Appearance" ); | 85 | cfg.setGroup( "Appearance" ); |
87 | 86 | ||
88 | bool res = cfg.readBoolEntry( "rotateEnabled" ); | 87 | bool res = cfg.readBoolEntry( "rotateEnabled" ); |
89 | 88 | ||
90 | if (res ) | 89 | if (res ) |
91 | qDebug("Enabled"); | 90 | qDebug("Enabled"); |
92 | else | 91 | else |
93 | qDebug("Disabled"); | 92 | qDebug("Disabled"); |
94 | return res; | 93 | return res; |
95 | } | 94 | } |
96 | 95 | ||
97 | Q_EXPORT_INTERFACE() | 96 | EXPORT_OPIE_APPLET_v1( AutoRotate ) |
98 | { | ||
99 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<AutoRotate> ); | ||
100 | } | ||
101 | 97 | ||