summaryrefslogtreecommitdiffabout
path: root/kalarmd
Side-by-side diff
Diffstat (limited to 'kalarmd') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp23
-rw-r--r--kalarmd/simplealarmdaemonimpl.h1
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 )
}
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 );
}
@@ -155,5 +162,7 @@ SimpleAlarmDaemonImpl::~SimpleAlarmDaemonImpl()
//delete mPopUp;
delete mAlarmDialog;
+ delete mTimerStartLabel;
}
+
void SimpleAlarmDaemonImpl::saveSlot( int load )
{
@@ -403,6 +412,6 @@ void SimpleAlarmDaemonImpl::fillTimerPopUp()
configString += "#format: <Text for popup menu>;<timer countdown in minutes>\n";
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";
configString += "30 min; 30\n";
@@ -514,4 +523,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
}
QString mess = "timer_alarm";
+ QString disp;
mess += ("Timer Alarm!\n");
if ( minutes == 3 ) {
@@ -521,4 +531,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
int in = mRunningTimerText.find( " " );
mRunningTimerText = mRunningTimerText.left ( in );
+ disp = mCustomText;
}
else {
@@ -591,4 +602,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
mCustomMinutes = 1440;
mess += mCustomText;
+ disp = mCustomText;
minutes = mCustomMinutes;
mRunningTimerText = mCustomText.stripWhiteSpace ();
@@ -598,4 +610,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
else {
mess += mTimerPopUp->text( minutes );
+ disp = mTimerPopUp->text( minutes );
mRunningTimerText = mTimerPopUp->text( minutes );
minutes -= 10;
@@ -607,4 +620,12 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
timerMesssage = mess;
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
@@ -69,4 +69,5 @@ class SimpleAlarmDaemonImpl : public QLabel
private:
AlarmDialog *mAlarmDialog;
+ QLabel * mTimerStartLabel;
int mPlayBeeps;
int mPausePlay;