summaryrefslogtreecommitdiff
path: root/noncore/applets/autorotateapplet/autorotate.cpp
Side-by-side diff
Diffstat (limited to 'noncore/applets/autorotateapplet/autorotate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/autorotateapplet/autorotate.cpp11
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 @@
*************************************************************************/
#include "autorotate.h"
/* OPIE */
#include <opie2/odevice.h>
+#include <opie2/otaskbarapplet.h>
#include <qpe/applnk.h>
#include <qpe/config.h>
#include <qpe/resource.h>
/* QT */
#include <qpainter.h>
@@ -40,12 +41,17 @@ AutoRotate::~AutoRotate()
{
if (popupMenu) {
delete popupMenu;
}
}
+int AutoRotate::position()
+{
+ return 7;
+}
+
void AutoRotate::mousePressEvent(QMouseEvent *)
{
QPopupMenu *menu = new QPopupMenu(this);
menu->insertItem( isRotateEnabled()? "Disable Rotation" : "Enable Rotation" ,1 );
QPoint p = mapToGlobal(QPoint(0, 0));
@@ -85,6 +91,11 @@ bool AutoRotate::isRotateEnabled()
qDebug("Enabled");
else
qDebug("Disabled");
return res;
}
+Q_EXPORT_INTERFACE()
+{
+ Q_CREATE_INSTANCE( OTaskbarAppletWrapper<AutoRotate> );
+}
+