summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_jornada.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/device/odevice_jornada.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_jornada.cpp58
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 @@
/*
-                 This file is part of the Opie Project
-              Copyright (C) The Opie Team <opie-devel@handhelds.org>
+                 This file is part of the Opie Project
+
+ Copyright (C)2002-2005 The Opie Team <opie-devel@handhelds.org>
=.
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; either version 2 of the License,
+     ._= =}       : or (at your option) any later version.
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+:     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@@ -37,10 +38,11 @@
/* OPIE */
#include <qpe/config.h>
-#include <qpe/resource.h>
#include <qpe/sound.h>
#include <qpe/qcopenvelope_qws.h>
+#include <opie2/oresource.h>
+
/* STD */
#include <fcntl.h>
#include <math.h>
@@ -112,14 +114,14 @@ void Jornada::init(const QString& cpu_info)
{
d->m_vendorstr = "HP";
d->m_vendor = Vendor_HP;
-
+
QString model;
int loc = cpu_info.find( ":" );
if ( loc != -1 )
model = cpu_info.mid( loc+2 ).simplifyWhiteSpace();
else
model = cpu_info;
-
+
if ( model == "HP Jornada 56x" ) {
d->m_modelstr = "Jornada 56x";
d->m_model = Model_Jornada_56x;
@@ -127,7 +129,7 @@ void Jornada::init(const QString& cpu_info)
d->m_modelstr = "Jornada 720";
d->m_model = Model_Jornada_720;
}
-
+
d->m_rotation = Rot0; //all Jornadas need this rotation
//Distribution detecting code is now in base class
}
@@ -146,7 +148,7 @@ void Jornada::initButtons()
if (( ib->model & d->m_model ) == d->m_model ) {
b. setKeycode ( ib->code );
b. setUserText ( QObject::tr ( "Button", ib->utext ));
- b. setPixmap ( Resource::loadPixmap ( ib->pix ));
+ b. setPixmap ( OResource::loadPixmap ( ib->pix ));
b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
@@ -197,9 +199,9 @@ bool Jornada::setDisplayBrightness( int bright )
bool Jornada::setDisplayStatus ( bool on )
{
bool res = false;
-
+
QString cmdline;
-
+
if ( d->m_model == Model_Jornada_56x ) {
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" );
} else if ( d->m_model == Model_Jornada_720 ) {