author | zecke <zecke> | 2005-08-10 19:44:56 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-08-10 19:44:56 (UTC) |
commit | 46b2321d11fb9bbbcd3bc8130c087c22517730e3 (patch) (unidiff) | |
tree | 200ee1e4202efc042847fefd1eac3323391e2883 /libopie2 | |
parent | 3d5d7e3ca64f41651cb18c2e1833e2221a912d2d (diff) | |
download | opie-46b2321d11fb9bbbcd3bc8130c087c22517730e3.zip opie-46b2321d11fb9bbbcd3bc8130c087c22517730e3.tar.gz opie-46b2321d11fb9bbbcd3bc8130c087c22517730e3.tar.bz2 |
libopie2/opiecore/device/odevice_ipaq.cpp:
-Restore the Opie Header
-Partially redo the H19xx handling
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index 309e1e4..3cc6cec 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp | |||
@@ -1,34 +1,33 @@ | |||
1 | /* | 1 | /* |
2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> | |
4 | Copyright (C)2002, 2003, 2004 The Opie Team <opie-devel@handhelds.org> | ||
5 | =. | ||
6 | .=l. | 4 | .=l. |
7 | Â Â Â Â Â Â .>+-= | 5 | .>+-= |
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | 6 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; version 2 of the License. |
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | 11 | ._= =} : |
14 | Â Â .%`+i> Â Â Â _;_. | 12 | .%`+i> _;_. |
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | 13 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | 18 | ..}^=.= = ; Library General Public License for more |
21 | ++= Â -. Â Â .` Â Â .: details. | 19 | ++= -. .` .: details. |
22 | : Â Â = Â ...= . :.=- | 20 | : = ...= . :.=- |
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | 21 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | Â -_. . . Â )=. Â = Library General Public License along with | 22 | -_. . . )=. = Library General Public License along with |
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | 23 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 24 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 25 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | |||
29 | */ | 28 | */ |
30 | 29 | ||
31 | #include "odevice_ipaq.h" | 30 | #include "odevice_ipaq.h" |
32 | 31 | ||
33 | /* QT */ | 32 | /* QT */ |
34 | #include <qapplication.h> | 33 | #include <qapplication.h> |
@@ -97,27 +96,39 @@ struct i_button ipaq_buttons [] = { | |||
97 | "addressbook", "beamBusinessCard()" }, | 96 | "addressbook", "beamBusinessCard()" }, |
98 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, | 97 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx, |
99 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 98 | Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
100 | "devicebuttons/ipaq_menu", | 99 | "devicebuttons/ipaq_menu", |
101 | "QPE/TaskBar", "toggleMenu()", | 100 | "QPE/TaskBar", "toggleMenu()", |
102 | "QPE/TaskBar", "toggleStartMenu()" }, | 101 | "QPE/TaskBar", "toggleStartMenu()" }, |
103 | { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, | 102 | { Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
104 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 103 | Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
105 | "devicebuttons/ipaq_mail", | 104 | "devicebuttons/ipaq_mail", |
106 | "opiemail", "raise()", | 105 | "opiemail", "raise()", |
107 | "opiemail", "newMail()" }, | 106 | "opiemail", "newMail()" }, |
108 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, | 107 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, |
109 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 108 | Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
110 | "devicebuttons/ipaq_home", | 109 | "devicebuttons/ipaq_home", |
111 | "QPE/Launcher", "home()", | 110 | "QPE/Launcher", "home()", |
112 | "buttonsettings", "raise()" }, | 111 | "buttonsettings", "raise()" }, |
113 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx | Model_iPAQ_H191x, | 112 | { Model_iPAQ_H31xx | Model_iPAQ_H36xx | Model_iPAQ_H37xx | Model_iPAQ_H38xx | Model_iPAQ_H39xx | Model_iPAQ_H5xxx, |
114 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), | 113 | Qt::Key_F24, QT_TRANSLATE_NOOP("Button", "Record Button"), |
115 | "devicebuttons/ipaq_record", | 114 | "devicebuttons/ipaq_record", |
116 | "QPE/VMemo", "toggleRecord()", | 115 | "QPE/VMemo", "toggleRecord()", |
117 | "sound", "raise()" }, | 116 | "sound", "raise()" }, |
117 | |||
118 | { Model_iPAQ_H191x, | ||
119 | Qt::Key_F8, QT_TRANSLATE_NOOP("Button", "Mail Button"), | ||
120 | "devicebuttons/ipaq_mail", | ||
121 | "opiemail", "raise()", | ||
122 | "opiemail", "newMail()" }, | ||
123 | { Model_iPAQ_H191x, | ||
124 | Qt::Key_F7, QT_TRANSLATE_NOOP("Button", "Record Button"), | ||
125 | "devicebuttons/ipaq_record", | ||
126 | "QPE/VMemo", "toggleRecord()", | ||
127 | "sound", "raise()" }, | ||
128 | |||
118 | }; | 129 | }; |
119 | 130 | ||
120 | void iPAQ::init(const QString& model) | 131 | void iPAQ::init(const QString& model) |
121 | { | 132 | { |
122 | d->m_vendorstr = "HP"; | 133 | d->m_vendorstr = "HP"; |
123 | d->m_vendor = Vendor_HP; | 134 | d->m_vendor = Vendor_HP; |
@@ -402,13 +413,13 @@ bool iPAQ::setDisplayStatus ( bool on ) | |||
402 | 413 | ||
403 | QString cmdline; | 414 | QString cmdline; |
404 | 415 | ||
405 | if ( model() == Model_iPAQ_H191x ) { | 416 | if ( model() == Model_iPAQ_H191x ) { |
406 | cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/pxafb/power; echo %2 > /sys/class/backlight/pxafb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); | 417 | cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/pxafb/power; echo %2 > /sys/class/backlight/pxafb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); |
407 | } else { | 418 | } else { |
408 | res = OAbstractMobileDevice::setDisplayStatus(on); | 419 | return OAbstractMobileDevice::setDisplayStatus(on); |
409 | } | 420 | } |
410 | 421 | ||
411 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); | 422 | res = ( ::system( QFile::encodeName(cmdline) ) == 0 ); |
412 | 423 | ||
413 | return res; | 424 | return res; |
414 | } | 425 | } |