author | zautrix <zautrix> | 2005-10-29 22:45:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-29 22:45:39 (UTC) |
commit | b06fa1090f3fa7a71ab2710be444815df8bd6c17 (patch) (unidiff) | |
tree | 16f5aed10d0c78c255ae732959e3dd184ae5e218 /kalarmd/simplealarmdaemonimpl.cpp | |
parent | a4f17bd35c56280c45bda847b42b7d3a003b0a42 (diff) | |
download | kdepimpi-b06fa1090f3fa7a71ab2710be444815df8bd6c17.zip kdepimpi-b06fa1090f3fa7a71ab2710be444815df8bd6c17.tar.gz kdepimpi-b06fa1090f3fa7a71ab2710be444815df8bd6c17.tar.bz2 |
commit
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 aa61fb8..f134d5b 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -457,278 +457,278 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp() | |||
457 | if ( line.left(9 ) == "SEPARATOR" ) { | 457 | if ( line.left(9 ) == "SEPARATOR" ) { |
458 | mTimerPopUp->insertSeparator(); | 458 | mTimerPopUp->insertSeparator(); |
459 | } else { | 459 | } else { |
460 | QStringList li = QStringList::split(";",line); | 460 | QStringList li = QStringList::split(";",line); |
461 | ok = false; | 461 | ok = false; |
462 | if ( li.count() == 2 ) { | 462 | if ( li.count() == 2 ) { |
463 | int val = li[1].toInt( &ok ); | 463 | int val = li[1].toInt( &ok ); |
464 | if ( ok && val > 0 ) { | 464 | if ( ok && val > 0 ) { |
465 | mTimerPopUp->insertItem( li[0], val+10); | 465 | mTimerPopUp->insertItem( li[0], val+10); |
466 | } | 466 | } |
467 | } | 467 | } |
468 | } | 468 | } |
469 | } | 469 | } |
470 | } | 470 | } |
471 | file.close(); | 471 | file.close(); |
472 | #if 0 | 472 | #if 0 |
473 | mTimerPopUp->insertItem( "24 hours", 1440 ); | 473 | mTimerPopUp->insertItem( "24 hours", 1440 ); |
474 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); | 474 | // mTimerPopUp->insertItem( i18n("12 h"), 720 ); |
475 | mTimerPopUp->insertItem( " 8 hours", 480 ); | 475 | mTimerPopUp->insertItem( " 8 hours", 480 ); |
476 | mTimerPopUp->insertItem( " 5 hours", 300 ); | 476 | mTimerPopUp->insertItem( " 5 hours", 300 ); |
477 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); | 477 | // mTimerPopUp->insertItem( i18n(" 2 h"), 120 ); |
478 | mTimerPopUp->insertItem( " 1 hour", 60 ); | 478 | mTimerPopUp->insertItem( " 1 hour", 60 ); |
479 | mTimerPopUp->insertItem( "30 min", 30 ); | 479 | mTimerPopUp->insertItem( "30 min", 30 ); |
480 | mTimerPopUp->insertItem( "15 min", 15 ); | 480 | mTimerPopUp->insertItem( "15 min", 15 ); |
481 | mTimerPopUp->insertItem( "10 min", 10 ); | 481 | mTimerPopUp->insertItem( "10 min", 10 ); |
482 | //mTimerPopUp->insertItem( " 5 min", 5 ); | 482 | //mTimerPopUp->insertItem( " 5 min", 5 ); |
483 | mTimerPopUp->insertSeparator(); | 483 | mTimerPopUp->insertSeparator(); |
484 | mTimerPopUp->insertItem( "Pizza", 22 ); | 484 | mTimerPopUp->insertItem( "Pizza", 22 ); |
485 | mTimerPopUp->insertItem( "Nap", 45 ); | 485 | mTimerPopUp->insertItem( "Nap", 45 ); |
486 | mTimerPopUp->insertItem( "Tea", 5 ); | 486 | mTimerPopUp->insertItem( "Tea", 5 ); |
487 | #endif | 487 | #endif |
488 | QString text = mCustomText.stripWhiteSpace (); | 488 | QString text = mCustomText.stripWhiteSpace (); |
489 | int in = text.find( " " ); | 489 | int in = text.find( " " ); |
490 | text = text.left ( in ); | 490 | text = text.left ( in ); |
491 | mTimerPopUp->insertItem( text, 3 ); | 491 | mTimerPopUp->insertItem( text, 3 ); |
492 | mTimerPopUp->insertSeparator(); | 492 | mTimerPopUp->insertSeparator(); |
493 | mTimerPopUp->insertItem( "Customize", 2 ); | 493 | mTimerPopUp->insertItem( "Customize", 2 ); |
494 | } | 494 | } |
495 | 495 | ||
496 | } | 496 | } |
497 | 497 | ||
498 | void SimpleAlarmDaemonImpl::showTimer() | 498 | void SimpleAlarmDaemonImpl::showTimer() |
499 | { | 499 | { |
500 | fillTimerPopUp(); | 500 | fillTimerPopUp(); |
501 | } | 501 | } |
502 | 502 | ||
503 | void SimpleAlarmDaemonImpl::confTimer( int time ) | 503 | void SimpleAlarmDaemonImpl::confTimer( int time ) |
504 | { | 504 | { |
505 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); | 505 | //qDebug("impleAlarmDaemonImpl::confTimer() %d ", time ); |
506 | int minutes = time; | 506 | int minutes = time; |
507 | if ( minutes == 0 ) { | 507 | if ( minutes == 0 ) { |
508 | if ( ! mTimerTime ) | 508 | if ( ! mTimerTime ) |
509 | return; | 509 | return; |
510 | 510 | ||
511 | QDialog dia ( 0, ("Stop Timer" ), true ); | 511 | QDialog dia ( 0, ("Stop Timer" ), true ); |
512 | QLabel lab (("Really stop the timer?\n\n"+ mRunningTimerText+"\n"), &dia ); | 512 | QLabel lab (("Really stop the timer?\n\n"+ mRunningTimerText+"\n"), &dia ); |
513 | lab.setAlignment( AlignCenter ); | 513 | lab.setAlignment( AlignCenter ); |
514 | dia.setCaption(("KO/Pi Timer Stop" )); | 514 | dia.setCaption(("KO/Pi Timer Stop" )); |
515 | QVBoxLayout lay( &dia ); | 515 | QVBoxLayout lay( &dia ); |
516 | lay.addWidget( &lab); | 516 | lay.addWidget( &lab); |
517 | QPushButton ok ( "Stop timer!", &dia); | 517 | QPushButton ok ( "Stop timer!", &dia); |
518 | QFont fo = dia.font(); | 518 | QFont fo = dia.font(); |
519 | fo.setPointSize( 36 ); | 519 | fo.setPointSize( 36 ); |
520 | ok.setFont( fo ); | 520 | ok.setFont( fo ); |
521 | lay.addWidget( &ok); | 521 | lay.addWidget( &ok); |
522 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); | 522 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); |
523 | QPushButton con ( "Continue timer!", &dia); | 523 | QPushButton con ( "Continue timer!", &dia); |
524 | fo.setPointSize( 36 ); | 524 | fo.setPointSize( 36 ); |
525 | con.setFont( fo ); | 525 | con.setFont( fo ); |
526 | lay.addWidget( &con); | 526 | lay.addWidget( &con); |
527 | connect ( &con, SIGNAL (clicked()), &dia, SLOT ( reject() ) ); | 527 | connect ( &con, SIGNAL (clicked()), &dia, SLOT ( reject() ) ); |
528 | lay.setMargin(5); | 528 | lay.setMargin(5); |
529 | lay.setSpacing(5); | 529 | lay.setSpacing(5); |
530 | dia.resize(dia.sizeHint() ); | 530 | dia.resize(dia.sizeHint() ); |
531 | 531 | ||
532 | if ( !dia.exec() ) | 532 | if ( !dia.exec() ) |
533 | return; | 533 | return; |
534 | 534 | ||
535 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.utf8() ); | 535 | AlarmServer::deleteAlarm ( mRunningTimer,"koalarm" , timerMesssage.utf8() ); |
536 | mTimerTime = 0; | 536 | mTimerTime = 0; |
537 | return; | 537 | return; |
538 | } | 538 | } |
539 | if ( mTimerTime ) | 539 | if ( mTimerTime ) |
540 | return; | 540 | return; |
541 | if ( minutes == 1 ) { | 541 | if ( minutes == 1 ) { |
542 | return; | 542 | return; |
543 | } | 543 | } |
544 | QString mess = "timer_alarm"; | 544 | QString mess = "timer_alarm"; |
545 | QString disp; | 545 | QString disp; |
546 | mess += ("Timer Alarm!\n"); | 546 | mess += ("Timer Alarm!\n"); |
547 | if ( minutes == 3 ) { | 547 | if ( minutes == 3 ) { |
548 | mess += mCustomText; | 548 | mess += mCustomText; |
549 | minutes = mCustomMinutes ; | 549 | minutes = mCustomMinutes ; |
550 | mRunningTimerText = mCustomText.stripWhiteSpace (); | 550 | mRunningTimerText = mCustomText.stripWhiteSpace (); |
551 | int in = mRunningTimerText.find( " " ); | 551 | int in = mRunningTimerText.find( " " ); |
552 | mRunningTimerText = mRunningTimerText.left ( in ); | 552 | mRunningTimerText = mRunningTimerText.left ( in ); |
553 | disp = mCustomText; | 553 | disp = mCustomText; |
554 | } | 554 | } |
555 | else { | 555 | else { |
556 | if ( minutes == 2 ) { | 556 | if ( minutes == 2 ) { |
557 | // ask time | 557 | // ask time |
558 | QDialog dia ( 0, ("Customize Timer" ), true ); | 558 | QDialog dia ( 0, ("Customize Timer" ), true ); |
559 | QLabel lab (("Message Text:"), &dia ); | 559 | QLabel lab (("Message Text:"), &dia ); |
560 | dia.setCaption(("KO/Pi Timer" )); | 560 | dia.setCaption(("KO/Pi Timer" )); |
561 | QVBoxLayout lay( &dia ); | 561 | QVBoxLayout lay( &dia ); |
562 | lay.setMargin(5); | 562 | lay.setMargin(5); |
563 | lay.setSpacing(5); | 563 | lay.setSpacing(5); |
564 | lay.addWidget( &lab); | 564 | lay.addWidget( &lab); |
565 | QLineEdit lEdit( mCustomText, &dia ); | 565 | QLineEdit lEdit( mCustomText, &dia ); |
566 | lay.addWidget( &lEdit); | 566 | lay.addWidget( &lEdit); |
567 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); | 567 | QLabel lab2 (("Countdown time (1 min - 24 h):"), &dia ); |
568 | lay.addWidget( &lab2); | 568 | lay.addWidget( &lab2); |
569 | QHBox hbox1 ( &dia ); | 569 | QHBox hbox1 ( &dia ); |
570 | lay.addWidget( &hbox1); | 570 | lay.addWidget( &hbox1); |
571 | QLabel lab3 (("Hours"), &hbox1 ); | 571 | QLabel lab3 (("Hours"), &hbox1 ); |
572 | QLabel lab4 (("Minutes"), &hbox1 ); | 572 | QLabel lab4 (("Minutes"), &hbox1 ); |
573 | QHBox hbox ( &dia ); | 573 | QHBox hbox ( &dia ); |
574 | QSpinBox spinh( 0, 24, 1,& hbox ); | 574 | QSpinBox spinh( 0, 24, 1,& hbox ); |
575 | QFont fo = dia.font(); | 575 | QFont fo = dia.font(); |
576 | fo.setPointSize( 36 ); | 576 | fo.setPointSize( 36 ); |
577 | QSpinBox spinm( 0, 59, 1,&hbox ); | 577 | QSpinBox spinm( 0, 59, 1,&hbox ); |
578 | spinm.setFont( fo ); | 578 | spinm.setFont( fo ); |
579 | spinh.setFont( fo ); | 579 | spinh.setFont( fo ); |
580 | spinh.setButtonSymbols( QSpinBox::PlusMinus ); | 580 | spinh.setButtonSymbols( QSpinBox::PlusMinus ); |
581 | spinm.setButtonSymbols( QSpinBox::PlusMinus ); | 581 | spinm.setButtonSymbols( QSpinBox::PlusMinus ); |
582 | spinh.upButton ()->setFixedSize( QSize( 48, 30 )); | 582 | spinh.upButton ()->setFixedSize( QSize( 48, 30 )); |
583 | spinh.downButton ()->setFixedSize( QSize( 48, 30 )); | 583 | spinh.downButton ()->setFixedSize( QSize( 48, 30 )); |
584 | //spinh.editor ()->setFixedSize( QSize( 50, 100 )); | 584 | //spinh.editor ()->setFixedSize( QSize( 50, 100 )); |
585 | spinh.setFixedSize( 100,62 ); | 585 | spinh.setFixedSize( 100,62 ); |
586 | spinm.upButton ()->setFixedSize( QSize( 48, 30 )); | 586 | spinm.upButton ()->setFixedSize( QSize( 48, 30 )); |
587 | spinm.downButton ()->setFixedSize( QSize( 48, 30 )); | 587 | spinm.downButton ()->setFixedSize( QSize( 48, 30 )); |
588 | spinm.downButton ()->setGeometry( 50,50,50,50); | 588 | spinm.downButton ()->setGeometry( 50,50,50,50); |
589 | // spinm.setSuffix( " m" ); | 589 | // spinm.setSuffix( " m" ); |
590 | //spinh.setSuffix( " h" ); | 590 | //spinh.setSuffix( " h" ); |
591 | spinm.setWrapping ( true ); | 591 | spinm.setWrapping ( true ); |
592 | //spinm.editor ()->setFixedSize( QSize( 50, 100 )); | 592 | //spinm.editor ()->setFixedSize( QSize( 50, 100 )); |
593 | spinm.setLineStep( 1 ); | 593 | spinm.setLineStep( 1 ); |
594 | spinm.setFixedSize( 110,62 ); | 594 | spinm.setFixedSize( 110,62 ); |
595 | lay.addWidget( &hbox); | 595 | lay.addWidget( &hbox); |
596 | QLabel lab5 ("Timer fires at:", &dia ); | 596 | QLabel lab5 ("Timer fires at:", &dia ); |
597 | lab5.setAlignment( AlignCenter ); | 597 | lab5.setAlignment( AlignCenter ); |
598 | lay.addWidget( &lab5); | 598 | lay.addWidget( &lab5); |
599 | KODateLabel dl ( &dia ); | 599 | KODateLabel dl ( &dia ); |
600 | dl.setAlignment( AlignCenter ); | 600 | dl.setAlignment( AlignCenter ); |
601 | dl.setFont( fo ); | 601 | dl.setFont( fo ); |
602 | connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) ); | 602 | connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) ); |
603 | connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) ); | 603 | connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) ); |
604 | lay.addWidget( &dl); | 604 | lay.addWidget( &dl); |
605 | spinh.setValue( mCustomMinutes/60 ); | 605 | spinh.setValue( mCustomMinutes/60 ); |
606 | spinm.setValue( mCustomMinutes%60 ); | 606 | spinm.setValue( mCustomMinutes%60 ); |
607 | QPushButton ok ( "Start timer", &dia); | 607 | QPushButton ok ( "Start timer", &dia); |
608 | ok.setDefault( true ); | 608 | ok.setDefault( true ); |
609 | ok.setFont( fo ); | 609 | ok.setFont( fo ); |
610 | spinh.setFocus(); | 610 | spinh.setFocus(); |
611 | lay.addWidget( &ok); | 611 | lay.addWidget( &ok); |
612 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); | 612 | connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); |
613 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); | 613 | dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); |
614 | 614 | ||
615 | if ( !dia.exec() ) | 615 | if ( !dia.exec() ) |
616 | return; | 616 | return; |
617 | mCustomText = lEdit.text(); | 617 | mCustomText = lEdit.text(); |
618 | mCustomMinutes = spinh.value()*60+spinm.value(); | 618 | mCustomMinutes = spinh.value()*60+spinm.value(); |
619 | if ( mCustomMinutes == 0 ) | 619 | if ( mCustomMinutes == 0 ) |
620 | mCustomMinutes = 1; | 620 | mCustomMinutes = 1; |
621 | if ( mCustomMinutes > 1440 ) | 621 | if ( mCustomMinutes > 1440 ) |
622 | mCustomMinutes = 1440; | 622 | mCustomMinutes = 1440; |
623 | mess += mCustomText; | 623 | mess += mCustomText; |
624 | disp = mCustomText; | 624 | disp = mCustomText; |
625 | minutes = mCustomMinutes; | 625 | minutes = mCustomMinutes; |
626 | mRunningTimerText = mCustomText.stripWhiteSpace (); | 626 | mRunningTimerText = mCustomText.stripWhiteSpace (); |
627 | int in = mRunningTimerText.find( " " ); | 627 | int in = mRunningTimerText.find( " " ); |
628 | mRunningTimerText = mRunningTimerText.left ( in ); | 628 | mRunningTimerText = mRunningTimerText.left ( in ); |
629 | } | 629 | } |
630 | else { | 630 | else { |
631 | mess += mTimerPopUp->text( minutes ); | 631 | mess += mTimerPopUp->text( minutes ); |
632 | disp = mTimerPopUp->text( minutes ); | 632 | disp = mTimerPopUp->text( minutes ); |
633 | mRunningTimerText = mTimerPopUp->text( minutes ); | 633 | mRunningTimerText = mTimerPopUp->text( minutes ); |
634 | minutes -= 10; | 634 | minutes -= 10; |
635 | } | 635 | } |
636 | } | 636 | } |
637 | //minutes = 1; | 637 | //minutes = 1; |
638 | 638 | ||
639 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); | 639 | mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); |
640 | timerMesssage = mess; | 640 | timerMesssage = mess; |
641 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); | 641 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); |
642 | mTimerStartLabel->setText( disp + "\n\nTimer started!" ); | 642 | mTimerStartLabel->setText( disp + "\n\nTimer started!" ); |
643 | int w = mTimerStartLabel->sizeHint().width()+20; | 643 | int w = mTimerStartLabel->sizeHint().width()+20; |
644 | int h = mTimerStartLabel->sizeHint().height()+40 ; | 644 | int h = mTimerStartLabel->sizeHint().height()+40 ; |
645 | int dw = QApplication::desktop()->width(); | 645 | int dw = QApplication::desktop()->width(); |
646 | int dh = QApplication::desktop()->height(); | 646 | int dh = QApplication::desktop()->height(); |
647 | mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 647 | mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
648 | mTimerStartLabel->show(); | 648 | mTimerStartLabel->show(); |
649 | QTimer::singleShot( 5000, mTimerStartLabel, SLOT ( hide() ) ); | 649 | QTimer::singleShot( 4000, mTimerStartLabel, SLOT ( hide() ) ); |
650 | mTimerTime = 1; | 650 | mTimerTime = 1; |
651 | } | 651 | } |
652 | 652 | ||
653 | void SimpleAlarmDaemonImpl::confFontSize( int size ) | 653 | void SimpleAlarmDaemonImpl::confFontSize( int size ) |
654 | { | 654 | { |
655 | 655 | ||
656 | mFontsizePopup->setItemChecked( mPopupFontSize, false ); | 656 | mFontsizePopup->setItemChecked( mPopupFontSize, false ); |
657 | mPopupFontSize = size; | 657 | mPopupFontSize = size; |
658 | mFontsizePopup->setItemChecked( mPopupFontSize, true ); | 658 | mFontsizePopup->setItemChecked( mPopupFontSize, true ); |
659 | QFont fon = mTimerPopUp->font(); | 659 | QFont fon = mTimerPopUp->font(); |
660 | fon.setPointSize( mPopupFontSize ); | 660 | fon.setPointSize( mPopupFontSize ); |
661 | mTimerPopUp->setFont( fon ); | 661 | mTimerPopUp->setFont( fon ); |
662 | mPopUp->setFont( fon ); | 662 | mPopUp->setFont( fon ); |
663 | fon.setBold( true ); | 663 | fon.setBold( true ); |
664 | fon.setPointSize( mPopupFontSize * 2 ); | 664 | fon.setPointSize( mPopupFontSize * 2 ); |
665 | mTimerStartLabel->setFont( fon ); | 665 | mTimerStartLabel->setFont( fon ); |
666 | } | 666 | } |
667 | void SimpleAlarmDaemonImpl::writeFile() | 667 | void SimpleAlarmDaemonImpl::writeFile() |
668 | { | 668 | { |
669 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | 669 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); |
670 | //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | 670 | //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); |
671 | } | 671 | } |
672 | void SimpleAlarmDaemonImpl::showWN() | 672 | void SimpleAlarmDaemonImpl::showWN() |
673 | { | 673 | { |
674 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); | 674 | QCopEnvelope e("QPE/Application/kopi", "-showWN"); |
675 | } | 675 | } |
676 | void SimpleAlarmDaemonImpl::newTodo() | 676 | void SimpleAlarmDaemonImpl::newTodo() |
677 | { | 677 | { |
678 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); | 678 | QCopEnvelope e("QPE/Application/kopi", "-newTodo"); |
679 | } | 679 | } |
680 | 680 | ||
681 | void SimpleAlarmDaemonImpl::newEvent() | 681 | void SimpleAlarmDaemonImpl::newEvent() |
682 | { | 682 | { |
683 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); | 683 | QCopEnvelope e("QPE/Application/kopi", "-newEvent"); |
684 | 684 | ||
685 | } | 685 | } |
686 | void SimpleAlarmDaemonImpl::newMail() | 686 | void SimpleAlarmDaemonImpl::newMail() |
687 | { | 687 | { |
688 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); | 688 | QCopEnvelope e("QPE/Application/ompi", "newMail()"); |
689 | } | 689 | } |
690 | void SimpleAlarmDaemonImpl::showAdd() | 690 | void SimpleAlarmDaemonImpl::showAdd() |
691 | { | 691 | { |
692 | QCopEnvelope e("QPE/Application/kapi", "raise()"); | 692 | QCopEnvelope e("QPE/Application/kapi", "raise()"); |
693 | } | 693 | } |
694 | void SimpleAlarmDaemonImpl::ringSync() | 694 | void SimpleAlarmDaemonImpl::ringSync() |
695 | { | 695 | { |
696 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); | 696 | QCopEnvelope e("QPE/Application/kopi", "-ringSync"); |
697 | 697 | ||
698 | } | 698 | } |
699 | void SimpleAlarmDaemonImpl::newCountdown() | 699 | void SimpleAlarmDaemonImpl::newCountdown() |
700 | { | 700 | { |
701 | //recieve("cal_alarm", 10 ); | 701 | //recieve("cal_alarm", 10 ); |
702 | } | 702 | } |
703 | void SimpleAlarmDaemonImpl::simulate() | 703 | void SimpleAlarmDaemonImpl::simulate() |
704 | { | 704 | { |
705 | QTimer::singleShot( 2000, this, SLOT ( writeFile() ) ); | 705 | QTimer::singleShot( 2000, this, SLOT ( writeFile() ) ); |
706 | QString filename = getenv("QPEDIR") ; | 706 | QString filename = getenv("QPEDIR") ; |
707 | filename += "/pics/kdepim/korganizer/koalarm.wav"; | 707 | filename += "/pics/kdepim/korganizer/koalarm.wav"; |
708 | startAlarm("Alarm simulation", filename ); | 708 | startAlarm("Alarm simulation", filename ); |
709 | } | 709 | } |
710 | void SimpleAlarmDaemonImpl::showKO() | 710 | void SimpleAlarmDaemonImpl::showKO() |
711 | { | 711 | { |
712 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); | 712 | QCopEnvelope e("QPE/Application/kopi", "-showKO"); |
713 | // testing only | 713 | // testing only |
714 | //QCopEnvelope e("QPE/Application/kopi", "nextView()"); | 714 | //QCopEnvelope e("QPE/Application/kopi", "nextView()"); |
715 | 715 | ||
716 | } | 716 | } |
717 | void SimpleAlarmDaemonImpl::showTodo() | 717 | void SimpleAlarmDaemonImpl::showTodo() |
718 | { | 718 | { |
719 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); | 719 | QCopEnvelope e("QPE/Application/kopi", "-showTodo"); |
720 | 720 | ||
721 | } | 721 | } |
722 | void SimpleAlarmDaemonImpl::writeJournal() | 722 | void SimpleAlarmDaemonImpl::writeJournal() |
723 | { | 723 | { |
724 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); | 724 | QCopEnvelope e("QPE/Application/kopi", "-showJournal"); |
725 | 725 | ||
726 | } | 726 | } |
727 | 727 | ||
728 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) | 728 | void SimpleAlarmDaemonImpl::mousePressEvent( QMouseEvent * ) |
729 | { | 729 | { |
730 | 730 | ||
731 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); | 731 | mPopUp->popup(mapToGlobal(QPoint (0, -mPopUp->height() ))); |
732 | 732 | ||
733 | } | 733 | } |
734 | 734 | ||