From dad8e8745591620c951cefd835ea7ea727db8925 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sun, 09 Oct 2005 23:48:12 +0000 Subject: timer message --- diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index c1e064c..553e377 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp @@ -148,8 +148,9 @@ SimpleAlarmDaemonImpl::SimpleAlarmDaemonImpl( QWidget *parent ) mSoundPopUp->setItemChecked ( 1, true ); } saveSlot( 1 ); - mTimerStartLabel = new QLabel( 0 ); - mTimerStartLabel->setCaption( "Timer started!"); + mTimerStartLabel = new QLabel( 0, 0, WType_Popup ); + //mTimerStartLabel->setCaption( "Timer started!"); + mTimerStartLabel->setAlignment ( Qt::AlignCenter ) ; fon = mTimerPopUp->font(); fon.setBold( true ); points = (fon.pointSize()*2); @@ -619,14 +620,14 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) mRunningTimer = QDateTime::currentDateTime().addSecs( minutes * 60 ); timerMesssage = mess; AlarmServer::addAlarm ( mRunningTimer,"koalarm",timerMesssage.utf8()); - mTimerStartLabel->setText( disp ); - int w = 200; - int h = mTimerStartLabel->sizeHint().height() ; + mTimerStartLabel->setText( disp + "\n\nTimer started!" ); + int w = mTimerStartLabel->sizeHint().width()+20; + int h = mTimerStartLabel->sizeHint().height()+40 ; int dw = QApplication::desktop()->width(); int dh = QApplication::desktop()->height(); mTimerStartLabel->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); mTimerStartLabel->show(); - QTimer::singleShot( 2000, mTimerStartLabel, SLOT ( hide() ) ); + QTimer::singleShot( 3000, mTimerStartLabel, SLOT ( hide() ) ); mTimerTime = 1; } -- cgit v0.9.0.2