summaryrefslogtreecommitdiff
authorkergoth <kergoth>2003-01-26 01:01:32 (UTC)
committer kergoth <kergoth>2003-01-26 01:01:32 (UTC)
commit7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b (patch) (unidiff)
tree29ab0dfa5c6d35621857af78a6fa3eaae517be33
parent7d07568352e368fe473e4c1c5493df2ebb0090d2 (diff)
downloadopie-7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b.zip
opie-7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b.tar.gz
opie-7b5f4142a1ace5fba9fdf9b8e5538669a56ba60b.tar.bz2
1) Add Sharp Zaurus A300/B600|5600/C700 models, will add the model specific bits
later. 2) Add rotation data and method, to set a default rotation based on model .. so we can ditch the use of the startup script to set that.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp55
-rw-r--r--libopie/odevice.h10
2 files changed, 54 insertions, 11 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index d39d72f..78eb416 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -20,96 +20,98 @@
20#include <stdlib.h> 20#include <stdlib.h>
21#include <unistd.h> 21#include <unistd.h>
22#include <fcntl.h> 22#include <fcntl.h>
23#include <sys/ioctl.h> 23#include <sys/ioctl.h>
24#include <signal.h> 24#include <signal.h>
25#include <sys/time.h> 25#include <sys/time.h>
26#include <linux/soundcard.h> 26#include <linux/soundcard.h>
27#include <math.h> 27#include <math.h>
28 28
29#include <qapplication.h> 29#include <qapplication.h>
30 30
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qpe/sound.h> 33#include <qpe/sound.h>
34#include <qpe/resource.h> 34#include <qpe/resource.h>
35#include <qpe/config.h> 35#include <qpe/config.h>
36#include <qpe/qcopenvelope_qws.h> 36#include <qpe/qcopenvelope_qws.h>
37 37
38#include "odevice.h" 38#include "odevice.h"
39 39
40#include <qwindowsystem_qws.h> 40#include <qwindowsystem_qws.h>
41 41
42 42
43// _IO and friends are only defined in kernel headers ... 43// _IO and friends are only defined in kernel headers ...
44 44
45#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) 45#define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 ))
46 46
47#define OD_IO(type,number) OD_IOC(0,type,number,0) 47#define OD_IO(type,number) OD_IOC(0,type,number,0)
48#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) 48#define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size))
49#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) 49#define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size))
50#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) 50#define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size))
51 51
52using namespace Opie; 52using namespace Opie;
53 53
54class ODeviceData { 54class ODeviceData {
55public: 55public:
56 bool m_qwsserver; 56 bool m_qwsserver;
57 57
58 QString m_vendorstr; 58 QString m_vendorstr;
59 OVendor m_vendor; 59 OVendor m_vendor;
60 60
61 QString m_modelstr; 61 QString m_modelstr;
62 OModel m_model; 62 OModel m_model;
63 63
64 QString m_systemstr; 64 QString m_systemstr;
65 OSystem m_system; 65 OSystem m_system;
66 66
67 QString m_sysverstr; 67 QString m_sysverstr;
68
69 Transformation m_rotation;
68 70
69 QValueList <ODeviceButton> m_buttons; 71 QValueList <ODeviceButton> m_buttons;
70 uint m_holdtime; 72 uint m_holdtime;
71}; 73};
72 74
73 75
74class iPAQ : public ODevice, public QWSServer::KeyboardFilter { 76class iPAQ : public ODevice, public QWSServer::KeyboardFilter {
75protected: 77protected:
76 virtual void init ( ); 78 virtual void init ( );
77 79
78public: 80public:
79 virtual bool setSoftSuspend ( bool soft ); 81 virtual bool setSoftSuspend ( bool soft );
80 82
81 virtual bool setDisplayBrightness ( int b ); 83 virtual bool setDisplayBrightness ( int b );
82 virtual int displayBrightnessResolution ( ) const; 84 virtual int displayBrightnessResolution ( ) const;
83 85
84 virtual void alarmSound ( ); 86 virtual void alarmSound ( );
85 87
86 virtual QValueList <OLed> ledList ( ) const; 88 virtual QValueList <OLed> ledList ( ) const;
87 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 89 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
88 virtual OLedState ledState ( OLed led ) const; 90 virtual OLedState ledState ( OLed led ) const;
89 virtual bool setLedState ( OLed led, OLedState st ); 91 virtual bool setLedState ( OLed led, OLedState st );
90 92
91 virtual bool hasLightSensor ( ) const; 93 virtual bool hasLightSensor ( ) const;
92 virtual int readLightSensor ( ); 94 virtual int readLightSensor ( );
93 virtual int lightSensorResolution ( ) const; 95 virtual int lightSensorResolution ( ) const;
94 96
95protected: 97protected:
96 virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); 98 virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat );
97 virtual void timerEvent ( QTimerEvent *te ); 99 virtual void timerEvent ( QTimerEvent *te );
98 100
99 int m_power_timer; 101 int m_power_timer;
100 102
101 OLedState m_leds [2]; 103 OLedState m_leds [2];
102}; 104};
103 105
104class Zaurus : public ODevice { 106class Zaurus : public ODevice {
105protected: 107protected:
106 virtual void init ( ); 108 virtual void init ( );
107 109
108 public: 110 public:
109 virtual bool setSoftSuspend ( bool soft ); 111 virtual bool setSoftSuspend ( bool soft );
110 112
111 virtual bool setDisplayBrightness ( int b ); 113 virtual bool setDisplayBrightness ( int b );
112 virtual int displayBrightnessResolution ( ) const; 114 virtual int displayBrightnessResolution ( ) const;
113 115
114 virtual void alarmSound ( ); 116 virtual void alarmSound ( );
115 virtual void keySound ( ); 117 virtual void keySound ( );
@@ -204,96 +206,97 @@ static QCString makeChannel ( const char *str )
204{ 206{
205 if ( str && !::strchr ( str, '/' )) 207 if ( str && !::strchr ( str, '/' ))
206 return QCString ( "QPE/Application/" ) + str; 208 return QCString ( "QPE/Application/" ) + str;
207 else 209 else
208 return str; 210 return str;
209} 211}
210 212
211 213
212 214
213 215
214ODevice *ODevice::inst ( ) 216ODevice *ODevice::inst ( )
215{ 217{
216 static ODevice *dev = 0; 218 static ODevice *dev = 0;
217 219
218 if ( !dev ) { 220 if ( !dev ) {
219 if ( QFile::exists ( "/proc/hal/model" )) 221 if ( QFile::exists ( "/proc/hal/model" ))
220 dev = new iPAQ ( ); 222 dev = new iPAQ ( );
221 else if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) 223 else if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ))
222 dev = new Zaurus ( ); 224 dev = new Zaurus ( );
223 else 225 else
224 dev = new ODevice ( ); 226 dev = new ODevice ( );
225 227
226 dev-> init ( ); 228 dev-> init ( );
227 } 229 }
228 return dev; 230 return dev;
229} 231}
230 232
231 233
232/************************************************** 234/**************************************************
233 * 235 *
234 * common 236 * common
235 * 237 *
236 **************************************************/ 238 **************************************************/
237 239
238 240
239ODevice::ODevice ( ) 241ODevice::ODevice ( )
240{ 242{
241 d = new ODeviceData; 243 d = new ODeviceData;
242 244
243 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false; 245 d-> m_qwsserver = qApp ? ( qApp-> type ( ) == QApplication::GuiServer ) : false;
244 246
245 d-> m_modelstr = "Unknown"; 247 d-> m_modelstr = "Unknown";
246 d-> m_model = Model_Unknown; 248 d-> m_model = Model_Unknown;
247 d-> m_vendorstr = "Unknown"; 249 d-> m_vendorstr = "Unknown";
248 d-> m_vendor = Vendor_Unknown; 250 d-> m_vendor = Vendor_Unknown;
249 d-> m_systemstr = "Unknown"; 251 d-> m_systemstr = "Unknown";
250 d-> m_system = System_Unknown; 252 d-> m_system = System_Unknown;
251 d-> m_sysverstr = "0.0"; 253 d-> m_sysverstr = "0.0";
254 d-> m_rotation = None;
252 255
253 d-> m_holdtime = 1000; // 1000ms 256 d-> m_holdtime = 1000; // 1000ms
254 257
255 QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); 258 QCopChannel *sysch = new QCopChannel ( "QPE/System", this );
256 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 & )));
257} 260}
258 261
259void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) 262void ODevice::systemMessage ( const QCString &msg, const QByteArray & )
260{ 263{
261 if ( msg == "deviceButtonMappingChanged()" ) { 264 if ( msg == "deviceButtonMappingChanged()" ) {
262 reloadButtonMapping ( ); 265 reloadButtonMapping ( );
263 } 266 }
264} 267}
265 268
266void ODevice::init ( ) 269void ODevice::init ( )
267{ 270{
268 // Simulation uses iPAQ 3660 device buttons 271 // Simulation uses iPAQ 3660 device buttons
269 272
270 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++ ) {
271 i_button *ib = ipaq_buttons + i; 274 i_button *ib = ipaq_buttons + i;
272 ODeviceButton b; 275 ODeviceButton b;
273 276
274 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { 277 if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) {
275 b. setKeycode ( ib-> code ); 278 b. setKeycode ( ib-> code );
276 b. setUserText ( qApp-> translate ( "Button", ib-> utext )); 279 b. setUserText ( qApp-> translate ( "Button", ib-> utext ));
277 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 280 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
278 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 281 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
279 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 282 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
280 283
281 d-> m_buttons. append ( b ); 284 d-> m_buttons. append ( b );
282 } 285 }
283 } 286 }
284 reloadButtonMapping ( ); 287 reloadButtonMapping ( );
285} 288}
286 289
287ODevice::~ODevice ( ) 290ODevice::~ODevice ( )
288{ 291{
289 delete d; 292 delete d;
290} 293}
291 294
292bool ODevice::setSoftSuspend ( bool /*soft*/ ) 295bool ODevice::setSoftSuspend ( bool /*soft*/ )
293{ 296{
294 return false; 297 return false;
295} 298}
296 299
297//#include <linux/apm_bios.h> 300//#include <linux/apm_bios.h>
298 301
299#define APM_IOC_SUSPEND OD_IO( 'A', 2 ) 302#define APM_IOC_SUSPEND OD_IO( 'A', 2 )
@@ -355,96 +358,101 @@ bool ODevice::setDisplayStatus ( bool on )
355 return res; 358 return res;
356} 359}
357 360
358bool ODevice::setDisplayBrightness ( int ) 361bool ODevice::setDisplayBrightness ( int )
359{ 362{
360 return false; 363 return false;
361} 364}
362 365
363int ODevice::displayBrightnessResolution ( ) const 366int ODevice::displayBrightnessResolution ( ) const
364{ 367{
365 return 16; 368 return 16;
366} 369}
367 370
368QString ODevice::vendorString ( ) const 371QString ODevice::vendorString ( ) const
369{ 372{
370 return d-> m_vendorstr; 373 return d-> m_vendorstr;
371} 374}
372 375
373OVendor ODevice::vendor ( ) const 376OVendor ODevice::vendor ( ) const
374{ 377{
375 return d-> m_vendor; 378 return d-> m_vendor;
376} 379}
377 380
378QString ODevice::modelString ( ) const 381QString ODevice::modelString ( ) const
379{ 382{
380 return d-> m_modelstr; 383 return d-> m_modelstr;
381} 384}
382 385
383OModel ODevice::model ( ) const 386OModel ODevice::model ( ) const
384{ 387{
385 return d-> m_model; 388 return d-> m_model;
386} 389}
387 390
388QString ODevice::systemString ( ) const 391QString ODevice::systemString ( ) const
389{ 392{
390 return d-> m_systemstr; 393 return d-> m_systemstr;
391} 394}
392 395
393OSystem ODevice::system ( ) const 396OSystem ODevice::system ( ) const
394{ 397{
395 return d-> m_system; 398 return d-> m_system;
396} 399}
397 400
398QString ODevice::systemVersionString ( ) const 401QString ODevice::systemVersionString ( ) const
399{ 402{
400 return d-> m_sysverstr; 403 return d-> m_sysverstr;
401} 404}
402 405
406Transformation ODevice::rotation ( ) const
407{
408 return d-> m_rotation;
409}
410
403void ODevice::alarmSound ( ) 411void ODevice::alarmSound ( )
404{ 412{
405#ifndef QT_NO_SOUND 413#ifndef QT_NO_SOUND
406 static Sound snd ( "alarm" ); 414 static Sound snd ( "alarm" );
407 415
408 if ( snd. isFinished ( )) 416 if ( snd. isFinished ( ))
409 snd. play ( ); 417 snd. play ( );
410#endif 418#endif
411} 419}
412 420
413void ODevice::keySound ( ) 421void ODevice::keySound ( )
414{ 422{
415#ifndef QT_NO_SOUND 423#ifndef QT_NO_SOUND
416 static Sound snd ( "keysound" ); 424 static Sound snd ( "keysound" );
417 425
418 if ( snd. isFinished ( )) 426 if ( snd. isFinished ( ))
419 snd. play ( ); 427 snd. play ( );
420#endif 428#endif
421} 429}
422 430
423void ODevice::touchSound ( ) 431void ODevice::touchSound ( )
424{ 432{
425 433
426#ifndef QT_NO_SOUND 434#ifndef QT_NO_SOUND
427 static Sound snd ( "touchsound" ); 435 static Sound snd ( "touchsound" );
428 436
429 if ( snd. isFinished ( )) 437 if ( snd. isFinished ( ))
430 snd. play ( ); 438 snd. play ( );
431#endif 439#endif
432} 440}
433 441
434 442
435QValueList <OLed> ODevice::ledList ( ) const 443QValueList <OLed> ODevice::ledList ( ) const
436{ 444{
437 return QValueList <OLed> ( ); 445 return QValueList <OLed> ( );
438} 446}
439 447
440QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const 448QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const
441{ 449{
442 return QValueList <OLedState> ( ); 450 return QValueList <OLedState> ( );
443} 451}
444 452
445OLedState ODevice::ledState ( OLed /*which*/ ) const 453OLedState ODevice::ledState ( OLed /*which*/ ) const
446{ 454{
447 return Led_Off; 455 return Led_Off;
448} 456}
449 457
450bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ ) 458bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ )
@@ -542,151 +550,163 @@ void ODevice::remapHeldAction ( int button, const OQCopMessage &action )
542 550
543 Config buttonFile ( "ButtonSettings" ); 551 Config buttonFile ( "ButtonSettings" );
544 buttonFile. setGroup ( "Button" + QString::number ( button )); 552 buttonFile. setGroup ( "Button" + QString::number ( button ));
545 buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction ( ). channel ( )); 553 buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction ( ). channel ( ));
546 buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction ( ). message ( )); 554 buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction ( ). message ( ));
547 555
548 //buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction ( ). data ( ))); 556 //buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction ( ). data ( )));
549 557
550 QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); 558 QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" );
551} 559}
552 560
553 561
554 562
555 563
556/************************************************** 564/**************************************************
557 * 565 *
558 * iPAQ 566 * iPAQ
559 * 567 *
560 **************************************************/ 568 **************************************************/
561 569
562void iPAQ::init ( ) 570void iPAQ::init ( )
563{ 571{
564 d-> m_vendorstr = "HP"; 572 d-> m_vendorstr = "HP";
565 d-> m_vendor = Vendor_HP; 573 d-> m_vendor = Vendor_HP;
566 574
567 QFile f ( "/proc/hal/model" ); 575 QFile f ( "/proc/hal/model" );
568 576
569 if ( f. open ( IO_ReadOnly )) { 577 if ( f. open ( IO_ReadOnly )) {
570 QTextStream ts ( &f ); 578 QTextStream ts ( &f );
571 579
572 d-> m_modelstr = "H" + ts. readLine ( ); 580 d-> m_modelstr = "H" + ts. readLine ( );
573 581
574 if ( d-> m_modelstr == "H3100" ) 582 if ( d-> m_modelstr == "H3100" )
575 d-> m_model = Model_iPAQ_H31xx; 583 d-> m_model = Model_iPAQ_H31xx;
576 else if ( d-> m_modelstr == "H3600" ) 584 else if ( d-> m_modelstr == "H3600" )
577 d-> m_model = Model_iPAQ_H36xx; 585 d-> m_model = Model_iPAQ_H36xx;
578 else if ( d-> m_modelstr == "H3700" ) 586 else if ( d-> m_modelstr == "H3700" )
579 d-> m_model = Model_iPAQ_H37xx; 587 d-> m_model = Model_iPAQ_H37xx;
580 else if ( d-> m_modelstr == "H3800" ) 588 else if ( d-> m_modelstr == "H3800" )
581 d-> m_model = Model_iPAQ_H38xx; 589 d-> m_model = Model_iPAQ_H38xx;
582 else if ( d-> m_modelstr == "H3900" ) 590 else if ( d-> m_modelstr == "H3900" )
583 d-> m_model = Model_iPAQ_H39xx; 591 d-> m_model = Model_iPAQ_H39xx;
584 else 592 else
585 d-> m_model = Model_Unknown; 593 d-> m_model = Model_Unknown;
586 594
587 f. close ( ); 595 f. close ( );
588 } 596 }
589 597
598 switch ( d-> m_model ) {
599 case Model_iPAQ_H31xx:
600 case Model_iPAQ_H38xx:
601 d-> m_rotation = Rot90;
602 break;
603 case Model_iPAQ_H36xx:
604 case Model_iPAQ_H37xx:
605 case Model_iPAQ_H39xx:
606 default:
607 d-> m_rotation = Rot270;
608 break;
609 }
610
590 f. setName ( "/etc/familiar-version" ); 611 f. setName ( "/etc/familiar-version" );
591 if ( f. open ( IO_ReadOnly )) { 612 if ( f. open ( IO_ReadOnly )) {
592 d-> m_systemstr = "Familiar"; 613 d-> m_systemstr = "Familiar";
593 d-> m_system = System_Familiar; 614 d-> m_system = System_Familiar;
594 615
595 QTextStream ts ( &f ); 616 QTextStream ts ( &f );
596 d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); 617 d-> m_sysverstr = ts. readLine ( ). mid ( 10 );
597 618
598 f. close ( ); 619 f. close ( );
599 } 620 }
600 621
601 m_leds [0] = m_leds [1] = Led_Off; 622 m_leds [0] = m_leds [1] = Led_Off;
602 623
603 m_power_timer = 0; 624 m_power_timer = 0;
604 625
605 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { 626 for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) {
606 i_button *ib = ipaq_buttons + i; 627 i_button *ib = ipaq_buttons + i;
607 ODeviceButton b; 628 ODeviceButton b;
608 629
609 if (( ib-> model & d-> m_model ) == d-> m_model ) { 630 if (( ib-> model & d-> m_model ) == d-> m_model ) {
610 b. setKeycode ( ib-> code ); 631 b. setKeycode ( ib-> code );
611 b. setUserText ( qApp-> translate ( "Button", ib-> utext )); 632 b. setUserText ( qApp-> translate ( "Button", ib-> utext ));
612 b. setPixmap ( Resource::loadPixmap ( ib-> pix )); 633 b. setPixmap ( Resource::loadPixmap ( ib-> pix ));
613 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); 634 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction ));
614 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); 635 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction ));
615 636
616 d-> m_buttons. append ( b ); 637 d-> m_buttons. append ( b );
617 } 638 }
618 } 639 }
619 reloadButtonMapping ( ); 640 reloadButtonMapping ( );
620 641
621 if ( d-> m_qwsserver ) 642 if ( d-> m_qwsserver )
622 QWSServer::setKeyboardFilter ( this ); 643 QWSServer::setKeyboardFilter ( this );
623} 644}
624 645
625//#include <linux/h3600_ts.h> // including kernel headers is evil ... 646//#include <linux/h3600_ts.h> // including kernel headers is evil ...
626 647
627typedef struct { 648typedef struct {
628 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ 649 unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */
629 unsigned char TotalTime; /* Units of 5 seconds */ 650 unsigned char TotalTime; /* Units of 5 seconds */
630 unsigned char OnTime; /* units of 100m/s */ 651 unsigned char OnTime; /* units of 100m/s */
631 unsigned char OffTime; /* units of 100m/s */ 652 unsigned char OffTime; /* units of 100m/s */
632} LED_IN; 653} LED_IN;
633 654
634typedef struct { 655typedef struct {
635 unsigned char mode; 656 unsigned char mode;
636 unsigned char pwr; 657 unsigned char pwr;
637 unsigned char brightness; 658 unsigned char brightness;
638} FLITE_IN; 659} FLITE_IN;
639 660
640#define LED_ON OD_IOW( 'f', 5, LED_IN ) 661#define LED_ON OD_IOW( 'f', 5, LED_IN )
641#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) 662#define FLITE_ON OD_IOW( 'f', 7, FLITE_IN )
642 663
643 664
644
645QValueList <OLed> iPAQ::ledList ( ) const 665QValueList <OLed> iPAQ::ledList ( ) const
646{ 666{
647 QValueList <OLed> vl; 667 QValueList <OLed> vl;
648 vl << Led_Power; 668 vl << Led_Power;
649 669
650 if ( d-> m_model == Model_iPAQ_H38xx ) 670 if ( d-> m_model == Model_iPAQ_H38xx )
651 vl << Led_BlueTooth; 671 vl << Led_BlueTooth;
652 return vl; 672 return vl;
653} 673}
654 674
655QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const 675QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const
656{ 676{
657 QValueList <OLedState> vl; 677 QValueList <OLedState> vl;
658 678
659 if ( l == Led_Power ) 679 if ( l == Led_Power )
660 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast; 680 vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast;
661 else if ( l == Led_BlueTooth && d-> m_model == Model_iPAQ_H38xx ) 681 else if ( l == Led_BlueTooth && d-> m_model == Model_iPAQ_H38xx )
662 vl << Led_Off; // << Led_On << ??? 682 vl << Led_Off; // << Led_On << ???
663 683
664 return vl; 684 return vl;
665} 685}
666 686
667OLedState iPAQ::ledState ( OLed l ) const 687OLedState iPAQ::ledState ( OLed l ) const
668 { 688 {
669 switch ( l ) { 689 switch ( l ) {
670 case Led_Power: 690 case Led_Power:
671 return m_leds [0]; 691 return m_leds [0];
672 case Led_BlueTooth: 692 case Led_BlueTooth:
673 return m_leds [1]; 693 return m_leds [1];
674 default: 694 default:
675 return Led_Off; 695 return Led_Off;
676 } 696 }
677} 697}
678 698
679bool iPAQ::setLedState ( OLed l, OLedState st ) 699bool iPAQ::setLedState ( OLed l, OLedState st )
680{ 700{
681 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK ); 701 static int fd = ::open ( "/dev/touchscreen/0", O_RDWR | O_NONBLOCK );
682 702
683 if ( l == Led_Power ) { 703 if ( l == Led_Power ) {
684 if ( fd >= 0 ) { 704 if ( fd >= 0 ) {
685 LED_IN leds; 705 LED_IN leds;
686 ::memset ( &leds, 0, sizeof( leds )); 706 ::memset ( &leds, 0, sizeof( leds ));
687 leds. TotalTime = 0; 707 leds. TotalTime = 0;
688 leds. OnTime = 0; 708 leds. OnTime = 0;
689 leds. OffTime = 1; 709 leds. OffTime = 1;
690 leds. OffOnBlink = 2; 710 leds. OffOnBlink = 2;
691 711
692 switch ( st ) { 712 switch ( st ) {
@@ -892,107 +912,126 @@ int iPAQ::readLightSensor ( )
892 912
893 return val; 913 return val;
894} 914}
895 915
896int iPAQ::lightSensorResolution ( ) const 916int iPAQ::lightSensorResolution ( ) const
897{ 917{
898 return 256; 918 return 256;
899} 919}
900 920
901/************************************************** 921/**************************************************
902 * 922 *
903 * Zaurus 923 * Zaurus
904 * 924 *
905 **************************************************/ 925 **************************************************/
906 926
907 927
908 928
909void Zaurus::init ( ) 929void Zaurus::init ( )
910{ 930{
911 d-> m_vendorstr = "Sharp"; 931 d-> m_vendorstr = "Sharp";
912 d-> m_vendor = Vendor_Sharp; 932 d-> m_vendor = Vendor_Sharp;
913 933
914 QFile f ( "/proc/filesystems" ); 934 QFile f ( "/proc/filesystems" );
915 935
916 if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { 936 if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) {
917 d-> m_vendorstr = "OpenZaurus Team"; 937 d-> m_vendorstr = "OpenZaurus Team";
918 d-> m_systemstr = "OpenZaurus"; 938 d-> m_systemstr = "OpenZaurus";
919 d-> m_system = System_OpenZaurus; 939 d-> m_system = System_OpenZaurus;
920 940
921 f. close ( ); 941 f. close ( );
922 942
923 f. setName ( "/etc/oz_version" ); 943 f. setName ( "/etc/oz_version" );
924 if ( f. open ( IO_ReadOnly )) { 944 if ( f. open ( IO_ReadOnly )) {
925 QTextStream ts ( &f ); 945 QTextStream ts ( &f );
926 d-> m_sysverstr = ts. readLine ( );//. mid ( 10 ); 946 d-> m_sysverstr = ts. readLine ( );//. mid ( 10 );
927 f. close ( ); 947 f. close ( );
928 } 948 }
929 } 949 }
930 else { 950 else {
931 d-> m_systemstr = "Zaurus"; 951 d-> m_systemstr = "Zaurus";
932 d-> m_system = System_Zaurus; 952 d-> m_system = System_Zaurus;
933 } 953 }
934 954
935 f. setName ( "/proc/deviceinfo/product" ); 955 f. setName ( "/proc/deviceinfo/product" );
936 if ( f. open ( IO_ReadOnly ) ) { 956 if ( f. open ( IO_ReadOnly ) ) {
937 QTextStream ts ( &f ); 957 QTextStream ts ( &f );
938 QString model = ts. readLine ( ); 958 QString model = ts. readLine ( );
939 f. close ( ); 959 f. close ( );
940 if ( model == "SL-5000D" ) { 960
941 d-> m_model = Model_Zaurus_SL5000; 961 d-> m_modelstr = QString("Zaurus ") + model;
942 d-> m_modelstr = "Zaurus SL-5000D"; 962 if ( model == "SL-5500" )
943 } else if ( model == "SL-5500" ) {
944 d-> m_model = Model_Zaurus_SL5500; 963 d-> m_model = Model_Zaurus_SL5500;
945 d-> m_modelstr = "Zaurus SL-5500"; 964 else if ( model == "SL-C700" )
946 } 965 d-> m_model = Model_Zaurus_SLC700;
966 else if ( model == "SL-A300" )
967 d-> m_model = Model_Zaurus_SLA300;
968 else if ( model == "SL-B600" || model == "SL-5600" )
969 d-> m_model = Model_Zaurus_SLB600;
970 else
971 d-> m_model = Model_Zaurus_SL5000;
947 } 972 }
948 else { 973 else {
949 d-> m_model = Model_Zaurus_SL5000; 974 d-> m_model = Model_Zaurus_SL5000;
950 d-> m_modelstr = "Zaurus SL-5000D (unverified)"; 975 d-> m_modelstr = "Zaurus (model unknown)";
976 }
977
978 switch ( d-> m_model ) {
979 case Model_Zaurus_SLC700:
980 /* note for C700, we must check the display rotation
981 * sensor to set an appropriate value
982 */
983 case Model_Zaurus_SLA300:
984 case Model_Zaurus_SLB600:
985 case Model_Zaurus_SL5500:
986 case Model_Zaurus_SL5000:
987 default:
988 d-> m_rotation = Rot270;
989 break;
951 } 990 }
952 991
953 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) { 992 for ( uint i = 0; i < ( sizeof( z_buttons ) / sizeof( z_button )); i++ ) {
954 z_button *zb = z_buttons + i; 993 z_button *zb = z_buttons + i;
955 ODeviceButton b; 994 ODeviceButton b;
956 995
957 b. setKeycode ( zb-> code ); 996 b. setKeycode ( zb-> code );
958 b. setUserText ( qApp-> translate ( "Button", zb-> utext )); 997 b. setUserText ( qApp-> translate ( "Button", zb-> utext ));
959 b. setPixmap ( Resource::loadPixmap ( zb-> pix )); 998 b. setPixmap ( Resource::loadPixmap ( zb-> pix ));
960 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction )); 999 b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction ));
961 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction )); 1000 b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction ));
962 1001
963 d-> m_buttons. append ( b ); 1002 d-> m_buttons. append ( b );
964 } 1003 }
965 reloadButtonMapping ( ); 1004 reloadButtonMapping ( );
966 1005
967 m_leds [0] = Led_Off; 1006 m_leds [0] = Led_Off;
968} 1007}
969 1008
970#include <unistd.h> 1009#include <unistd.h>
971#include <fcntl.h> 1010#include <fcntl.h>
972#include <sys/ioctl.h> 1011#include <sys/ioctl.h>
973 1012
974//#include <asm/sharp_char.h> // including kernel headers is evil ... 1013//#include <asm/sharp_char.h> // including kernel headers is evil ...
975 1014
976#define SHARP_DEV_IOCTL_COMMAND_START 0x5680 1015#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
977 1016
978 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) 1017 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
979#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) 1018#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
980 1019
981#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ 1020#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
982#define SHARP_BUZ_KEYSOUND 2 /* key sound */ 1021#define SHARP_BUZ_KEYSOUND 2 /* key sound */
983#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ 1022#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
984 1023
985/* --- for SHARP_BUZZER device --- */ 1024/* --- for SHARP_BUZZER device --- */
986 1025
987 //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) 1026 //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
988//#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) 1027//#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
989 1028
990#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) 1029#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
991#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) 1030#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
992#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) 1031#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
993#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) 1032#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
994#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) 1033#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
995 1034
996//#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ 1035//#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
997//#define SHARP_BUZ_KEYSOUND 2 /* key sound */ 1036//#define SHARP_BUZ_KEYSOUND 2 /* key sound */
998 1037
diff --git a/libopie/odevice.h b/libopie/odevice.h
index 54b85a2..8164c4d 100644
--- a/libopie/odevice.h
+++ b/libopie/odevice.h
@@ -1,173 +1,177 @@
1/* This file is part of the OPIE libraries 1/* This file is part of the OPIE libraries
2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) 2 Copyright (C) 2002 Robert Griebl (sandman@handhelds.org)
3 3
4 This library is free software; you can redistribute it and/or 4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public 5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either 6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version. 7 version 2 of the License, or (at your option) any later version.
8 8
9 This library is distributed in the hope that it will be useful, 9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details. 12 Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to 15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. 17 Boston, MA 02111-1307, USA.
18*/ 18*/
19 19
20#ifndef _LIBOPIE_ODEVICE_H_ 20#ifndef _LIBOPIE_ODEVICE_H_
21#define _LIBOPIE_ODEVICE_H_ 21#define _LIBOPIE_ODEVICE_H_
22 22
23#include <qobject.h> 23#include <qobject.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qnamespace.h> 25#include <qnamespace.h>
26 26
27#include <opie/odevicebutton.h> 27#include <opie/odevicebutton.h>
28 28
29enum Transformation { None, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
30
29class ODeviceData; 31class ODeviceData;
30 32
31namespace Opie { 33namespace Opie {
32 34
33enum OModel { 35enum OModel {
34 Model_Unknown, 36 Model_Unknown,
35 37
36 Model_Series_Mask = 0xff000000, 38 Model_Series_Mask = 0xff000000,
37 39
38 Model_iPAQ = ( 1 << 24 ), 40 Model_iPAQ = ( 1 << 24 ),
39 41
40 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ), 42 Model_iPAQ_All = ( Model_iPAQ | 0xffffff ),
41 Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ), 43 Model_iPAQ_H31xx = ( Model_iPAQ | 0x000001 ),
42 Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ), 44 Model_iPAQ_H36xx = ( Model_iPAQ | 0x000002 ),
43 Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ), 45 Model_iPAQ_H37xx = ( Model_iPAQ | 0x000004 ),
44 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ), 46 Model_iPAQ_H38xx = ( Model_iPAQ | 0x000008 ),
45 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ), 47 Model_iPAQ_H39xx = ( Model_iPAQ | 0x000010 ),
46 48
47 Model_Zaurus = ( 2 << 24 ), 49 Model_Zaurus = ( 2 << 24 ),
48 50
49 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ), 51 Model_Zaurus_SL5000 = ( Model_Zaurus | 0x000001 ),
50 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ), 52 Model_Zaurus_SL5500 = ( Model_Zaurus | 0x000002 ),
53 Model_Zaurus_SLA300 = ( Model_Zaurus | 0x000003 ),
54 Model_Zaurus_SLB600 = ( Model_Zaurus | 0x000004 ),
55 Model_Zaurus_SLC700 = ( Model_Zaurus | 0x000005 ),
51}; 56};
52 57
53 enum OVendor { 58 enum OVendor {
54 Vendor_Unknown, 59 Vendor_Unknown,
55 60
56 Vendor_HP, 61 Vendor_HP,
57 Vendor_Sharp 62 Vendor_Sharp
58 }; 63 };
59 64
60enum OSystem { 65enum OSystem {
61 System_Unknown, 66 System_Unknown,
62 67
63 System_Familiar, 68 System_Familiar,
64 System_Zaurus, 69 System_Zaurus,
65 System_OpenZaurus 70 System_OpenZaurus
66}; 71};
67 72
68enum OLedState { 73enum OLedState {
69 Led_Off, 74 Led_Off,
70 Led_On, 75 Led_On,
71 Led_BlinkSlow, 76 Led_BlinkSlow,
72 Led_BlinkFast 77 Led_BlinkFast
73}; 78};
74 79
75enum OLed { 80enum OLed {
76 Led_Mail, 81 Led_Mail,
77 Led_Power, 82 Led_Power,
78 Led_BlueTooth 83 Led_BlueTooth
79}; 84};
80 85
81enum OHardKey { 86enum OHardKey {
82 HardKey_Datebook = Qt::Key_F9, 87 HardKey_Datebook = Qt::Key_F9,
83 HardKey_Contacts = Qt::Key_F10, 88 HardKey_Contacts = Qt::Key_F10,
84 HardKey_Menu = Qt::Key_F11, 89 HardKey_Menu = Qt::Key_F11,
85 HardKey_Home = Qt::Key_F12, 90 HardKey_Home = Qt::Key_F12,
86 HardKey_Mail = Qt::Key_F13, 91 HardKey_Mail = Qt::Key_F13,
87 HardKey_Record = Qt::Key_F24, 92 HardKey_Record = Qt::Key_F24,
88 HardKey_Suspend = Qt::Key_F34, 93 HardKey_Suspend = Qt::Key_F34,
89 HardKey_Backlight = Qt::Key_F35, 94 HardKey_Backlight = Qt::Key_F35,
90}; 95};
91 96
92
93class ODevice : public QObject { 97class ODevice : public QObject {
94 Q_OBJECT 98 Q_OBJECT
95 99
96private: 100private:
97 ODevice ( const ODevice & ); 101 ODevice ( const ODevice & );
98 102
99protected: 103protected:
100 ODevice ( ); 104 ODevice ( );
101 virtual void init ( ); 105 virtual void init ( );
102 106
103 ODeviceData *d; 107 ODeviceData *d;
104 108
105public: 109public:
106 virtual ~ODevice ( ); 110 virtual ~ODevice ( );
107 111
108 static ODevice *inst ( ); 112 static ODevice *inst ( );
109 113
110
111
112// information 114// information
113 115
114 QString modelString ( ) const; 116 QString modelString ( ) const;
115 OModel model ( ) const; 117 OModel model ( ) const;
116 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); } 118 inline OModel series ( ) const { return (OModel) ( model ( ) & Model_Series_Mask ); }
117 119
118 QString vendorString ( ) const; 120 QString vendorString ( ) const;
119 OVendor vendor ( ) const; 121 OVendor vendor ( ) const;
120 122
121 QString systemString ( ) const; 123 QString systemString ( ) const;
122 OSystem system ( ) const; 124 OSystem system ( ) const;
123 125
124 QString systemVersionString ( ) const; 126 QString systemVersionString ( ) const;
125 127
128 Transformation rotation ( ) const;
129
126 // system 130 // system
127 131
128 virtual bool setSoftSuspend ( bool on ); 132 virtual bool setSoftSuspend ( bool on );
129 virtual bool suspend ( ); 133 virtual bool suspend ( );
130 134
131 virtual bool setDisplayStatus ( bool on ); 135 virtual bool setDisplayStatus ( bool on );
132 virtual bool setDisplayBrightness ( int brightness ); 136 virtual bool setDisplayBrightness ( int brightness );
133 virtual int displayBrightnessResolution ( ) const; 137 virtual int displayBrightnessResolution ( ) const;
134 138
135// input / output 139// input / output
136 140
137 virtual void alarmSound ( ); 141 virtual void alarmSound ( );
138 virtual void keySound ( ); 142 virtual void keySound ( );
139 virtual void touchSound ( ); 143 virtual void touchSound ( );
140 144
141 virtual QValueList <OLed> ledList ( ) const; 145 virtual QValueList <OLed> ledList ( ) const;
142 virtual QValueList <OLedState> ledStateList ( OLed led ) const; 146 virtual QValueList <OLedState> ledStateList ( OLed led ) const;
143 virtual OLedState ledState ( OLed led ) const; 147 virtual OLedState ledState ( OLed led ) const;
144 virtual bool setLedState ( OLed led, OLedState st ); 148 virtual bool setLedState ( OLed led, OLedState st );
145 149
146 virtual bool hasLightSensor ( ) const; 150 virtual bool hasLightSensor ( ) const;
147 virtual int readLightSensor ( ); 151 virtual int readLightSensor ( );
148 virtual int lightSensorResolution ( ) const; 152 virtual int lightSensorResolution ( ) const;
149 153
150 /** 154 /**
151 * Returns the available buttons on this device. The number and location 155 * Returns the available buttons on this device. The number and location
152 * of buttons will vary depending on the device. Button numbers will be assigned 156 * of buttons will vary depending on the device. Button numbers will be assigned
153 * by the device manufacturer and will be from most preferred button to least preffered 157 * by the device manufacturer and will be from most preferred button to least preffered
154 * button. Note that this list only contains "user mappable" buttons. 158 * button. Note that this list only contains "user mappable" buttons.
155 */ 159 */
156 const QValueList<ODeviceButton> &buttons ( ) const; 160 const QValueList<ODeviceButton> &buttons ( ) const;
157 161
158 /** 162 /**
159 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it 163 * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it
160 * returns 0L 164 * returns 0L
161 */ 165 */
162 const ODeviceButton *buttonForKeycode ( ushort keyCode ); 166 const ODeviceButton *buttonForKeycode ( ushort keyCode );
163 167
164 /** 168 /**
165 * Reassigns the pressed action for \a button. To return to the factory 169 * Reassigns the pressed action for \a button. To return to the factory
166 * default pass an empty string as \a qcopMessage. 170 * default pass an empty string as \a qcopMessage.
167 */ 171 */
168 void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); 172 void remapPressedAction ( int button, const OQCopMessage &qcopMessage );
169 173
170 /** 174 /**
171 * Reassigns the held action for \a button. To return to the factory 175 * Reassigns the held action for \a button. To return to the factory
172 * default pass an empty string as \a qcopMessage. 176 * default pass an empty string as \a qcopMessage.
173 */ 177 */