summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_simpad.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_simpad.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_simpad.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp
index a2cd419..4397b78 100644
--- a/libopie2/opiecore/device/odevice_simpad.cpp
+++ b/libopie2/opiecore/device/odevice_simpad.cpp
@@ -260,49 +260,49 @@ bool SIMpad::setLedState ( OLed l, OLedState st )
260 } 260 }
261 } 261 }
262 } 262 }
263 263
264#endif 264#endif
265 return false; 265 return false;
266} 266}
267 267
268 268
269bool SIMpad::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) 269bool SIMpad::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat )
270{ 270{
271 //TODO 271 //TODO
272 return false; 272 return false;
273} 273}
274 274
275void SIMpad::timerEvent ( QTimerEvent * ) 275void SIMpad::timerEvent ( QTimerEvent * )
276{ 276{
277 killTimer ( m_power_timer ); 277 killTimer ( m_power_timer );
278 m_power_timer = 0; 278 m_power_timer = 0;
279 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); 279 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false );
280 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); 280 QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false );
281} 281}
282 282
283 283
284void SIMpad::alarmSound() 284void SIMpad::playAlarmSound()
285{ 285{
286#ifndef QT_NO_SOUND 286#ifndef QT_NO_SOUND
287 static Sound snd ( "alarm" ); 287 static Sound snd ( "alarm" );
288 int fd; 288 int fd;
289 int vol; 289 int vol;
290 bool vol_reset = false; 290 bool vol_reset = false;
291 291
292 if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { 292 if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) {
293 if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { 293 if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) {
294 Config cfg ( "qpe" ); 294 Config cfg ( "qpe" );
295 cfg. setGroup ( "Volume" ); 295 cfg. setGroup ( "Volume" );
296 296
297 int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); 297 int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 );
298 if ( volalarm < 0 ) 298 if ( volalarm < 0 )
299 volalarm = 0; 299 volalarm = 0;
300 else if ( volalarm > 100 ) 300 else if ( volalarm > 100 )
301 volalarm = 100; 301 volalarm = 100;
302 volalarm |= ( volalarm << 8 ); 302 volalarm |= ( volalarm << 8 );
303 303
304 if ( ::ioctl ( fd, MIXER_WRITE( 0 ), &volalarm ) >= 0 ) 304 if ( ::ioctl ( fd, MIXER_WRITE( 0 ), &volalarm ) >= 0 )
305 vol_reset = true; 305 vol_reset = true;
306 } 306 }
307 } 307 }
308 308