From f8bb077d4016222ebd7a1cf3080010d5e5c65649 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 31 Oct 2005 10:52:32 +0000 Subject: commit --- 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 ) mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); timerMesssage = mess; + QString timerDuration ; + if ( minutes < 60 ) { + timerDuration = QString::number( minutes ) + " min"; + } else { + if ( minutes % 60 ) { + timerDuration = QString::number( minutes/60 ) +":"; + minutes = minutes%60; + if ( minutes < 10 ) timerDuration += "0"; + timerDuration += QString::number( minutes ) + " h"; + } + else + timerDuration = QString::number( minutes / 60 )+ " hours"; + } AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); - mTimerStartLabel->setText( disp + "\n\nTimer started!" ); + mTimerStartLabel->setText( disp + "\n\n" + timerDuration +"\n\nTimer started!" ); int w = mTimerStartLabel->sizeHint().width()+20; int h = mTimerStartLabel->sizeHint().height()+40 ; int dw = QApplication::desktop()->width(); -- cgit v0.9.0.2