author | mickeyl <mickeyl> | 2005-09-03 18:01:49 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-09-03 18:01:49 (UTC) |
commit | de950b18690b8981a2bddaca68cbd5d48c71f689 (patch) (side-by-side diff) | |
tree | 53e111efa326b6fbfb4e157c4c7d3776ea9af17b /libopie2 | |
parent | ed772cdd53070ccc61c87a3b0e96769a9f558f71 (diff) | |
download | opie-de950b18690b8981a2bddaca68cbd5d48c71f689.zip opie-de950b18690b8981a2bddaca68cbd5d48c71f689.tar.gz opie-de950b18690b8981a2bddaca68cbd5d48c71f689.tar.bz2 |
fun with namespaces and moc... this patch fixes the hinge sensor on clamshell Zaurii
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 18 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 3 |
3 files changed, 19 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 0eed1c9..492c97b 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -223,3 +223,3 @@ struct default_button { * - * @short A small class for device specefic options + * @short A small class for device specific options * @see QObject diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index a75f566..8a7e252 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -159,2 +159,3 @@ void Zaurus::init(const QString& cpu_info) { + qDebug( "Zaurus::init()" ); // Set the time to wait until the system is really suspended @@ -261,2 +262,3 @@ void Zaurus::init(const QString& cpu_info) case Model_Zaurus_SLC7x0: + initHingeSensor(); d->m_rotation = rotation(); @@ -291,2 +293,3 @@ void Zaurus::initButtons() { + qDebug( "Zaurus::initButtons()" ); if ( d->m_buttons ) @@ -309,5 +312,4 @@ void Zaurus::initButtons() if ( isQWS( ) ) - { // setup hinge sensor stuff + { addPreHandler(this); - initHingeSensor(); } @@ -603,2 +605,3 @@ Transformation Zaurus::rotation() const + qDebug( "Zaurus::rotation() - returning '%d'", rot ); return rot; @@ -707,3 +710,3 @@ void Zaurus::initHingeSensor() { - qDebug( "Zaurus::init() - Couldn't open /dev/input/event0 for read (%s)", strerror( errno ) ); + qWarning( "Zaurus::init() - Couldn't open /dev/input/event0 for read (%s)", strerror( errno ) ); return; @@ -713,2 +716,4 @@ void Zaurus::initHingeSensor() QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(hingeSensorTriggered()) ); + + qDebug( "Zaurus::init() - Hinge Sensor Initialization successfully completed" ); } @@ -731,2 +736,9 @@ void Zaurus::hingeSensorTriggered() +void Zaurus::systemMessage( const QCString &msg, const QByteArray & ) +{ + if ( msg == "deviceButtonMappingChanged()" ) { + reloadButtonMapping(); + } +} + /* diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index bf30bc6..8a66f9c 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h @@ -99,2 +99,4 @@ class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter { + Q_OBJECT + protected: @@ -106,2 +108,3 @@ class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter void hingeSensorTriggered(); + void systemMessage( const QCString &msg, const QByteArray & ); |