author | mickeyl <mickeyl> | 2005-06-26 12:27:37 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-06-26 12:27:37 (UTC) |
commit | b4d2fa56d4b4608656f6b5cf3ff9375708395e91 (patch) (unidiff) | |
tree | 7b087a487929d9b0f9de67860b9fe123773239f0 | |
parent | 53f924947144ddbb3e15d3bd1ddc877073c7ec7f (diff) | |
download | opie-b4d2fa56d4b4608656f6b5cf3ff9375708395e91.zip opie-b4d2fa56d4b4608656f6b5cf3ff9375708395e91.tar.gz opie-b4d2fa56d4b4608656f6b5cf3ff9375708395e91.tar.bz2 |
ODevice now features a method to gather the preferred qte driver.
The default driver is "Transformed". C7x0 Zaurus devices use "W100" from now on.
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 17 |
3 files changed, 24 insertions, 5 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 5e91d8b..56f305f 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -174,12 +174,13 @@ ODevice::ODevice() | |||
174 | d->m_vendor = Vendor_Unknown; | 174 | d->m_vendor = Vendor_Unknown; |
175 | d->m_systemstr = "Unknown"; | 175 | d->m_systemstr = "Unknown"; |
176 | d->m_system = System_Unknown; | 176 | d->m_system = System_Unknown; |
177 | d->m_sysverstr = "0.0"; | 177 | d->m_sysverstr = "0.0"; |
178 | d->m_rotation = Rot0; | 178 | d->m_rotation = Rot0; |
179 | d->m_direction = CW; | 179 | d->m_direction = CW; |
180 | d->m_qteDriver = "Transformed"; | ||
180 | 181 | ||
181 | d->m_holdtime = 1000; // 1000ms | 182 | d->m_holdtime = 1000; // 1000ms |
182 | d->m_buttons = 0; | 183 | d->m_buttons = 0; |
183 | d->m_cpu_frequencies = new QStrList; | 184 | d->m_cpu_frequencies = new QStrList; |
184 | 185 | ||
185 | 186 | ||
@@ -399,12 +400,17 @@ Transformation ODevice::rotation() const | |||
399 | */ | 400 | */ |
400 | ODirection ODevice::direction() const | 401 | ODirection ODevice::direction() const |
401 | { | 402 | { |
402 | return d->m_direction; | 403 | return d->m_direction; |
403 | } | 404 | } |
404 | 405 | ||
406 | QString ODevice::qteDriver() const | ||
407 | { | ||
408 | return d->m_qteDriver; | ||
409 | } | ||
410 | |||
405 | /** | 411 | /** |
406 | * This plays an alarm sound | 412 | * This plays an alarm sound |
407 | */ | 413 | */ |
408 | void ODevice::playAlarmSound() | 414 | void ODevice::playAlarmSound() |
409 | { | 415 | { |
410 | #ifndef QT_NO_SOUND | 416 | #ifndef QT_NO_SOUND |
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 5db43ff..b8478b9 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h | |||
@@ -233,17 +233,15 @@ protected: | |||
233 | 233 | ||
234 | ODeviceData *d; | 234 | ODeviceData *d; |
235 | 235 | ||
236 | public: | 236 | public: |
237 | // sandman do we want to allow destructions? -zecke? | 237 | // sandman do we want to allow destructions? -zecke? |
238 | virtual ~ODevice(); | 238 | virtual ~ODevice(); |
239 | |||
240 | static ODevice *inst(); | 239 | static ODevice *inst(); |
241 | 240 | ||
242 | // information | 241 | // information |
243 | |||
244 | QString modelString() const; | 242 | QString modelString() const; |
245 | OModel model() const; | 243 | OModel model() const; |
246 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } | 244 | inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } |
247 | 245 | ||
248 | QString vendorString() const; | 246 | QString vendorString() const; |
249 | OVendor vendor() const; | 247 | OVendor vendor() const; |
@@ -253,12 +251,14 @@ public: | |||
253 | 251 | ||
254 | QString systemVersionString() const; | 252 | QString systemVersionString() const; |
255 | 253 | ||
256 | virtual Transformation rotation() const; | 254 | virtual Transformation rotation() const; |
257 | virtual ODirection direction() const; | 255 | virtual ODirection direction() const; |
258 | 256 | ||
257 | QString qteDriver() const; | ||
258 | |||
259 | // system | 259 | // system |
260 | virtual bool suspend(); | 260 | virtual bool suspend(); |
261 | 261 | ||
262 | virtual bool setDisplayStatus ( bool on ); | 262 | virtual bool setDisplayStatus ( bool on ); |
263 | virtual bool setDisplayBrightness ( int brightness ); | 263 | virtual bool setDisplayBrightness ( int brightness ); |
264 | virtual int displayBrightnessResolution() const; | 264 | virtual int displayBrightnessResolution() const; |
@@ -356,12 +356,14 @@ class ODeviceData { | |||
356 | 356 | ||
357 | QString m_sysverstr; | 357 | QString m_sysverstr; |
358 | 358 | ||
359 | Transformation m_rotation; | 359 | Transformation m_rotation; |
360 | ODirection m_direction; | 360 | ODirection m_direction; |
361 | 361 | ||
362 | QString m_qteDriver; | ||
363 | |||
362 | QValueList <ODeviceButton> *m_buttons; | 364 | QValueList <ODeviceButton> *m_buttons; |
363 | uint m_holdtime; | 365 | uint m_holdtime; |
364 | QStrList *m_cpu_frequencies; | 366 | QStrList *m_cpu_frequencies; |
365 | bool m_initializedButtonQcop : 1; | 367 | bool m_initializedButtonQcop : 1; |
366 | 368 | ||
367 | /* values for changeMixerForAlarm */ | 369 | /* values for changeMixerForAlarm */ |
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 21d2342..0c421e3 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -196,27 +196,28 @@ void Zaurus::init(const QString& cpu_info) | |||
196 | } else { | 196 | } else { |
197 | d->m_model = Model_Zaurus_SL5500; | 197 | d->m_model = Model_Zaurus_SL5500; |
198 | d->m_modelstr = "Unknown Zaurus"; | 198 | d->m_modelstr = "Unknown Zaurus"; |
199 | } | 199 | } |
200 | 200 | ||
201 | // set path to backlight device in kernel 2.6 | 201 | // set path to backlight device in kernel 2.6 |
202 | switch ( d->m_model ) { | 202 | switch ( d->m_model ) |
203 | { | ||
203 | case Model_Zaurus_SLB600: // fallthrough | 204 | case Model_Zaurus_SLB600: // fallthrough |
204 | case Model_Zaurus_SL5500: | 205 | case Model_Zaurus_SL5500: |
205 | m_backlightdev = "/sys/class/backlight/locomo-backlight/"; | 206 | m_backlightdev = "/sys/class/backlight/locomo-backlight/"; |
206 | break; | 207 | break; |
207 | case Model_Zaurus_SL6000: | 208 | case Model_Zaurus_SL6000: |
208 | m_backlightdev = "/sys/class/backlight/tosa-bl/"; | 209 | m_backlightdev = "/sys/class/backlight/tosa-bl/"; |
209 | break; | 210 | break; |
210 | default: | 211 | default: |
211 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; | 212 | m_backlightdev = "/sys/class/backlight/corgi-bl/"; |
212 | break; | ||
213 | } | 213 | } |
214 | 214 | ||
215 | // set initial rotation | 215 | // set initial rotation |
216 | switch( d->m_model ) { | 216 | switch( d->m_model ) |
217 | { | ||
217 | case Model_Zaurus_SL6000: // fallthrough | 218 | case Model_Zaurus_SL6000: // fallthrough |
218 | case Model_Zaurus_SLA300: | 219 | case Model_Zaurus_SLA300: |
219 | d->m_rotation = Rot0; | 220 | d->m_rotation = Rot0; |
220 | break; | 221 | break; |
221 | case Model_Zaurus_SLC3000: // fallthrough | 222 | case Model_Zaurus_SLC3000: // fallthrough |
222 | case Model_Zaurus_SLC1000: // fallthrough | 223 | case Model_Zaurus_SLC1000: // fallthrough |
@@ -226,14 +227,24 @@ void Zaurus::init(const QString& cpu_info) | |||
226 | break; | 227 | break; |
227 | case Model_Zaurus_SLB600: // fallthrough | 228 | case Model_Zaurus_SLB600: // fallthrough |
228 | case Model_Zaurus_SL5000: // fallthrough | 229 | case Model_Zaurus_SL5000: // fallthrough |
229 | case Model_Zaurus_SL5500: // fallthrough | 230 | case Model_Zaurus_SL5500: // fallthrough |
230 | default: | 231 | default: |
231 | d->m_rotation = Rot270; | 232 | d->m_rotation = Rot270; |
233 | } | ||
234 | |||
235 | // set default qte driver | ||
236 | switch( d->m_model ) | ||
237 | { | ||
238 | case Model_Zaurus_SLC7x0: | ||
239 | d->m_qteDriver = "W100"; | ||
232 | break; | 240 | break; |
241 | default: | ||
242 | d->m_qteDriver = "Transformed"; | ||
233 | } | 243 | } |
244 | |||
234 | m_leds[0] = Led_Off; | 245 | m_leds[0] = Led_Off; |
235 | 246 | ||
236 | if ( m_embedix ) | 247 | if ( m_embedix ) |
237 | qDebug( "Zaurus::init() - Using the 2.4 Embedix HAL on a %s", (const char*) d->m_modelstr ); | 248 | qDebug( "Zaurus::init() - Using the 2.4 Embedix HAL on a %s", (const char*) d->m_modelstr ); |
238 | else | 249 | else |
239 | qDebug( "Zaurus::init() - Using the 2.6 OpenZaurus HAL on a %s", (const char*) d->m_modelstr ); | 250 | qDebug( "Zaurus::init() - Using the 2.6 OpenZaurus HAL on a %s", (const char*) d->m_modelstr ); |