Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 18e4299..4ff6861 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -499,109 +499,109 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
499 | else { | 499 | else { |
500 | if ( minutes == 2 ) { | 500 | if ( minutes == 2 ) { |
501 | // ask time | 501 | // ask time |
502 | QDialog dia ( 0, ("Customize Timer" ), true ); | 502 | QDialog dia ( 0, ("Customize Timer" ), true ); |
503 | QLabel lab (("Message Text:"), &dia ); | 503 | QLabel lab (("Message Text:"), &dia ); |
504 | dia.setCaption(("KO/Pi Timer" )); | 504 | dia.setCaption(("KO/Pi Timer" )); |
505 | QVBoxLayout lay( &dia ); | 505 | QVBoxLayout lay( &dia ); |
506 | lay.setMargin(5); | 506 | lay.setMargin(5); |
507 | lay.setSpacing(5); | 507 | lay.setSpacing(5); |
508 | lay.addWidget( &lab); | 508 | lay.addWidget( &lab); |
509 | QLineEdit lEdit( mCustomText, &dia ); | 509 | QLineEdit lEdit( mCustomText, &dia ); |
510 | lay.addWidget( &lEdit); | 510 | lay.addWidget( &lEdit); |
511 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); | 511 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); |
512 | lay.addWidget( &lab2); | 512 | lay.addWidget( &lab2); |
513 | QHBox hbox ( &dia ); | 513 | QHBox hbox ( &dia ); |
514 | QLabel lab3 (("h:"), &hbox ); | 514 | QLabel lab3 (("h:"), &hbox ); |
515 | QSpinBox spinh( 0, 24, 1,& hbox ); | 515 | QSpinBox spinh( 0, 24, 1,& hbox ); |
516 | QLabel lab4 ((" min:"), &hbox ); | 516 | QLabel lab4 ((" min:"), &hbox ); |
517 | QSpinBox spinm( 0, 59, 1,&hbox ); | 517 | QSpinBox spinm( 0, 59, 1,&hbox ); |
518 | spinh.setValue( mCustomMinutes/60 ); | 518 | spinh.setValue( mCustomMinutes/60 ); |
519 | spinm.setValue( mCustomMinutes%60 ); | 519 | spinm.setValue( mCustomMinutes%60 ); |
520 | lay.addWidget( &hbox); | 520 | lay.addWidget( &hbox); |
521 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); | 521 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); |
522 | if ( !dia.exec() ) | 522 | if ( !dia.exec() ) |
523 | return; | 523 | return; |
524 | mCustomText = lEdit.text(); | 524 | mCustomText = lEdit.text(); |
525 | mCustomMinutes = spinh.value()*60+spinm.value(); | 525 | mCustomMinutes = spinh.value()*60+spinm.value(); |
526 | if ( mCustomMinutes == 0 ) | 526 | if ( mCustomMinutes == 0 ) |
527 | mCustomMinutes = 1; | 527 | mCustomMinutes = 1; |
528 | if ( mCustomMinutes > 1440 ) | 528 | if ( mCustomMinutes > 1440 ) |
529 | mCustomMinutes = 1440; | 529 | mCustomMinutes = 1440; |
530 | mess += mCustomText; | 530 | mess += mCustomText; |
531 | minutes = mCustomMinutes; | 531 | minutes = mCustomMinutes; |
532 | } | 532 | } |
533 | else | 533 | else |
534 | mess+= QString::number ( minutes ) + ( " minutes are past!"); | 534 | mess+= QString::number ( minutes ) + ( " minutes are past!"); |
535 | } | 535 | } |
536 | //minutes = 1; | 536 | //minutes = 1; |
537 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); | 537 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); |
538 | timerMesssage = mess; | 538 | timerMesssage = mess; |
539 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); | 539 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.latin1()); |
540 | mTimerTime = 1; | 540 | mTimerTime = 1; |
541 | } | 541 | } |
542 | 542 | ||
543 | void SimpleAlarmDaemonImpl::writeFile() | 543 | void SimpleAlarmDaemonImpl::writeFile() |
544 | { | 544 | { |
545 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | 545 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); |
546 | } | 546 | } |
547 | void SimpleAlarmDaemonImpl::showWN() | 547 | void SimpleAlarmDaemonImpl::showWN() |
548 | { | 548 | { |
549 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); | 549 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); |
550 | } | 550 | } |
551 | void SimpleAlarmDaemonImpl::newTodo() | 551 | void SimpleAlarmDaemonImpl::newTodo() |
552 | { | 552 | { |
553 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); | 553 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); |
554 | } | 554 | } |
555 | 555 | ||
556 | void SimpleAlarmDaemonImpl::newEvent() | 556 | void SimpleAlarmDaemonImpl::newEvent() |
557 | { | 557 | { |
558 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); | 558 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); |
559 | 559 | ||
560 | } | 560 | } |
561 | void SimpleAlarmDaemonImpl::newMail() | 561 | void SimpleAlarmDaemonImpl::newMail() |
562 | { | 562 | { |
563 | QCopEnvelope e("QPE/Application/kmpi", "newMail()"); | 563 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); |
564 | } | 564 | } |
565 | void SimpleAlarmDaemonImpl::showAdd() | 565 | void SimpleAlarmDaemonImpl::showAdd() |
566 | { | 566 | { |
567 | QCopEnvelope e("QPE/Application/kapi", " "); | 567 | QCopEnvelope e("QPE/Application/kapi", " "); |
568 | } | 568 | } |
569 | void SimpleAlarmDaemonImpl::ringSync() | 569 | void SimpleAlarmDaemonImpl::ringSync() |
570 | { | 570 | { |
571 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); | 571 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); |
572 | 572 | ||
573 | } | 573 | } |
574 | void SimpleAlarmDaemonImpl::newCountdown() | 574 | void SimpleAlarmDaemonImpl::newCountdown() |
575 | { | 575 | { |
576 | //recieve("cal_alarm", 10 ); | 576 | //recieve("cal_alarm", 10 ); |
577 | } | 577 | } |
578 | void SimpleAlarmDaemonImpl::simulate() | 578 | void SimpleAlarmDaemonImpl::simulate() |
579 | { | 579 | { |
580 | writeFile(); | 580 | writeFile(); |
581 | QString filename = getenv("QPEDIR") ; | 581 | QString filename = getenv("QPEDIR") ; |
582 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 582 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
583 | startAlarm("Alarm simulation", filename ); | 583 | startAlarm("Alarm simulation", filename ); |
584 | } | 584 | } |
585 | void SimpleAlarmDaemonImpl::showKO() | 585 | void SimpleAlarmDaemonImpl::showKO() |
586 | { | 586 | { |
587 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); | 587 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); |
588 | 588 | ||
589 | } | 589 | } |
590 | void SimpleAlarmDaemonImpl::showTodo() | 590 | void SimpleAlarmDaemonImpl::showTodo() |
591 | { | 591 | { |
592 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); | 592 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); |
593 | 593 | ||
594 | } | 594 | } |
595 | void SimpleAlarmDaemonImpl::writeJournal() | 595 | void SimpleAlarmDaemonImpl::writeJournal() |
596 | { | 596 | { |
597 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); | 597 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); |
598 | 598 | ||
599 | } | 599 | } |
600 | 600 | ||
601 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) | 601 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) |
602 | { | 602 | { |
603 | 603 | ||
604 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); | 604 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); |
605 | 605 | ||
606 | } | 606 | } |
607 | 607 | ||