summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_htc.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_htc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_htc.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp
index a6ade11..44b33c0 100644
--- a/libopie2/opiecore/device/odevice_htc.cpp
+++ b/libopie2/opiecore/device/odevice_htc.cpp
@@ -98,31 +98,31 @@ struct htc_button htc_buttons_universal [] = {
98 "buttonsettings", "raise()" }, 98 "buttonsettings", "raise()" },
99 { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), 99 { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"),
100 "devicebuttons/z_menu", 100 "devicebuttons/z_menu",
101 "QPE/TaskBar", "toggleMenu()", 101 "QPE/TaskBar", "toggleMenu()",
102 "QPE/TaskBar", "toggleStartMenu()" }, 102 "QPE/TaskBar", "toggleStartMenu()" },
103 { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), 103 { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"),
104 "devicebuttons/z_mail", 104 "devicebuttons/z_mail",
105 "opiemail", "raise()", 105 "opiemail", "raise()",
106 "opiemail", "newMail()" }, 106 "opiemail", "newMail()" },
107 107
108 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"), 108 { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Hinge1"),
109 "devicebuttons/z_hinge1", 109 "devicebuttons/z_hinge1",
110 "QPE/Rotation", "rotateDefault()",0}, 110 "QPE/Rotation", "rotateDefault()",0,0},
111 { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"), 111 { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Hinge2"),
112 "devicebuttons/z_hinge2", 112 "devicebuttons/z_hinge2",
113 "QPE/Rotation", "rotateDefault()",0}, 113 "QPE/Rotation", "rotateDefault()",0,0},
114 { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"), 114 { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Hinge3"),
115 "devicebuttons/z_hinge3", 115 "devicebuttons/z_hinge3",
116 "QPE/Rotation", "rotateDefault()",0}, 116 "QPE/Rotation", "rotateDefault()",0,0},
117}; 117};
118 118
119 119
120// 120//
121// HTC-Universal (PXA-model w/ 480x640 3.6" lcd) 121// HTC-Universal (PXA-model w/ 480x640 3.6" lcd)
122// HTC-Alpine (PXA-model w/ 240x320 3.5" lcd) 122// HTC-Alpine (PXA-model w/ 240x320 3.5" lcd)
123// HTC-Apache (PXA-model w/ 240x320 2.8" lcd) 123// HTC-Apache (PXA-model w/ 240x320 2.8" lcd)
124// HTC-Beetles (PXA-model w/ 240x240 3.0" lcd) 124// HTC-Beetles (PXA-model w/ 240x240 3.0" lcd)
125// HTC-Blueangel (PXA-model w/ 240x320 3.5" lcd) 125// HTC-Blueangel (PXA-model w/ 240x320 3.5" lcd)
126// HTC-Himalaya (PXA-model w/ 240x320 3.5" lcd) 126// HTC-Himalaya (PXA-model w/ 240x320 3.5" lcd)
127// HTC-Magician (PXA-model w/ 240x320 2.8" lcd) 127// HTC-Magician (PXA-model w/ 240x320 2.8" lcd)
128 128
@@ -346,25 +346,25 @@ QValueList <OLedState> HTC::ledStateList( OLed l ) const
346 vl << Led_Off << Led_On << Led_BlinkSlow; 346 vl << Led_Off << Led_On << Led_BlinkSlow;
347 return vl; 347 return vl;
348} 348}
349 349
350OLedState HTC::ledState( OLed which ) const 350OLedState HTC::ledState( OLed which ) const
351{ 351{
352 if ( which == Led_Mail ) 352 if ( which == Led_Mail )
353 return m_leds [0]; 353 return m_leds [0];
354 else 354 else
355 return Led_Off; 355 return Led_Off;
356} 356}
357 357
358bool HTC::setLedState( OLed which, OLedState st ) 358bool HTC::setLedState( OLed, OLedState )
359{ 359{
360 qDebug( "HTC::setLedState: ODevice handling not yet implemented" ); 360 qDebug( "HTC::setLedState: ODevice handling not yet implemented" );
361 return false; 361 return false;
362} 362}
363 363
364int HTC::displayBrightnessResolution() const 364int HTC::displayBrightnessResolution() const
365{ 365{
366 int res = 1; 366 int res = 1;
367 367
368 int fd = ::open( m_backlightdev + "max_brightness", O_RDONLY|O_NONBLOCK ); 368 int fd = ::open( m_backlightdev + "max_brightness", O_RDONLY|O_NONBLOCK );
369 369
370 if ( fd ) 370 if ( fd )
@@ -422,24 +422,26 @@ Transformation HTC::rotation() const
422 qDebug( "HTC::rotation()" ); 422 qDebug( "HTC::rotation()" );
423 Transformation rot = Rot270; 423 Transformation rot = Rot270;
424 424
425 switch ( d->m_model ) { 425 switch ( d->m_model ) {
426 case Model_HTC_Universal: 426 case Model_HTC_Universal:
427 { 427 {
428 OHingeStatus hs = readHingeSensor(); 428 OHingeStatus hs = readHingeSensor();
429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs ); 429 qDebug( "HTC::rotation() - hinge sensor = %d", (int) hs );
430 if ( hs == CASE_PORTRAIT ) rot = Rot0; 430 if ( hs == CASE_PORTRAIT ) rot = Rot0;
431 else if ( hs == CASE_UNKNOWN ) rot = Rot270; 431 else if ( hs == CASE_UNKNOWN ) rot = Rot270;
432 } 432 }
433 break; 433 break;
434 default:
435 break;
434 } 436 }
435 437
436 qDebug( "HTC::rotation() - returning '%d'", rot ); 438 qDebug( "HTC::rotation() - returning '%d'", rot );
437 return rot; 439 return rot;
438} 440}
439ODirection HTC::direction() const 441ODirection HTC::direction() const
440{ 442{
441 ODirection dir; 443 ODirection dir;
442 444
443 switch ( d->m_model ) { 445 switch ( d->m_model ) {
444 case Model_HTC_Universal: { 446 case Model_HTC_Universal: {
445 OHingeStatus hs = readHingeSensor(); 447 OHingeStatus hs = readHingeSensor();