author | sandman <sandman> | 2002-11-19 00:58:14 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-11-19 00:58:14 (UTC) |
commit | 9581e5b0b3b4b4e36d8356f15dd33eba9cf99b31 (patch) (side-by-side diff) | |
tree | e0656e311b020954e08f2cb9abd45aba6cf7f360 | |
parent | ed81ae3a2a504c324481b85ceb24808381b5b89c (diff) | |
download | opie-9581e5b0b3b4b4e36d8356f15dd33eba9cf99b31.zip opie-9581e5b0b3b4b4e36d8356f15dd33eba9cf99b31.tar.gz opie-9581e5b0b3b4b4e36d8356f15dd33eba9cf99b31.tar.bz2 |
Removed the last QT_QWS_* in libopie .. the libopie binary should now be
interchangeable between iPAQ, OZ and retail Z (in theory ;) )
-rw-r--r-- | libopie/odevice.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 25c9826..2d2f7db 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -283,81 +283,75 @@ QString ODevice::modelString ( ) const } OModel ODevice::model ( ) const { return d-> m_model; } QString ODevice::systemString ( ) const { return d-> m_systemstr; } OSystem ODevice::system ( ) const { return d-> m_system; } QString ODevice::systemVersionString ( ) const { return d-> m_sysverstr; } void ODevice::alarmSound ( ) { -#ifndef QT_QWS_EBX #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); if ( snd. isFinished ( )) snd. play ( ); #endif -#endif } void ODevice::keySound ( ) { -#ifndef QT_QWS_EBX #ifndef QT_NO_SOUND static Sound snd ( "keysound" ); if ( snd. isFinished ( )) snd. play ( ); #endif -#endif } void ODevice::touchSound ( ) { -#ifndef QT_QWS_EBX #ifndef QT_NO_SOUND static Sound snd ( "touchsound" ); if ( snd. isFinished ( )) snd. play ( ); #endif -#endif } QValueList <OLed> ODevice::ledList ( ) const { return QValueList <OLed> ( ); } QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const { return QValueList <OLedState> ( ); } OLedState ODevice::ledState ( OLed /*which*/ ) const { return Led_Off; } bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ ) { return false; } bool ODevice::hasLightSensor ( ) const @@ -571,85 +565,83 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b default: break; } if ( newkeycode != keycode ) { if ( newkeycode != Key_unknown ) QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); return true; } else return false; } void iPAQ::timerEvent ( QTimerEvent * ) { killTimer ( m_power_timer ); m_power_timer = 0; QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); } void iPAQ::alarmSound ( ) { -#if defined( QT_QWS_IPAQ ) // IPAQ #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); int fd; int vol; bool vol_reset = false; if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { Config cfg ( "qpe" ); cfg. setGroup ( "Volume" ); int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); if ( volalarm < 0 ) volalarm = 0; else if ( volalarm > 100 ) volalarm = 100; volalarm |= ( volalarm << 8 ); if (( volalarm & 0xff ) > ( vol & 0xff )) { if ( ::ioctl ( fd, MIXER_WRITE( 0 ), &volalarm ) >= 0 ) vol_reset = true; } } } snd. play ( ); while ( !snd. isFinished ( )) qApp-> processEvents ( ); if ( fd >= 0 ) { if ( vol_reset ) ::ioctl ( fd, MIXER_WRITE( 0 ), &vol ); ::close ( fd ); } #endif -#endif } bool iPAQ::setSoftSuspend ( bool soft ) { bool res = false; int fd; if (( fd = ::open ( "/proc/sys/ts/suspend_button_mode", O_WRONLY )) >= 0 ) { if ( ::write ( fd, soft ? "1" : "0", 1 ) == 1 ) res = true; else ::perror ( "write to /proc/sys/ts/suspend_button_mode" ); ::close ( fd ); } else ::perror ( "/proc/sys/ts/suspend_button_mode" ); return res; } bool iPAQ::setDisplayBrightness ( int bright ) |