summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-10-31 10:52:32 (UTC)
committer zautrix <zautrix>2005-10-31 10:52:32 (UTC)
commitf8bb077d4016222ebd7a1cf3080010d5e5c65649 (patch) (unidiff)
treec4b144edc001ed21adf8e15c87037ba6a3cfd480
parent760f042066478106b87a63d6aba1ac1473a58dae (diff)
downloadkdepimpi-f8bb077d4016222ebd7a1cf3080010d5e5c65649.zip
kdepimpi-f8bb077d4016222ebd7a1cf3080010d5e5c65649.tar.gz
kdepimpi-f8bb077d4016222ebd7a1cf3080010d5e5c65649.tar.bz2
commit
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp
index 141a9ce..15eff28 100644
--- a/kalarmd/simplealarmdaemonimpl.cpp
+++ b/kalarmd/simplealarmdaemonimpl.cpp
@@ -638,8 +638,21 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
638 638
639 mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); 639 mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 );
640 timerMesssage = mess; 640 timerMesssage = mess;
641 QString timerDuration ;
642 if ( minutes < 60 ) {
643 timerDuration = QString::number( minutes ) + " min";
644 } else {
645 if ( minutes % 60 ) {
646 timerDuration = QString::number( minutes/60 ) +":";
647 minutes = minutes%60;
648 if ( minutes < 10 ) timerDuration += "0";
649 timerDuration += QString::number( minutes ) + " h";
650 }
651 else
652 timerDuration = QString::number( minutes / 60 )+ " hours";
653 }
641 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); 654 AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8());
642 mTimerStartLabel->setText( disp + "\n\nTimer started!" ); 655 mTimerStartLabel->setText( disp + "\n\n" + timerDuration +"\n\nTimer started!" );
643 int w = mTimerStartLabel->sizeHint().width()+20; 656 int w = mTimerStartLabel->sizeHint().width()+20;
644 int h = mTimerStartLabel->sizeHint().height()+40 ; 657 int h = mTimerStartLabel->sizeHint().height()+40 ;
645 int dw = QApplication::desktop()->width(); 658 int dw = QApplication::desktop()->width();