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 | |
parent | a4f17bd35c56280c45bda847b42b7d3a003b0a42 (diff) | |
download | kdepimpi-b06fa1090f3fa7a71ab2710be444815df8bd6c17.zip kdepimpi-b06fa1090f3fa7a71ab2710be444815df8bd6c17.tar.gz kdepimpi-b06fa1090f3fa7a71ab2710be444815df8bd6c17.tar.bz2 |
commit
-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 | |||
@@ -601,97 +601,97 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
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 | ||