author | alwin <alwin> | 2004-04-22 11:47:08 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-22 11:47:08 (UTC) |
commit | a95b0c46820c2e9e76598cf430ce279eeba7edb8 (patch) (unidiff) | |
tree | da8073f4a2b4041db0f7ef1cb3ae5e6eb8cb9019 /libopie2/opiecore | |
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 | |||
@@ -63,4 +63,27 @@ const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; | |||
63 | using namespace Opie::Core; | 63 | using namespace Opie::Core; |
64 | 64 | ||
65 | struct default_button default_buttons [] = { | ||
66 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | ||
67 | "devicebuttons/z_calendar", | ||
68 | "datebook", "nextView()", | ||
69 | "today", "raise()" }, | ||
70 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | ||
71 | "devicebuttons/z_contact", | ||
72 | "addressbook", "raise()", | ||
73 | "addressbook", "beamBusinessCard()" }, | ||
74 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | ||
75 | "devicebuttons/z_home", | ||
76 | "QPE/Launcher", "home()", | ||
77 | "buttonsettings", "raise()" }, | ||
78 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | ||
79 | "devicebuttons/z_menu", | ||
80 | "QPE/TaskBar", "toggleMenu()", | ||
81 | "QPE/TaskBar", "toggleStartMenu()" }, | ||
82 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | ||
83 | "devicebuttons/z_mail", | ||
84 | "opiemail", "raise()", | ||
85 | "opiemail", "newMail()" }, | ||
86 | }; | ||
87 | |||
65 | ODevice *ODevice::inst() | 88 | ODevice *ODevice::inst() |
66 | { | 89 | { |
@@ -142,4 +165,14 @@ void ODevice::initButtons() | |||
142 | qDebug ( "init Buttons" ); | 165 | qDebug ( "init Buttons" ); |
143 | d->m_buttons = new QValueList <ODeviceButton>; | 166 | d->m_buttons = new QValueList <ODeviceButton>; |
167 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { | ||
168 | default_button *db = default_buttons + i; | ||
169 | ODeviceButton b; | ||
170 | b. setKeycode ( db->code ); | ||
171 | b. setUserText ( QObject::tr ( "Button", db->utext )); | ||
172 | b. setPixmap ( Resource::loadPixmap ( db->pix )); | ||
173 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); | ||
174 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); | ||
175 | d->m_buttons->append ( b ); | ||
176 | } | ||
144 | 177 | ||
145 | reloadButtonMapping(); | 178 | reloadButtonMapping(); |
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 | |||
@@ -161,4 +161,19 @@ enum OHingeStatus { | |||
161 | }; | 161 | }; |
162 | 162 | ||
163 | /* default button for qvfb or such | ||
164 | * see odevice.cpp for details. | ||
165 | * hint: manage a user defined button for qvfb? | ||
166 | * alwin | ||
167 | */ | ||
168 | struct default_button { | ||
169 | Qt::Key code; | ||
170 | char *utext; | ||
171 | char *pix; | ||
172 | char *fpressedservice; | ||
173 | char *fpressedaction; | ||
174 | char *fheldservice; | ||
175 | char *fheldaction; | ||
176 | }; | ||
177 | |||
163 | /** | 178 | /** |
164 | * A singleton which gives informations about device specefic option | 179 | * A singleton which gives informations about device specefic option |
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 | |||
@@ -101,6 +101,6 @@ struct i_button ipaq_buttons [] = { | |||
101 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 101 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
102 | "devicebuttons/ipaq_mail", | 102 | "devicebuttons/ipaq_mail", |
103 | "mail", "raise()", | 103 | "opiemail", "raise()", |
104 | "mail", "newMail()" }, | 104 | "opiemail", "newMail()" }, |
105 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, | 105 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
106 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 106 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
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 | |||
@@ -76,6 +76,6 @@ struct s_button simpad_buttons [] = { | |||
76 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Lower+Left"), | 76 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Lower+Left"), |
77 | "devicebuttons/simpad_lower_left", | 77 | "devicebuttons/simpad_lower_left", |
78 | "mail", "raise()", | 78 | "opiemail", "raise()", |
79 | "mail", "newMail()" }, | 79 | "opiemail", "newMail()" }, |
80 | 80 | ||
81 | { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, | 81 | { Model_SIMpad_CL4 | Model_SIMpad_SL4 | Model_SIMpad_SLC | Model_SIMpad_TSinus, |
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 | |||
@@ -76,6 +76,6 @@ struct z_button z_buttons [] = { | |||
76 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 76 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
77 | "devicebuttons/z_mail", | 77 | "devicebuttons/z_mail", |
78 | "mail", "raise()", | 78 | "opiemail", "raise()", |
79 | "mail", "newMail()" }, | 79 | "opiemail", "newMail()" }, |
80 | }; | 80 | }; |
81 | 81 | ||