summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 553e377..82873e1 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -323,17 +323,17 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& )
323 mAlarmMessage = "Procedure Alarm\nError - File not found\n"; 323 mAlarmMessage = "Procedure Alarm\nError - File not found\n";
324 mAlarmMessage += mess.mid( 10+len+3+9 ); 324 mAlarmMessage += mess.mid( 10+len+3+9 );
325 } else { 325 } else {
326 //qDebug("-----system command %s ",tempfilename.latin1() ); 326 //qDebug("-----system command %s ",tempfilename.latin1() );
327 if ( vfork () == 0 ) { 327 if ( vfork () == 0 ) {
328 execl ( tempfilename.latin1(), 0 ); 328 execl ( tempfilename.latin1(), 0 );
329 return; 329 return;
330 } 330 }
331 QTimer::singleShot( 5000, this, SLOT ( writeFile() ) ); 331 QTimer::singleShot( 2000, this, SLOT ( writeFile() ) );
332 return; 332 return;
333 } 333 }
334 334
335 //qDebug("+++++++system command %s ",tempfilename.latin1() ); 335 //qDebug("+++++++system command %s ",tempfilename.latin1() );
336 } 336 }
337 if ( mess.left( 11 ) == "audio_alarm") { 337 if ( mess.left( 11 ) == "audio_alarm") {
338 bool error = false; 338 bool error = false;
339 int len = mess.mid( 11 ).find("+++"); 339 int len = mess.mid( 11 ).find("+++");
@@ -349,17 +349,17 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& )
349 } 349 }
350 mAlarmMessage = mess.mid( 11+len+3+9 ); 350 mAlarmMessage = mess.mid( 11+len+3+9 );
351 //qDebug("audio file command %s ",tempfilename.latin1() ); 351 //qDebug("audio file command %s ",tempfilename.latin1() );
352 } 352 }
353 if ( mess.left( 9 ) == "cal_alarm") { 353 if ( mess.left( 9 ) == "cal_alarm") {
354 mAlarmMessage = mess.mid( 9 ) ; 354 mAlarmMessage = mess.mid( 9 ) ;
355 } 355 }
356 356
357 QTimer::singleShot( 5000, this, SLOT ( writeFile() ) ); 357 QTimer::singleShot( 2000, this, SLOT ( writeFile() ) );
358 startAlarm( mAlarmMessage, filename ); 358 startAlarm( mAlarmMessage, filename );
359 359
360} 360}
361 361
362int SimpleAlarmDaemonImpl::getFileNameLen( QString mess ) 362int SimpleAlarmDaemonImpl::getFileNameLen( QString mess )
363{ 363{
364 return 0; 364 return 0;
365} 365}
@@ -622,17 +622,17 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
622 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); 622 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8());
623 mTimerStartLabel->setText( disp + "\n\nTimer started!" ); 623 mTimerStartLabel->setText( disp + "\n\nTimer started!" );
624 int w = mTimerStartLabel->sizeHint().width()+20; 624 int w = mTimerStartLabel->sizeHint().width()+20;
625 int h = mTimerStartLabel->sizeHint().height()+40 ; 625 int h = mTimerStartLabel->sizeHint().height()+40 ;
626 int dw = QApplication::desktop()->width(); 626 int dw = QApplication::desktop()->width();
627 int dh = QApplication::desktop()->height(); 627 int dh = QApplication::desktop()->height();
628 mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 628 mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
629 mTimerStartLabel->show(); 629 mTimerStartLabel->show();
630 QTimer::singleShot( 3000, mTimerStartLabel, SLOT ( hide() ) ); 630 QTimer::singleShot( 5000, mTimerStartLabel, SLOT ( hide() ) );
631 mTimerTime = 1; 631 mTimerTime = 1;
632} 632}
633 633
634void SimpleAlarmDaemonImpl::writeFile() 634void SimpleAlarmDaemonImpl::writeFile()
635{ 635{
636 QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); 636 QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
637 //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); 637 //QCopEnvelope e("QPE/Application/kopi", "-writeFile");
638} 638}
@@ -664,17 +664,17 @@ void SimpleAlarmDaemonImpl::ringSync()
664 664
665} 665}
666void SimpleAlarmDaemonImpl::newCountdown() 666void SimpleAlarmDaemonImpl::newCountdown()
667{ 667{
668 //recieve("cal_alarm", 10 ); 668 //recieve("cal_alarm", 10 );
669} 669}
670void SimpleAlarmDaemonImpl::simulate() 670void SimpleAlarmDaemonImpl::simulate()
671{ 671{
672 QTimer::singleShot( 5000, this, SLOT ( writeFile() ) ); 672 QTimer::singleShot( 2000, this, SLOT ( writeFile() ) );
673 QString filename = getenv("QPEDIR") ; 673 QString filename = getenv("QPEDIR") ;
674 filename += "/pics/kdepim/korganizer/koalarm.wav"; 674 filename += "/pics/kdepim/korganizer/koalarm.wav";
675 startAlarm("Alarm simulation", filename ); 675 startAlarm("Alarm simulation", filename );
676} 676}
677void SimpleAlarmDaemonImpl::showKO() 677void SimpleAlarmDaemonImpl::showKO()
678{ 678{
679 QCopEnvelope e("QPE/Application/kopi", "-showKO"); 679 QCopEnvelope e("QPE/Application/kopi", "-showKO");
680 // testing only 680 // testing only