author | zautrix <zautrix> | 2005-09-17 21:37:24 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-09-17 21:37:24 (UTC) |
commit | e228113016abd6f75824633da9520c1ec1763f23 (patch) (unidiff) | |
tree | f574255c93d80de4461c6c2743d4ad0c80102144 | |
parent | 2cde25d8061acd536bccd698722952ce8555f5db (diff) | |
download | kdepimpi-e228113016abd6f75824633da9520c1ec1763f23.zip kdepimpi-e228113016abd6f75824633da9520c1ec1763f23.tar.gz kdepimpi-e228113016abd6f75824633da9520c1ec1763f23.tar.bz2 |
aa
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index eff96eb..2acfacf 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -65,13 +65,17 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | |||
65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); | 65 | mPopUp->insertItem( "New Todo", this, SLOT ( newTodo() ) ); |
66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); | 66 | mPopUp->insertItem( "New Mail", this, SLOT ( newMail() ) ); |
67 | mPopUp->insertSeparator(); | 67 | mPopUp->insertSeparator(); |
68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); | 68 | mPopUp->insertItem( "Multi Sync", this, SLOT ( ringSync() ) ); |
69 | mTimerPopUp = new QPopupMenu( this ); | 69 | mTimerPopUp = new QPopupMenu( this ); |
70 | QFont fon = mTimerPopUp->font(); | 70 | QFont fon = mTimerPopUp->font(); |
71 | fon.setPointSize( fon.pointSize() *3/2 ); | 71 | int points = 16; |
72 | if ( QApplication::desktop()->width() < 480 ) | ||
73 | points = 12; | ||
74 | fon.setPointSize( points ); | ||
75 | //qDebug("point s %d ", fon.pointSize()); | ||
72 | mTimerPopUp->setFont( fon ); | 76 | mTimerPopUp->setFont( fon ); |
73 | mPopUp->setFont( fon ); | 77 | mPopUp->setFont( fon ); |
74 | mBeepPopUp = new QPopupMenu( this ); | 78 | mBeepPopUp = new QPopupMenu( this ); |
75 | mSoundPopUp = new QPopupMenu( this ); | 79 | mSoundPopUp = new QPopupMenu( this ); |
76 | mPausePopUp = new QPopupMenu( this ); | 80 | mPausePopUp = new QPopupMenu( this ); |
77 | QPopupMenu* savePopUp = new QPopupMenu( this ); | 81 | QPopupMenu* savePopUp = new QPopupMenu( this ); |
@@ -309,20 +313,18 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) | |||
309 | error = true; | 313 | error = true; |
310 | } | 314 | } |
311 | if ( error ) { | 315 | if ( error ) { |
312 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; | 316 | mAlarmMessage = "Procedure Alarm\nError - File not found\n"; |
313 | mAlarmMessage += mess.mid( 10+len+3+9 ); | 317 | mAlarmMessage += mess.mid( 10+len+3+9 ); |
314 | } else { | 318 | } else { |
315 | { | ||
316 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | ||
317 | } | ||
318 | //qDebug("-----system command %s ",tempfilename.latin1() ); | 319 | //qDebug("-----system command %s ",tempfilename.latin1() ); |
319 | if ( vfork () == 0 ) { | 320 | if ( vfork () == 0 ) { |
320 | execl ( tempfilename.latin1(), 0 ); | 321 | execl ( tempfilename.latin1(), 0 ); |
321 | return; | 322 | return; |
322 | } | 323 | } |
324 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); | ||
323 | return; | 325 | return; |
324 | } | 326 | } |
325 | 327 | ||
326 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); | 328 | //qDebug("+++++++system command %s ",tempfilename.latin1() ); |
327 | } | 329 | } |
328 | if ( mess.left( 11 ) == "audio_alarm") { | 330 | if ( mess.left( 11 ) == "audio_alarm") { |
@@ -342,13 +344,13 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) | |||
342 | //qDebug("audio file command %s ",tempfilename.latin1() ); | 344 | //qDebug("audio file command %s ",tempfilename.latin1() ); |
343 | } | 345 | } |
344 | if ( mess.left( 9 ) == "cal_alarm") { | 346 | if ( mess.left( 9 ) == "cal_alarm") { |
345 | mAlarmMessage = mess.mid( 9 ) ; | 347 | mAlarmMessage = mess.mid( 9 ) ; |
346 | } | 348 | } |
347 | 349 | ||
348 | writeFile(); | 350 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); |
349 | startAlarm( mAlarmMessage, filename ); | 351 | startAlarm( mAlarmMessage, filename ); |
350 | 352 | ||
351 | } | 353 | } |
352 | 354 | ||
353 | int SimpleAlarmDaemonImpl::getFileNameLen( QString mess ) | 355 | int SimpleAlarmDaemonImpl::getFileNameLen( QString mess ) |
354 | { | 356 | { |
@@ -645,13 +647,13 @@ void SimpleAlarmDaemonImpl::ringSync() | |||
645 | void SimpleAlarmDaemonImpl::newCountdown() | 647 | void SimpleAlarmDaemonImpl::newCountdown() |
646 | { | 648 | { |
647 | //recieve("cal_alarm", 10 ); | 649 | //recieve("cal_alarm", 10 ); |
648 | } | 650 | } |
649 | void SimpleAlarmDaemonImpl::simulate() | 651 | void SimpleAlarmDaemonImpl::simulate() |
650 | { | 652 | { |
651 | writeFile(); | 653 | QTimer::singleShot( 10000, this, SLOT ( writeFile() ) ); |
652 | QString filename = getenv("QPEDIR") ; | 654 | QString filename = getenv("QPEDIR") ; |
653 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 655 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
654 | startAlarm("Alarm simulation", filename ); | 656 | startAlarm("Alarm simulation", filename ); |
655 | } | 657 | } |
656 | void SimpleAlarmDaemonImpl::showKO() | 658 | void SimpleAlarmDaemonImpl::showKO() |
657 | { | 659 | { |