summaryrefslogtreecommitdiff
path: root/libopie/odevice.cpp
Side-by-side diff
Diffstat (limited to 'libopie/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp10
1 files changed, 10 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
@@ -64,12 +64,13 @@ public:
QString m_systemstr;
OSystem m_system;
QString m_sysverstr;
Transformation m_rotation;
+ ODirection m_direction;
QValueList <ODeviceButton> *m_buttons;
uint m_holdtime;
};
@@ -251,12 +252,13 @@ ODevice::ODevice ( )
d-> m_vendorstr = "Unknown";
d-> m_vendor = Vendor_Unknown;
d-> m_systemstr = "Unknown";
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;
}
void ODevice::systemMessage ( const QCString &msg, const QByteArray & )
@@ -467,12 +469,20 @@ QString ODevice::systemVersionString ( ) const
Transformation ODevice::rotation ( ) const
{
return d-> m_rotation;
}
/**
+ * @return the current rotation direction
+ */
+ODirection ODevice::direction ( ) const
+{
+ return d-> m_direction;
+}
+
+/**
* This plays an alarmSound
*/
void ODevice::alarmSound ( )
{
#ifndef QT_NO_SOUND
static Sound snd ( "alarm" );