summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp10
-rw-r--r--libopie/odevice.h7
2 files changed, 17 insertions, 0 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 0e1c0dd..29c8ad2 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -67,6 +67,7 @@ public:
QString m_sysverstr;
Transformation m_rotation;
+ ODirection m_direction;
QValueList <ODeviceButton> *m_buttons;
uint m_holdtime;
@@ -254,6 +255,7 @@ ODevice::ODevice ( )
d-> m_system = System_Unknown;
d-> m_sysverstr = "0.0";
d-> m_rotation = Rot0;
+ d-> m_direction = CW;
d-> m_holdtime = 1000; // 1000ms
d-> m_buttons = 0;
@@ -470,6 +472,14 @@ Transformation ODevice::rotation ( ) const
}
/**
+ * @return the current rotation direction
+ */
+ODirection ODevice::direction ( ) const
+{
+ return d-> m_direction;
+}
+
+/**
* This plays an alarmSound
*/
void ODevice::alarmSound ( )
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 45a790b..0c55ea0 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -103,6 +103,12 @@ enum OHardKey {
HardKey_Backlight = Qt::Key_F35,
};
+enum ODirection {
+ CW = 0,
+ CCW = 1,
+ Flip = 2,
+};
+
/**
* A singleton which gives informations about device specefic option
* like the Hardware used, LEDs, the Base Distribution and
@@ -150,6 +156,7 @@ public:
QString systemVersionString ( ) const;
Transformation rotation ( ) const;
+ ODirection direction ( ) const;
// system