-rw-r--r-- | libopie/odevice.cpp | 10 | ||||
-rw-r--r-- | libopie/odevice.h | 7 |
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: | |||
67 | QString m_sysverstr; | 67 | QString m_sysverstr; |
68 | 68 | ||
69 | Transformation m_rotation; | 69 | Transformation m_rotation; |
70 | ODirection m_direction; | ||
70 | 71 | ||
71 | QValueList <ODeviceButton> *m_buttons; | 72 | QValueList <ODeviceButton> *m_buttons; |
72 | uint m_holdtime; | 73 | uint m_holdtime; |
@@ -254,6 +255,7 @@ ODevice::ODevice ( ) | |||
254 | d-> m_system = System_Unknown; | 255 | d-> m_system = System_Unknown; |
255 | d-> m_sysverstr = "0.0"; | 256 | d-> m_sysverstr = "0.0"; |
256 | d-> m_rotation = Rot0; | 257 | d-> m_rotation = Rot0; |
258 | d-> m_direction = CW; | ||
257 | 259 | ||
258 | d-> m_holdtime = 1000; // 1000ms | 260 | d-> m_holdtime = 1000; // 1000ms |
259 | d-> m_buttons = 0; | 261 | d-> m_buttons = 0; |
@@ -470,6 +472,14 @@ Transformation ODevice::rotation ( ) const | |||
470 | } | 472 | } |
471 | 473 | ||
472 | /** | 474 | /** |
475 | * @return the current rotation direction | ||
476 | */ | ||
477 | ODirection ODevice::direction ( ) const | ||
478 | { | ||
479 | return d-> m_direction; | ||
480 | } | ||
481 | |||
482 | /** | ||
473 | * This plays an alarmSound | 483 | * This plays an alarmSound |
474 | */ | 484 | */ |
475 | void ODevice::alarmSound ( ) | 485 | 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 { | |||
103 | HardKey_Backlight = Qt::Key_F35, | 103 | HardKey_Backlight = Qt::Key_F35, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | enum ODirection { | ||
107 | CW = 0, | ||
108 | CCW = 1, | ||
109 | Flip = 2, | ||
110 | }; | ||
111 | |||
106 | /** | 112 | /** |
107 | * A singleton which gives informations about device specefic option | 113 | * A singleton which gives informations about device specefic option |
108 | * like the Hardware used, LEDs, the Base Distribution and | 114 | * like the Hardware used, LEDs, the Base Distribution and |
@@ -150,6 +156,7 @@ public: | |||
150 | QString systemVersionString ( ) const; | 156 | QString systemVersionString ( ) const; |
151 | 157 | ||
152 | Transformation rotation ( ) const; | 158 | Transformation rotation ( ) const; |
159 | ODirection direction ( ) const; | ||
153 | 160 | ||
154 | // system | 161 | // system |
155 | 162 | ||