-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 | |||
@@ -62,16 +62,17 @@ public: | |||
62 | OModel m_model; | 62 | OModel m_model; |
63 | 63 | ||
64 | QString m_systemstr; | 64 | QString m_systemstr; |
65 | OSystem m_system; | 65 | OSystem m_system; |
66 | 66 | ||
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; |
73 | }; | 74 | }; |
74 | 75 | ||
75 | 76 | ||
76 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter { | 77 | class iPAQ : public ODevice, public QWSServer::KeyboardFilter { |
77 | protected: | 78 | protected: |
@@ -249,16 +250,17 @@ ODevice::ODevice ( ) | |||
249 | d-> m_modelstr = "Unknown"; | 250 | d-> m_modelstr = "Unknown"; |
250 | d-> m_model = Model_Unknown; | 251 | d-> m_model = Model_Unknown; |
251 | d-> m_vendorstr = "Unknown"; | 252 | d-> m_vendorstr = "Unknown"; |
252 | d-> m_vendor = Vendor_Unknown; | 253 | d-> m_vendor = Vendor_Unknown; |
253 | d-> m_systemstr = "Unknown"; | 254 | d-> m_systemstr = "Unknown"; |
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; |
260 | } | 262 | } |
261 | 263 | ||
262 | void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) | 264 | void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) |
263 | { | 265 | { |
264 | if ( msg == "deviceButtonMappingChanged()" ) { | 266 | if ( msg == "deviceButtonMappingChanged()" ) { |
@@ -465,16 +467,24 @@ QString ODevice::systemVersionString ( ) const | |||
465 | * @return the current Transformation | 467 | * @return the current Transformation |
466 | */ | 468 | */ |
467 | Transformation ODevice::rotation ( ) const | 469 | Transformation ODevice::rotation ( ) const |
468 | { | 470 | { |
469 | return d-> m_rotation; | 471 | return d-> m_rotation; |
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 ( ) |
476 | { | 486 | { |
477 | #ifndef QT_NO_SOUND | 487 | #ifndef QT_NO_SOUND |
478 | static Sound snd ( "alarm" ); | 488 | static Sound snd ( "alarm" ); |
479 | 489 | ||
480 | if ( snd. isFinished ( )) | 490 | if ( snd. isFinished ( )) |
diff --git a/libopie/odevice.h b/libopie/odevice.h index 45a790b..0c55ea0 100644 --- a/libopie/odevice.h +++ b/libopie/odevice.h | |||
@@ -98,16 +98,22 @@ enum OHardKey { | |||
98 | HardKey_Menu = Qt::Key_F11, | 98 | HardKey_Menu = Qt::Key_F11, |
99 | HardKey_Home = Qt::Key_F12, | 99 | HardKey_Home = Qt::Key_F12, |
100 | HardKey_Mail = Qt::Key_F13, | 100 | HardKey_Mail = Qt::Key_F13, |
101 | HardKey_Record = Qt::Key_F24, | 101 | HardKey_Record = Qt::Key_F24, |
102 | HardKey_Suspend = Qt::Key_F34, | 102 | HardKey_Suspend = Qt::Key_F34, |
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 |
109 | * hardware key mappings. | 115 | * hardware key mappings. |
110 | * | 116 | * |
111 | * | 117 | * |
112 | * @short A small class for device specefic options | 118 | * @short A small class for device specefic options |
113 | * @see QObject | 119 | * @see QObject |
@@ -145,16 +151,17 @@ public: | |||
145 | OVendor vendor ( ) const; | 151 | OVendor vendor ( ) const; |
146 | 152 | ||
147 | QString systemString ( ) const; | 153 | QString systemString ( ) const; |
148 | OSystem system ( ) const; | 154 | OSystem system ( ) const; |
149 | 155 | ||
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 | ||
156 | virtual bool setSoftSuspend ( bool on ); | 163 | virtual bool setSoftSuspend ( bool on ); |
157 | virtual bool suspend ( ); | 164 | virtual bool suspend ( ); |
158 | 165 | ||
159 | virtual bool setDisplayStatus ( bool on ); | 166 | virtual bool setDisplayStatus ( bool on ); |
160 | virtual bool setDisplayBrightness ( int brightness ); | 167 | virtual bool setDisplayBrightness ( int brightness ); |