summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index d5e3c5c..80975c9 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -255,49 +255,49 @@ ODevice::ODevice ( )
255 255
256 d-> m_holdtime = 1000; // 1000ms 256 d-> m_holdtime = 1000; // 1000ms
257 257
258 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 258 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
259 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); 259 connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & )));
260} 260}
261 261
262void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) 262void ODevice::systemMessage ( const QCString &msg, const QByteArray & )
263{ 263{
264 if ( msg == "deviceButtonMappingChanged()" ) { 264 if ( msg == "deviceButtonMappingChanged()" ) {
265 reloadButtonMapping ( ); 265 reloadButtonMapping ( );
266 } 266 }
267} 267}
268 268
269void ODevice::init ( ) 269void ODevice::init ( )
270{ 270{
271 // Simulation uses iPAQ 3660 device buttons 271 // Simulation uses iPAQ 3660 device buttons
272 272
273 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 273 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
274 i_button *ib = ipaq_buttons + i; 274 i_button *ib = ipaq_buttons + i;
275 ODeviceButton b; 275 ODeviceButton b;
276 276
277 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { 277 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) {
278 b. setKeycode ( ib-> code ); 278 b. setKeycode ( ib-> code );
279 b. setUserText ( qApp-> translate ( "Button", ib-> utext )); 279 b. setUserText ( QObject::tr ( "Button", ib-> utext ));
280 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 280 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
281 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 281 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
282 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 282 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
283 d-> m_buttons. append ( b ); 283 d-> m_buttons. append ( b );
284 } 284 }
285 } 285 }
286 reloadButtonMapping ( ); 286 reloadButtonMapping ( );
287} 287}
288 288
289ODevice::~ODevice ( ) 289ODevice::~ODevice ( )
290{ 290{
291 delete d; 291 delete d;
292} 292}
293 293
294bool ODevice::setSoftSuspend ( bool /*soft*/ ) 294bool ODevice::setSoftSuspend ( bool /*soft*/ )
295{ 295{
296 return false; 296 return false;
297} 297}
298 298
299//#include <linux/apm_bios.h> 299//#include <linux/apm_bios.h>
300 300
301#define APM_IOC_SUSPEND OD_IO( 'A', 2 ) 301#define APM_IOC_SUSPEND OD_IO( 'A', 2 )
302 302
303 303
@@ -613,49 +613,49 @@ void iPAQ::init ( )
613 break; 613 break;
614 } 614 }
615 615
616 f. setName ( "/etc/familiar-version" ); 616 f. setName ( "/etc/familiar-version" );
617 if ( f. open ( IO_ReadOnly )) { 617 if ( f. open ( IO_ReadOnly )) {
618 d-> m_systemstr = "Familiar"; 618 d-> m_systemstr = "Familiar";
619 d-> m_system = System_Familiar; 619 d-> m_system = System_Familiar;
620 620
621 QTextStream ts ( &f ); 621 QTextStream ts ( &f );
622 d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); 622 d-> m_sysverstr = ts. readLine ( ). mid ( 10 );
623 623
624 f. close ( ); 624 f. close ( );
625 } 625 }
626 626
627 m_leds [0] = m_leds [1] = Led_Off; 627 m_leds [0] = m_leds [1] = Led_Off;
628 628
629 m_power_timer = 0; 629 m_power_timer = 0;
630 630
631 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 631 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
632 i_button *ib = ipaq_buttons + i; 632 i_button *ib = ipaq_buttons + i;
633 ODeviceButton b; 633 ODeviceButton b;
634 634
635 if (( ib-> model & d-> m_model ) == d-> m_model ) { 635 if (( ib-> model & d-> m_model ) == d-> m_model ) {
636 b. setKeycode ( ib-> code ); 636 b. setKeycode ( ib-> code );
637 b. setUserText ( qApp-> translate ( "Button", ib-> utext )); 637 b. setUserText ( QObject::tr ( "Button", ib-> utext ));
638 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 638 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
639 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 639 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
640 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 640 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
641 641
642 d-> m_buttons. append ( b ); 642 d-> m_buttons. append ( b );
643 } 643 }
644 } 644 }
645 reloadButtonMapping ( ); 645 reloadButtonMapping ( );
646 646
647 if ( d-> m_qwsserver ) 647 if ( d-> m_qwsserver )
648 QWSServer::setKeyboardFilter ( this ); 648 QWSServer::setKeyboardFilter ( this );
649} 649}
650 650
651//#include <linux/h3600_ts.h> // including kernel headers is evil ... 651//#include <linux/h3600_ts.h> // including kernel headers is evil ...
652 652
653typedef struct { 653typedef struct {
654 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ 654 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
655 unsigned char TotalTime; /* Units of 5 seconds */ 655 unsigned char TotalTime; /* Units of 5 seconds */
656 unsigned char OnTime; /* units of 100m/s */ 656 unsigned char OnTime; /* units of 100m/s */
657 unsigned char OffTime; /* units of 100m/s */ 657 unsigned char OffTime; /* units of 100m/s */
658} LED_IN; 658} LED_IN;
659 659
660typedef struct { 660typedef struct {
661 unsigned char mode; 661 unsigned char mode;
@@ -978,49 +978,49 @@ void Zaurus::init ( )
978 else { 978 else {
979 d-> m_model = Model_Zaurus_SL5000; 979 d-> m_model = Model_Zaurus_SL5000;
980 d-> m_modelstr = "Zaurus (model unknown)"; 980 d-> m_modelstr = "Zaurus (model unknown)";
981 } 981 }
982 982
983 switch ( d-> m_model ) { 983 switch ( d-> m_model ) {
984 case Model_Zaurus_SLC700: 984 case Model_Zaurus_SLC700:
985 /* note for C700, we must check the display rotation 985 /* note for C700, we must check the display rotation
986 * sensor to set an appropriate value 986 * sensor to set an appropriate value
987 */ 987 */
988 case Model_Zaurus_SLA300: 988 case Model_Zaurus_SLA300:
989 case Model_Zaurus_SLB600: 989 case Model_Zaurus_SLB600:
990 case Model_Zaurus_SL5500: 990 case Model_Zaurus_SL5500:
991 case Model_Zaurus_SL5000: 991 case Model_Zaurus_SL5000:
992 default: 992 default:
993 d-> m_rotation = Rot270; 993 d-> m_rotation = Rot270;
994 break; 994 break;
995 } 995 }
996 996
997 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { 997 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) {
998 z_button *zb = z_buttons + i; 998 z_button *zb = z_buttons + i;
999 ODeviceButton b; 999 ODeviceButton b;
1000 1000
1001 b. setKeycode ( zb-> code ); 1001 b. setKeycode ( zb-> code );
1002 b. setUserText ( qApp-> translate ( "Button", zb-> utext )); 1002 b. setUserText ( QObject::tr ( "Button", zb-> utext ));
1003 b. setPixmap ( Resource::loadPixmap ( zb-> pix )); 1003 b. setPixmap ( Resource::loadPixmap ( zb-> pix ));
1004 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction )); 1004 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction ));
1005 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction )); 1005 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction ));
1006 1006
1007 d-> m_buttons. append ( b ); 1007 d-> m_buttons. append ( b );
1008 } 1008 }
1009 reloadButtonMapping ( ); 1009 reloadButtonMapping ( );
1010 1010
1011 m_leds [0] = Led_Off; 1011 m_leds [0] = Led_Off;
1012} 1012}
1013 1013
1014#include <unistd.h> 1014#include <unistd.h>
1015#include <fcntl.h> 1015#include <fcntl.h>
1016#include <sys/ioctl.h> 1016#include <sys/ioctl.h>
1017 1017
1018//#include <asm/sharp_char.h> // including kernel headers is evil ... 1018//#include <asm/sharp_char.h> // including kernel headers is evil ...
1019 1019
1020#define SHARP_DEV_IOCTL_COMMAND_START 0x5680 1020#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
1021 1021
1022 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) 1022 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
1023#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) 1023#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
1024 1024
1025#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ 1025#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
1026#define SHARP_BUZ_KEYSOUND 2 /* key sound */ 1026#define SHARP_BUZ_KEYSOUND 2 /* key sound */