author | mickeyl <mickeyl> | 2005-06-26 12:27:37 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-06-26 12:27:37 (UTC) |
commit | b4d2fa56d4b4608656f6b5cf3ff9375708395e91 (patch) (side-by-side diff) | |
tree | 7b087a487929d9b0f9de67860b9fe123773239f0 /libopie2 | |
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 @@ -177,6 +177,7 @@ ODevice::ODevice() d->m_sysverstr = "0.0"; d->m_rotation = Rot0; d->m_direction = CW; + d->m_qteDriver = "Transformed"; d->m_holdtime = 1000; // 1000ms d->m_buttons = 0; @@ -402,6 +403,11 @@ ODirection ODevice::direction() const return d->m_direction; } +QString ODevice::qteDriver() const +{ + return d->m_qteDriver; +} + /** * This plays an alarm 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 @@ -236,11 +236,9 @@ protected: public: // sandman do we want to allow destructions? -zecke? virtual ~ODevice(); - static ODevice *inst(); // information - QString modelString() const; OModel model() const; inline OModel series() const { return (OModel) ( model() & Model_Series_Mask ); } @@ -256,6 +254,8 @@ public: virtual Transformation rotation() const; virtual ODirection direction() const; + QString qteDriver() const; + // system virtual bool suspend(); @@ -359,6 +359,8 @@ class ODeviceData { Transformation m_rotation; ODirection m_direction; + QString m_qteDriver; + QValueList <ODeviceButton> *m_buttons; uint m_holdtime; QStrList *m_cpu_frequencies; 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 @@ -199,7 +199,8 @@ void Zaurus::init(const QString& cpu_info) } // set path to backlight device in kernel 2.6 - switch ( d->m_model ) { + switch ( d->m_model ) + { case Model_Zaurus_SLB600: // fallthrough case Model_Zaurus_SL5500: m_backlightdev = "/sys/class/backlight/locomo-backlight/"; @@ -209,11 +210,11 @@ void Zaurus::init(const QString& cpu_info) break; default: m_backlightdev = "/sys/class/backlight/corgi-bl/"; - break; } // set initial rotation - switch( d->m_model ) { + switch( d->m_model ) + { case Model_Zaurus_SL6000: // fallthrough case Model_Zaurus_SLA300: d->m_rotation = Rot0; @@ -229,8 +230,18 @@ void Zaurus::init(const QString& cpu_info) case Model_Zaurus_SL5500: // fallthrough default: d->m_rotation = Rot270; + } + + // set default qte driver + switch( d->m_model ) + { + case Model_Zaurus_SLC7x0: + d->m_qteDriver = "W100"; break; + default: + d->m_qteDriver = "Transformed"; } + m_leds[0] = Led_Off; if ( m_embedix ) |