Diffstat (limited to 'libopie2/opiecore/device/odevice_jornada.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/device/odevice_jornada.cpp | 58 |
1 files changed, 30 insertions, 28 deletions
diff --git a/libopie2/opiecore/device/odevice_jornada.cpp b/libopie2/opiecore/device/odevice_jornada.cpp index 3acba03..7dbde48 100644 --- a/libopie2/opiecore/device/odevice_jornada.cpp +++ b/libopie2/opiecore/device/odevice_jornada.cpp | |||
@@ -1,27 +1,28 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | Copyright (C) The Opie Team <opie-devel@handhelds.org> | 3 | |
4 | Copyright (C)2002-2005 The Opie Team <opie-devel@handhelds.org> | ||
4 | =. | 5 | =. |
5 | .=l. | 6 | .=l. |
6 | .>+-= | 7 | Â Â Â Â Â Â .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
13 | .%`+i> _;_. | 14 | Â Â .%`+i> Â Â Â _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
20 | ++= -. .` .: details. | 21 | ++= Â -. Â Â .` Â Â .: details. |
21 | : = ...= . :.=- | 22 | : Â Â = Â ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 24 | Â -_. . . Â )=. Â = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
@@ -37,10 +38,11 @@ | |||
37 | 38 | ||
38 | /* OPIE */ | 39 | /* OPIE */ |
39 | #include <qpe/config.h> | 40 | #include <qpe/config.h> |
40 | #include <qpe/resource.h> | ||
41 | #include <qpe/sound.h> | 41 | #include <qpe/sound.h> |
42 | #include <qpe/qcopenvelope_qws.h> | 42 | #include <qpe/qcopenvelope_qws.h> |
43 | 43 | ||
44 | #include <opie2/oresource.h> | ||
45 | |||
44 | /* STD */ | 46 | /* STD */ |
45 | #include <fcntl.h> | 47 | #include <fcntl.h> |
46 | #include <math.h> | 48 | #include <math.h> |
@@ -112,14 +114,14 @@ void Jornada::init(const QString& cpu_info) | |||
112 | { | 114 | { |
113 | d->m_vendorstr = "HP"; | 115 | d->m_vendorstr = "HP"; |
114 | d->m_vendor = Vendor_HP; | 116 | d->m_vendor = Vendor_HP; |
115 | 117 | ||
116 | QString model; | 118 | QString model; |
117 | int loc = cpu_info.find( ":" ); | 119 | int loc = cpu_info.find( ":" ); |
118 | if ( loc != -1 ) | 120 | if ( loc != -1 ) |
119 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); | 121 | model = cpu_info.mid( loc+2 ).simplifyWhiteSpace(); |
120 | else | 122 | else |
121 | model = cpu_info; | 123 | model = cpu_info; |
122 | 124 | ||
123 | if ( model == "HP Jornada 56x" ) { | 125 | if ( model == "HP Jornada 56x" ) { |
124 | d->m_modelstr = "Jornada 56x"; | 126 | d->m_modelstr = "Jornada 56x"; |
125 | d->m_model = Model_Jornada_56x; | 127 | d->m_model = Model_Jornada_56x; |
@@ -127,7 +129,7 @@ void Jornada::init(const QString& cpu_info) | |||
127 | d->m_modelstr = "Jornada 720"; | 129 | d->m_modelstr = "Jornada 720"; |
128 | d->m_model = Model_Jornada_720; | 130 | d->m_model = Model_Jornada_720; |
129 | } | 131 | } |
130 | 132 | ||
131 | d->m_rotation = Rot0; //all Jornadas need this rotation | 133 | d->m_rotation = Rot0; //all Jornadas need this rotation |
132 | //Distribution detecting code is now in base class | 134 | //Distribution detecting code is now in base class |
133 | } | 135 | } |
@@ -146,7 +148,7 @@ void Jornada::initButtons() | |||
146 | if (( ib->model & d->m_model ) == d->m_model ) { | 148 | if (( ib->model & d->m_model ) == d->m_model ) { |
147 | b. setKeycode ( ib->code ); | 149 | b. setKeycode ( ib->code ); |
148 | b. setUserText ( QObject::tr ( "Button", ib->utext )); | 150 | b. setUserText ( QObject::tr ( "Button", ib->utext )); |
149 | b. setPixmap ( Resource::loadPixmap ( ib->pix )); | 151 | b. setPixmap ( OResource::loadPixmap ( ib->pix )); |
150 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); | 152 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); |
151 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); | 153 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); |
152 | 154 | ||
@@ -197,9 +199,9 @@ bool Jornada::setDisplayBrightness( int bright ) | |||
197 | bool Jornada::setDisplayStatus ( bool on ) | 199 | bool Jornada::setDisplayStatus ( bool on ) |
198 | { | 200 | { |
199 | bool res = false; | 201 | bool res = false; |
200 | 202 | ||
201 | QString cmdline; | 203 | QString cmdline; |
202 | 204 | ||
203 | if ( d->m_model == Model_Jornada_56x ) { | 205 | if ( d->m_model == Model_Jornada_56x ) { |
204 | cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/sa1100fb/power; echo %2 > /sys/class/backlight/sa1100fb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); | 206 | cmdline = QString::fromLatin1( "echo %1 > /sys/class/lcd/sa1100fb/power; echo %2 > /sys/class/backlight/sa1100fb/power").arg( on ? "0" : "4" ).arg( on ? "0" : "4" ); |
205 | } else if ( d->m_model == Model_Jornada_720 ) { | 207 | } else if ( d->m_model == Model_Jornada_720 ) { |