-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 23 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.h | 1 |
2 files changed, 23 insertions, 1 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 8ea8a73..04b8b21 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -149,4 +149,11 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) | |||
149 | } | 149 | } |
150 | saveSlot( 1 ); | 150 | saveSlot( 1 ); |
151 | mTimerStartLabel = new QLabel( 0 ); | ||
152 | mTimerStartLabel->setCaption( "Timer started!"); | ||
153 | fon = mTimerPopUp->font(); | ||
154 | fon.setBold( true ); | ||
155 | points = (fon.pointSize()*2); | ||
156 | fon.setPointSize( points ); | ||
157 | mTimerStartLabel->setFont( fon ); | ||
151 | } | 158 | } |
152 | 159 | ||
@@ -155,5 +162,7 @@ SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() | |||
155 | //delete mPopUp; | 162 | //delete mPopUp; |
156 | delete mAlarmDialog; | 163 | delete mAlarmDialog; |
164 | delete mTimerStartLabel; | ||
157 | } | 165 | } |
166 | |||
158 | void SimpleAlarmDaemonImpl::saveSlot( int load ) | 167 | void SimpleAlarmDaemonImpl::saveSlot( int load ) |
159 | { | 168 | { |
@@ -403,6 +412,6 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp() | |||
403 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; | 412 | configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n"; |
404 | configString += "24 hours; 1440\n"; | 413 | configString += "24 hours; 1440\n"; |
414 | configString += "9 hours; 540\n"; | ||
405 | configString += "8 hours; 480\n"; | 415 | configString += "8 hours; 480\n"; |
406 | configString += "5 hours; 300\n"; | ||
407 | configString += "1 hour; 60\n"; | 416 | configString += "1 hour; 60\n"; |
408 | configString += "30 min; 30\n"; | 417 | configString += "30 min; 30\n"; |
@@ -514,4 +523,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
514 | } | 523 | } |
515 | QString mess = "timer_alarm"; | 524 | QString mess = "timer_alarm"; |
525 | QString disp; | ||
516 | mess += ("Timer Alarm!\n"); | 526 | mess += ("Timer Alarm!\n"); |
517 | if ( minutes == 3 ) { | 527 | if ( minutes == 3 ) { |
@@ -521,4 +531,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
521 | int in = mRunningTimerText.find( " " ); | 531 | int in = mRunningTimerText.find( " " ); |
522 | mRunningTimerText = mRunningTimerText.left ( in ); | 532 | mRunningTimerText = mRunningTimerText.left ( in ); |
533 | disp = mCustomText; | ||
523 | } | 534 | } |
524 | else { | 535 | else { |
@@ -591,4 +602,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
591 | mCustomMinutes = 1440; | 602 | mCustomMinutes = 1440; |
592 | mess += mCustomText; | 603 | mess += mCustomText; |
604 | disp = mCustomText; | ||
593 | minutes = mCustomMinutes; | 605 | minutes = mCustomMinutes; |
594 | mRunningTimerText = mCustomText.stripWhiteSpace (); | 606 | mRunningTimerText = mCustomText.stripWhiteSpace (); |
@@ -598,4 +610,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
598 | else { | 610 | else { |
599 | mess += mTimerPopUp->text( minutes ); | 611 | mess += mTimerPopUp->text( minutes ); |
612 | disp = mTimerPopUp->text( minutes ); | ||
600 | mRunningTimerText = mTimerPopUp->text( minutes ); | 613 | mRunningTimerText = mTimerPopUp->text( minutes ); |
601 | minutes -= 10; | 614 | minutes -= 10; |
@@ -607,4 +620,12 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
607 | timerMesssage = mess; | 620 | timerMesssage = mess; |
608 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); | 621 | AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); |
622 | mTimerStartLabel->setText( disp ); | ||
623 | int w = 200; | ||
624 | int h = mTimerStartLabel->sizeHint().height() ; | ||
625 | int dw = QApplication::desktop()->width(); | ||
626 | int dh = QApplication::desktop()->height(); | ||
627 | mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | ||
628 | mTimerStartLabel->show(); | ||
629 | QTimer::singleShot( 3000, mTimerStartLabel, SLOT ( hide() ) ); | ||
609 | mTimerTime = 1; | 630 | mTimerTime = 1; |
610 | } | 631 | } |
diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index cbdba47..9b7de94 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h | |||
@@ -69,4 +69,5 @@ class SimpleAlarmDaemonImpl : public QLabel | |||
69 | private: | 69 | private: |
70 | AlarmDialog *mAlarmDialog; | 70 | AlarmDialog *mAlarmDialog; |
71 | QLabel * mTimerStartLabel; | ||
71 | int mPlayBeeps; | 72 | int mPlayBeeps; |
72 | int mPausePlay; | 73 | int mPausePlay; |