Diffstat (limited to 'noncore/applets/autorotateapplet/autorotate.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/applets/autorotateapplet/autorotate.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp index 5152904..94be0ae 100644 --- a/noncore/applets/autorotateapplet/autorotate.cpp +++ b/noncore/applets/autorotateapplet/autorotate.cpp | |||
@@ -11,12 +11,13 @@ | |||
11 | *************************************************************************/ | 11 | *************************************************************************/ |
12 | 12 | ||
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 <qpe/applnk.h> | 18 | #include <qpe/applnk.h> |
18 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
19 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
20 | 21 | ||
21 | /* QT */ | 22 | /* QT */ |
22 | #include <qpainter.h> | 23 | #include <qpainter.h> |
@@ -40,12 +41,17 @@ AutoRotate::~AutoRotate() | |||
40 | { | 41 | { |
41 | if (popupMenu) { | 42 | if (popupMenu) { |
42 | delete popupMenu; | 43 | delete popupMenu; |
43 | } | 44 | } |
44 | } | 45 | } |
45 | 46 | ||
47 | int AutoRotate::position() | ||
48 | { | ||
49 | return 7; | ||
50 | } | ||
51 | |||
46 | void AutoRotate::mousePressEvent(QMouseEvent *) | 52 | void AutoRotate::mousePressEvent(QMouseEvent *) |
47 | { | 53 | { |
48 | QPopupMenu *menu = new QPopupMenu(this); | 54 | QPopupMenu *menu = new QPopupMenu(this); |
49 | menu->insertItem( isRotateEnabled()? "Disable Rotation" : "Enable Rotation" ,1 ); | 55 | menu->insertItem( isRotateEnabled()? "Disable Rotation" : "Enable Rotation" ,1 ); |
50 | 56 | ||
51 | QPoint p = mapToGlobal(QPoint(0, 0)); | 57 | QPoint p = mapToGlobal(QPoint(0, 0)); |
@@ -85,6 +91,11 @@ bool AutoRotate::isRotateEnabled() | |||
85 | qDebug("Enabled"); | 91 | qDebug("Enabled"); |
86 | else | 92 | else |
87 | qDebug("Disabled"); | 93 | qDebug("Disabled"); |
88 | return res; | 94 | return res; |
89 | } | 95 | } |
90 | 96 | ||
97 | Q_EXPORT_INTERFACE() | ||
98 | { | ||
99 | Q_CREATE_INSTANCE( OTaskbarAppletWrapper<AutoRotate> ); | ||
100 | } | ||
101 | |||