summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_ipaq.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_ipaq.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_ipaq.cpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp
index 2ce38a9..8bc775f 100644
--- a/libopie2/opiecore/device/odevice_ipaq.cpp
+++ b/libopie2/opiecore/device/odevice_ipaq.cpp
@@ -1,55 +1,57 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3              Copyright (C) 2002,2003,2004 The Opie Team <opie-devel@handhelds.org> 3
4 Copyright (C)2002, 2003, 2004 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.
28*/ 29*/
29 30
30#include "odevice_ipaq.h" 31#include "odevice_ipaq.h"
31 32
32/* QT */ 33/* QT */
33#include <qapplication.h> 34#include <qapplication.h>
34#include <qfile.h> 35#include <qfile.h>
35#include <qtextstream.h> 36#include <qtextstream.h>
36#include <qwindowsystem_qws.h> 37#include <qwindowsystem_qws.h>
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#include <opie2/okeyfilter.h> 44#include <opie2/okeyfilter.h>
45#include <opie2/oresource.h>
44 46
45/* STD */ 47/* STD */
46#include <fcntl.h> 48#include <fcntl.h>
47#include <math.h> 49#include <math.h>
48#include <stdlib.h> 50#include <stdlib.h>
49#include <signal.h> 51#include <signal.h>
50#include <sys/ioctl.h> 52#include <sys/ioctl.h>
51#include <sys/time.h> 53#include <sys/time.h>
52#include <unistd.h> 54#include <unistd.h>
53#ifndef QT_NO_SOUND 55#ifndef QT_NO_SOUND
54#include <linux/soundcard.h> 56#include <linux/soundcard.h>
55#endif 57#endif
@@ -172,25 +174,25 @@ void iPAQ::initButtons()
172 addPreHandler(this); 174 addPreHandler(this);
173 } 175 }
174 176
175 d->m_buttons = new QValueList <ODeviceButton>; 177 d->m_buttons = new QValueList <ODeviceButton>;
176 178
177 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 179 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
178 i_button *ib = ipaq_buttons + i; 180 i_button *ib = ipaq_buttons + i;
179 ODeviceButton b; 181 ODeviceButton b;
180 182
181 if (( ib->model & d->m_model ) == d->m_model ) { 183 if (( ib->model & d->m_model ) == d->m_model ) {
182 b. setKeycode ( ib->code ); 184 b. setKeycode ( ib->code );
183 b. setUserText ( QObject::tr ( "Button", ib->utext )); 185 b. setUserText ( QObject::tr ( "Button", ib->utext ));
184 b. setPixmap ( Resource::loadPixmap ( ib->pix )); 186 b. setPixmap ( OResource::loadPixmap ( ib->pix ));
185 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); 187 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction ));
186 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); 188 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction ));
187 189
188 d->m_buttons->append ( b ); 190 d->m_buttons->append ( b );
189 } 191 }
190 } 192 }
191 reloadButtonMapping(); 193 reloadButtonMapping();
192} 194}
193 195
194QValueList <OLed> iPAQ::ledList() const 196QValueList <OLed> iPAQ::ledList() const
195{ 197{
196 QValueList <OLed> vl; 198 QValueList <OLed> vl;