summaryrefslogtreecommitdiff
path: root/noncore/tools/clock/clock.cpp
Unidiff
Diffstat (limited to 'noncore/tools/clock/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/clock.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp
index a47793b..69d8214 100644
--- a/noncore/tools/clock/clock.cpp
+++ b/noncore/tools/clock/clock.cpp
@@ -302,14 +302,14 @@ void Clock::slotSetAlarm()
302 config.setGroup("Time"); 302 config.setGroup("Time");
303 QString tmp; 303 QString tmp;
304 hour = setAlarmDlg->Hour_Slider->value(); 304 hour = setAlarmDlg->Hour_Slider->value();
305 minute = setAlarmDlg->Minute_Slider->value(); 305 minute = setAlarmDlg->Minute_Slider->value();
306 snoozeTime=setAlarmDlg->SnoozeSlider->value(); 306 snoozeTime=setAlarmDlg->SnoozeSlider->value();
307 if(ampm) { 307 if(ampm) {
308 if ( hour == 12 ) 308 if ( hour == 12 )
309 hour = 0; 309 hour = 0;
310 310
311 if(setAlarmDlg->Pm_RadioButton->isChecked() && hour < 12 ) 311 if(setAlarmDlg->Pm_RadioButton->isChecked() && hour < 12 )
312 hour+=12; 312 hour+=12;
313 } 313 }
314 config.writeEntry("clockAlarmHour", tmp.setNum( hour ),10); 314 config.writeEntry("clockAlarmHour", tmp.setNum( hour ),10);
315 config.writeEntry("clockAlarmMinute",tmp.setNum( minute ),10); 315 config.writeEntry("clockAlarmMinute",tmp.setNum( minute ),10);
@@ -384,14 +384,23 @@ void Clock::appMessage(const QCString& msg, const QByteArray& data)
384{ 384{
385 int stopTimer = 0; 385 int stopTimer = 0;
386 int timerStay = 5000; 386 int timerStay = 5000;
387 bSound=TRUE; 387 bSound=TRUE;
388 qDebug("Message received in clock"); 388 qDebug("Message received in clock");
389 if ( msg == "alarm(QDateTime,int)" ) { 389 if ( msg == "alarm(QDateTime,int)" ) {
390 Config config( "qpe" );
391 config.setGroup("Time");
392 if(config.readBoolEntry("mp3Alarm",0)){
393
394 QCopEnvelope e("QPE/Application/opieplayer","setDocument(QString)");
395 e<<config.readEntry("mp3File","");
396 } else {
397
390 Sound::soundAlarm(); 398 Sound::soundAlarm();
391 stopTimer = startTimer( timerStay); 399 stopTimer = startTimer( timerStay);
400 }
392 } 401 }
393 show(); 402 show();
394 raise(); 403 raise();
395 QPEApplication::setKeepRunning(); 404 QPEApplication::setKeepRunning();
396 setActiveWindow(); 405 setActiveWindow();
397} 406}