author | kergoth <kergoth> | 2003-04-18 21:54:43 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-04-18 21:54:43 (UTC) |
commit | d0852e67c15c5a973b7bc7f7bee238a6fd00dee6 (patch) (unidiff) | |
tree | 68acc72ac204045b2492693ca668ece78e5f3a2c /libopie/odevice.cpp | |
parent | 1cdd9c974e621f6992ddc6dfccbc815baebd19ee (diff) | |
download | opie-d0852e67c15c5a973b7bc7f7bee238a6fd00dee6.zip opie-d0852e67c15c5a973b7bc7f7bee238a6fd00dee6.tar.gz opie-d0852e67c15c5a973b7bc7f7bee238a6fd00dee6.tar.bz2 |
Add rotation direction to ODevice, to ensure the default is appropriate for the hardware in question.
-rw-r--r-- | libopie/odevice.cpp | 10 |
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 | |||
@@ -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 ( ) |