summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-07-22 22:56:18 (UTC)
committer mickeyl <mickeyl>2005-07-22 22:56:18 (UTC)
commitb74ea9f8de39d355e2d16b4b685e9de54e2f0b0d (patch) (side-by-side diff)
treea52111e0b1dccdd97d03ea1fe79d6ca14459a3a2
parent312b42400a1ea39f3537664fe610e2f42f3097d1 (diff)
downloadopie-b74ea9f8de39d355e2d16b4b685e9de54e2f0b0d.zip
opie-b74ea9f8de39d355e2d16b4b685e9de54e2f0b0d.tar.gz
opie-b74ea9f8de39d355e2d16b4b685e9de54e2f0b0d.tar.bz2
odevice: fix SL6000 rotation + record button mapping
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp39
1 files changed, 37 insertions, 2 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 8369f54..7302d2c 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -105,24 +105,55 @@ struct z_button z_buttons_c700 [] = {
{ Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"),
"devicebuttons/z_hinge1",
"QPE/Rotation", "rotateDefault()",0},
{ Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"),
"devicebuttons/z_hinge2",
"QPE/Rotation", "rotateDefault()",0},
{ Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"),
"devicebuttons/z_hinge3",
"QPE/Rotation", "rotateDefault()",0},
};
+struct z_button z_buttons_6000 [] = {
+ { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"),
+ "devicebuttons/z_calendar",
+ "datebook", "nextView()",
+ "today", "raise()" },
+ { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"),
+ "devicebuttons/z_contact",
+ "addressbook", "raise()",
+ "addressbook", "beamBusinessCard()" },
+ { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"),
+ "devicebuttons/z_home",
+ "QPE/Launcher", "home()",
+ "buttonsettings", "raise()" },
+ { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
+ "devicebuttons/z_menu",
+ "QPE/TaskBar", "toggleMenu()",
+ "QPE/TaskBar", "toggleStartMenu()" },
+ { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"),
+ "devicebuttons/z_mail",
+ "opiemail", "raise()",
+ "opiemail", "newMail()" },
+ { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Rotate Button"),
+ "devicebuttons/z_rotate",
+ 0,
+ "QPE/Rotation", "rotateDefault()" },
+ { Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"),
+ "devicebuttons/z_hinge3",
+ "QPE/VMemo", "toggleRecord()",
+ "sound", "raise()" },
+};
+
// FIXME This gets unnecessary complicated. We should think about splitting the Zaurus
// class up into individual classes. We would need three classes
//
// Zaurus-Collie (SA-model w/ 320x240 lcd, for SL5500 and SL5000)
// Zaurus-Poodle (PXA-model w/ 320x240 lcd, for SL5600)
// Zaurus-Corgi (PXA-model w/ 640x480 lcd, for C700, C750, C760, C860, C3000, C1000, C3100)
// Zaurus-Tosa (PXA-model w/ 480x640 lcd, for SL6000)
void Zaurus::init(const QString& cpu_info)
{
// Set the time to wait until the system is really suspended
// the delta between apm --suspend and sleeping
@@ -246,30 +277,34 @@ void Zaurus::init(const QString& cpu_info)
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 );
}
void Zaurus::initButtons()
{
if ( d->m_buttons )
return;
-
d->m_buttons = new QValueList <ODeviceButton>;
struct z_button * pz_buttons;
int buttoncount;
- switch ( d->m_model ) {
+ switch ( d->m_model )
+ {
+ case Model_Zaurus_SL6000:
+ pz_buttons = z_buttons_6000;
+ buttoncount = ARRAY_SIZE(z_buttons_6000);
+ break;
case Model_Zaurus_SLC3000: // fallthrough
case Model_Zaurus_SLC1000: // fallthrough
case Model_Zaurus_SLC7x0:
if ( isQWS( ) ) {
addPreHandler(this); // hinge-sensor-handler
}
pz_buttons = z_buttons_c700;
buttoncount = ARRAY_SIZE(z_buttons_c700);
break;
default:
pz_buttons = z_buttons;
buttoncount = ARRAY_SIZE(z_buttons);