-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 @@ -150,2 +150,9 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) saveSlot( 1 ); + mTimerStartLabel = new QLabel( 0 ); + mTimerStartLabel->setCaption( "Timer started!"); + fon = mTimerPopUp->font(); + fon.setBold( true ); + points = (fon.pointSize()*2); + fon.setPointSize( points ); + mTimerStartLabel->setFont( fon ); } @@ -156,3 +163,5 @@ SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl() delete mAlarmDialog; + delete mTimerStartLabel; } + void SimpleAlarmDaemonImpl::saveSlot( int load ) @@ -404,4 +413,4 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp() configString += "24 hours; 1440\n"; + configString += "9 hours; 540\n"; configString += "8 hours; 480\n"; - configString += "5 hours; 300\n"; configString += "1 hour; 60\n"; @@ -515,2 +524,3 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) QString mess = "timer_alarm"; + QString disp; mess += ("Timer Alarm!\n"); @@ -522,2 +532,3 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) mRunningTimerText = mRunningTimerText.left ( in ); + disp = mCustomText; } @@ -592,2 +603,3 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) mess += mCustomText; + disp = mCustomText; minutes = mCustomMinutes; @@ -599,2 +611,3 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) mess += mTimerPopUp->text( minutes ); + disp = mTimerPopUp->text( minutes ); mRunningTimerText = mTimerPopUp->text( minutes ); @@ -608,2 +621,10 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); + mTimerStartLabel->setText( disp ); + int w = 200; + int h = mTimerStartLabel->sizeHint().height() ; + int dw = QApplication::desktop()->width(); + int dh = QApplication::desktop()->height(); + mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); + mTimerStartLabel->show(); + QTimer::singleShot( 3000, mTimerStartLabel, SLOT ( hide() ) ); mTimerTime = 1; diff --git a/kalarmd/simplealarmdaemonimpl.h b/kalarmd/simplealarmdaemonimpl.h index cbdba47..9b7de94 100644 --- a/kalarmd/simplealarmdaemonimpl.h +++ b/kalarmd/simplealarmdaemonimpl.h @@ -70,2 +70,3 @@ class SimpleAlarmDaemonImpl : public QLabel AlarmDialog *mAlarmDialog; + QLabel * mTimerStartLabel; int mPlayBeeps; |