summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonimpl.cpp
Unidiff
Diffstat (limited to 'kalarmd/simplealarmdaemonimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 04b8b21..c1e064c 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -581,97 +581,97 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
581 dl.setFont( fo ); 581 dl.setFont( fo );
582 connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) ); 582 connect ( &spinh, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_hours( int ) ) );
583 connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) ); 583 connect ( &spinm, SIGNAL ( valueChanged (int)), &dl, SLOT ( slot_minutes( int ) ) );
584 lay.addWidget( &dl); 584 lay.addWidget( &dl);
585 spinh.setValue( mCustomMinutes/60 ); 585 spinh.setValue( mCustomMinutes/60 );
586 spinm.setValue( mCustomMinutes%60 ); 586 spinm.setValue( mCustomMinutes%60 );
587 QPushButton ok ( "Start timer", &dia); 587 QPushButton ok ( "Start timer", &dia);
588 ok.setDefault( true ); 588 ok.setDefault( true );
589 ok.setFont( fo ); 589 ok.setFont( fo );
590 spinh.setFocus(); 590 spinh.setFocus();
591 lay.addWidget( &ok); 591 lay.addWidget( &ok);
592 connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) ); 592 connect ( &ok, SIGNAL (clicked()), &dia, SLOT ( accept() ) );
593 dia.resize( dia.sizeHint().width(), dia.sizeHint().height() ); 593 dia.resize( dia.sizeHint().width(), dia.sizeHint().height() );
594 594
595 if ( !dia.exec() ) 595 if ( !dia.exec() )
596 return; 596 return;
597 mCustomText = lEdit.text(); 597 mCustomText = lEdit.text();
598 mCustomMinutes = spinh.value()*60+spinm.value(); 598 mCustomMinutes = spinh.value()*60+spinm.value();
599 if ( mCustomMinutes == 0 ) 599 if ( mCustomMinutes == 0 )
600 mCustomMinutes = 1; 600 mCustomMinutes = 1;
601 if ( mCustomMinutes > 1440 ) 601 if ( mCustomMinutes > 1440 )
602 mCustomMinutes = 1440; 602 mCustomMinutes = 1440;
603 mess += mCustomText; 603 mess += mCustomText;
604 disp = mCustomText; 604 disp = mCustomText;
605 minutes = mCustomMinutes; 605 minutes = mCustomMinutes;
606 mRunningTimerText = mCustomText.stripWhiteSpace (); 606 mRunningTimerText = mCustomText.stripWhiteSpace ();
607 int in = mRunningTimerText.find( " " ); 607 int in = mRunningTimerText.find( " " );
608 mRunningTimerText = mRunningTimerText.left ( in ); 608 mRunningTimerText = mRunningTimerText.left ( in );
609 } 609 }
610 else { 610 else {
611 mess += mTimerPopUp->text( minutes ); 611 mess += mTimerPopUp->text( minutes );
612 disp = mTimerPopUp->text( minutes ); 612 disp = mTimerPopUp->text( minutes );
613 mRunningTimerText = mTimerPopUp->text( minutes ); 613 mRunningTimerText = mTimerPopUp->text( minutes );
614 minutes -= 10; 614 minutes -= 10;
615 } 615 }
616 } 616 }
617 //minutes = 1; 617 //minutes = 1;
618 618
619 mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); 619 mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 );
620 timerMesssage = mess; 620 timerMesssage = mess;
621 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); 621 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8());
622 mTimerStartLabel->setText( disp ); 622 mTimerStartLabel->setText( disp );
623 int w = 200; 623 int w = 200;
624 int h = mTimerStartLabel->sizeHint().height() ; 624 int h = mTimerStartLabel->sizeHint().height() ;
625 int dw = QApplication::desktop()->width(); 625 int dw = QApplication::desktop()->width();
626 int dh = QApplication::desktop()->height(); 626 int dh = QApplication::desktop()->height();
627 mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 627 mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
628 mTimerStartLabel->show(); 628 mTimerStartLabel->show();
629 QTimer::singleShot( 3000, mTimerStartLabel, SLOT ( hide() ) ); 629 QTimer::singleShot( 2000, mTimerStartLabel, SLOT ( hide() ) );
630 mTimerTime = 1; 630 mTimerTime = 1;
631} 631}
632 632
633void SimpleAlarmDaemonImpl::writeFile() 633void SimpleAlarmDaemonImpl::writeFile()
634{ 634{
635 QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); 635 QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
636 //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); 636 //QCopEnvelope e("QPE/Application/kopi", "-writeFile");
637} 637}
638void SimpleAlarmDaemonImpl::showWN() 638void SimpleAlarmDaemonImpl::showWN()
639{ 639{
640 QCopEnvelope e("QPE/Application/kopi", "-showWN"); 640 QCopEnvelope e("QPE/Application/kopi", "-showWN");
641} 641}
642void SimpleAlarmDaemonImpl::newTodo() 642void SimpleAlarmDaemonImpl::newTodo()
643{ 643{
644 QCopEnvelope e("QPE/Application/kopi", "-newTodo"); 644 QCopEnvelope e("QPE/Application/kopi", "-newTodo");
645} 645}
646 646
647void SimpleAlarmDaemonImpl::newEvent() 647void SimpleAlarmDaemonImpl::newEvent()
648{ 648{
649 QCopEnvelope e("QPE/Application/kopi", "-newEvent"); 649 QCopEnvelope e("QPE/Application/kopi", "-newEvent");
650 650
651} 651}
652void SimpleAlarmDaemonImpl::newMail() 652void SimpleAlarmDaemonImpl::newMail()
653{ 653{
654 QCopEnvelope e("QPE/Application/ompi", "newMail()"); 654 QCopEnvelope e("QPE/Application/ompi", "newMail()");
655} 655}
656void SimpleAlarmDaemonImpl::showAdd() 656void SimpleAlarmDaemonImpl::showAdd()
657{ 657{
658 QCopEnvelope e("QPE/Application/kapi", "raise()"); 658 QCopEnvelope e("QPE/Application/kapi", "raise()");
659} 659}
660void SimpleAlarmDaemonImpl::ringSync() 660void SimpleAlarmDaemonImpl::ringSync()
661{ 661{
662 QCopEnvelope e("QPE/Application/kopi", "-ringSync"); 662 QCopEnvelope e("QPE/Application/kopi", "-ringSync");
663 663
664} 664}
665void SimpleAlarmDaemonImpl::newCountdown() 665void SimpleAlarmDaemonImpl::newCountdown()
666{ 666{
667 //recieve("cal_alarm", 10 ); 667 //recieve("cal_alarm", 10 );
668} 668}
669void SimpleAlarmDaemonImpl::simulate() 669void SimpleAlarmDaemonImpl::simulate()
670{ 670{
671 QTimer::singleShot( 5000, this, SLOT ( writeFile() ) ); 671 QTimer::singleShot( 5000, this, SLOT ( writeFile() ) );
672 QString filename = getenv("QPEDIR") ; 672 QString filename = getenv("QPEDIR") ;
673 filename += "/pics/kdepim/korganizer/koalarm.wav"; 673 filename += "/pics/kdepim/korganizer/koalarm.wav";
674 startAlarm("Alarm simulation", filename ); 674 startAlarm("Alarm simulation", filename );
675} 675}
676void SimpleAlarmDaemonImpl::showKO() 676void SimpleAlarmDaemonImpl::showKO()
677{ 677{