summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-09-03 18:01:49 (UTC)
committer mickeyl <mickeyl>2005-09-03 18:01:49 (UTC)
commitde950b18690b8981a2bddaca68cbd5d48c71f689 (patch) (side-by-side diff)
tree53e111efa326b6fbfb4e157c4c7d3776ea9af17b
parented772cdd53070ccc61c87a3b0e96769a9f558f71 (diff)
downloadopie-de950b18690b8981a2bddaca68cbd5d48c71f689.zip
opie-de950b18690b8981a2bddaca68cbd5d48c71f689.tar.gz
opie-de950b18690b8981a2bddaca68cbd5d48c71f689.tar.bz2
fun with namespaces and moc... this patch fixes the hinge sensor on clamshell Zaurii
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice.h2
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp18
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.h3
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
@@ -222,5 +222,5 @@ struct default_button {
* hardware key mappings.
*
- * @short A small class for device specefic options
+ * @short A small class for device specific options
* @see QObject
* @author Robert Griebl
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
@@ -158,4 +158,5 @@ struct z_button z_buttons_6000 [] = {
void Zaurus::init(const QString& cpu_info)
{
+ qDebug( "Zaurus::init()" );
// Set the time to wait until the system is really suspended
// the delta between apm --suspend and sleeping
@@ -260,4 +261,5 @@ void Zaurus::init(const QString& cpu_info)
case Model_Zaurus_SLC1000: // fallthrough
case Model_Zaurus_SLC7x0:
+ initHingeSensor();
d->m_rotation = rotation();
d->m_direction = direction();
@@ -290,4 +292,5 @@ void Zaurus::init(const QString& cpu_info)
void Zaurus::initButtons()
{
+ qDebug( "Zaurus::initButtons()" );
if ( d->m_buttons )
return;
@@ -308,7 +311,6 @@ void Zaurus::initButtons()
case Model_Zaurus_SLC7x0:
if ( isQWS( ) )
- { // setup hinge sensor stuff
+ {
addPreHandler(this);
- initHingeSensor();
}
pz_buttons = z_buttons_c700;
@@ -602,4 +604,5 @@ Transformation Zaurus::rotation() const
}
+ qDebug( "Zaurus::rotation() - returning '%d'", rot );
return rot;
}
@@ -706,5 +709,5 @@ void Zaurus::initHingeSensor()
if ( !m_hinge.open( IO_ReadOnly ) )
{
- 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;
}
@@ -712,4 +715,6 @@ void Zaurus::initHingeSensor()
QSocketNotifier* sn = new QSocketNotifier( m_hinge.handle(), QSocketNotifier::Read, this );
QObject::connect( sn, SIGNAL(activated(int)), this, SLOT(hingeSensorTriggered()) );
+
+ qDebug( "Zaurus::init() - Hinge Sensor Initialization successfully completed" );
}
@@ -730,4 +735,11 @@ void Zaurus::hingeSensorTriggered()
}
+void Zaurus::systemMessage( const QCString &msg, const QByteArray & )
+{
+ if ( msg == "deviceButtonMappingChanged()" ) {
+ reloadButtonMapping();
+ }
+}
+
/*
* Take code from iPAQ device.
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
@@ -98,4 +98,6 @@ namespace Internal {
class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter
{
+ Q_OBJECT
+
protected:
virtual void init(const QString&);
@@ -105,4 +107,5 @@ class Zaurus : public OAbstractMobileDevice, public QWSServer::KeyboardFilter
protected slots:
void hingeSensorTriggered();
+ void systemMessage( const QCString &msg, const QByteArray & );
public: