author | alwin <alwin> | 2004-04-22 11:47:08 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-22 11:47:08 (UTC) |
commit | a95b0c46820c2e9e76598cf430ce279eeba7edb8 (patch) (side-by-side diff) | |
tree | da8073f4a2b4041db0f7ef1cb3ae5e6eb8cb9019 | |
parent | 2a950511ee173c2cbce5da4d14de9cea6fcd5034 (diff) | |
download | opie-a95b0c46820c2e9e76598cf430ce279eeba7edb8.zip opie-a95b0c46820c2e9e76598cf430ce279eeba7edb8.tar.gz opie-a95b0c46820c2e9e76598cf430ce279eeba7edb8.tar.bz2 |
-added default buttons for emulation in qvfb or for unknown devices
-default email app is now opiemail instead of mail
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 33 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 15 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 4 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 4 |
5 files changed, 54 insertions, 6 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index ee66d95..62a2e03 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -64,2 +64,25 @@ using namespace Opie::Core; +struct default_button default_buttons [] = { + { 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()" }, +}; + ODevice *ODevice::inst() @@ -143,2 +166,12 @@ void ODevice::initButtons() d->m_buttons = new QValueList <ODeviceButton>; + for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { + default_button *db = default_buttons + i; + ODeviceButton b; + b. setKeycode ( db->code ); + b. setUserText ( QObject::tr ( "Button", db->utext )); + b. setPixmap ( Resource::loadPixmap ( db->pix )); + b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); + b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); + d->m_buttons->append ( b ); + } diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 5ee9cca..0ba58f0 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -162,2 +162,17 @@ enum OHingeStatus { +/* default button for qvfb or such + * see odevice.cpp for details. + * hint: manage a user defined button for qvfb? + * alwin + */ +struct default_button { + Qt::Key code; + char *utext; + char *pix; + char *fpressedservice; + char *fpressedaction; + char *fheldservice; + char *fheldaction; +}; + /** diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 2efcd3a..98e2ffa 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -102,4 +102,4 @@ struct i_button ipaq_buttons [] = { "devicebuttons/ipaq_mail", - "mail", "raise()", - "mail", "newMail()" }, + "opiemail", "raise()", + "opiemail", "newMail()" }, { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index 7d79ef5..e9481bb 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp @@ -77,4 +77,4 @@ struct s_button simpad_buttons [] = { "devicebuttons/simpad_lower_left", - "mail", "raise()", - "mail", "newMail()" }, + "opiemail", "raise()", + "opiemail", "newMail()" }, diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 000d29c..1434e69 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -77,4 +77,4 @@ struct z_button z_buttons [] = { "devicebuttons/z_mail", - "mail", "raise()", - "mail", "newMail()" }, + "opiemail", "raise()", + "opiemail", "newMail()" }, }; |