summaryrefslogtreecommitdiff
path: root/libopie2
authormickeyl <mickeyl>2005-06-26 12:27:37 (UTC)
committer mickeyl <mickeyl>2005-06-26 12:27:37 (UTC)
commitb4d2fa56d4b4608656f6b5cf3ff9375708395e91 (patch) (side-by-side diff)
tree7b087a487929d9b0f9de67860b9fe123773239f0 /libopie2
parent53f924947144ddbb3e15d3bd1ddc877073c7ec7f (diff)
downloadopie-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.
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.cpp6
-rw-r--r--libopie2/opiecore/device/odevice.h6
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp17
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()
d->m_vendor = Vendor_Unknown;
d->m_systemstr = "Unknown";
d->m_system = System_Unknown;
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;
d->m_cpu_frequencies = new QStrList;
@@ -399,12 +400,17 @@ Transformation ODevice::rotation() const
*/
ODirection ODevice::direction() const
{
return d->m_direction;
}
+QString ODevice::qteDriver() const
+{
+ return d->m_qteDriver;
+}
+
/**
* This plays an alarm sound
*/
void ODevice::playAlarmSound()
{
#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:
ODeviceData *d;
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 ); }
QString vendorString() const;
OVendor vendor() const;
@@ -253,12 +251,14 @@ public:
QString systemVersionString() const;
virtual Transformation rotation() const;
virtual ODirection direction() const;
+ QString qteDriver() const;
+
// system
virtual bool suspend();
virtual bool setDisplayStatus ( bool on );
virtual bool setDisplayBrightness ( int brightness );
virtual int displayBrightnessResolution() const;
@@ -356,12 +356,14 @@ class ODeviceData {
QString m_sysverstr;
Transformation m_rotation;
ODirection m_direction;
+ QString m_qteDriver;
+
QValueList <ODeviceButton> *m_buttons;
uint m_holdtime;
QStrList *m_cpu_frequencies;
bool m_initializedButtonQcop : 1;
/* 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)
} else {
d->m_model = Model_Zaurus_SL5500;
d->m_modelstr = "Unknown Zaurus";
}
// 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/";
break;
case Model_Zaurus_SL6000:
m_backlightdev = "/sys/class/backlight/tosa-bl/";
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;
break;
case Model_Zaurus_SLC3000: // fallthrough
case Model_Zaurus_SLC1000: // fallthrough
@@ -226,14 +227,24 @@ void Zaurus::init(const QString& cpu_info)
break;
case Model_Zaurus_SLB600: // fallthrough
case Model_Zaurus_SL5000: // fallthrough
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 )
qDebug( "Zaurus::init() - Using the 2.4 Embedix HAL on a %s", (const char*) d->m_modelstr );
else
qDebug( "Zaurus::init() - Using the 2.6 OpenZaurus HAL on a %s", (const char*) d->m_modelstr );