author | zautrix <zautrix> | 2005-04-08 23:40:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-08 23:40:38 (UTC) |
commit | a74c23d91e80343cd1ccfd1fe712958fad1d5891 (patch) (unidiff) | |
tree | 2dc90dffe822e1425ace17cdbf9e420fa0be6ac7 | |
parent | c4bab697d650c249cdff45b753b9e6df2a817877 (diff) | |
download | kdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.zip kdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.tar.gz kdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.tar.bz2 |
ad fix
-rw-r--r-- | kalarmd/alarmdialog.cpp | 36 | ||||
-rw-r--r-- | kalarmd/alarmdialog.h | 2 | ||||
-rw-r--r-- | kalarmd/simplealarmdaemonimpl.cpp | 9 |
3 files changed, 29 insertions, 18 deletions
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index 65073f6..d72a8c2 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp | |||
@@ -99,5 +99,5 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) | |||
99 | 99 | ||
100 | QLabel* labb = new QLabel("Suspend duration (minutes):",this); | 100 | QLabel* labb = new QLabel("Suspend\nduration\n(minutes):",this); |
101 | labb->setAlignment(AlignCenter); | 101 | labb->setAlignment(AlignCenter); |
102 | layout->addWidget ( labb ); | 102 | //layout->addWidget ( labb ); |
103 | fo = font(); | 103 | fo = font(); |
@@ -121,2 +121,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) | |||
121 | layoutSpin->addStretch (); | 121 | layoutSpin->addStretch (); |
122 | layoutSpin->addWidget ( labb ); | ||
122 | layoutSpin->addWidget ( mSuspendSpin ); | 123 | layoutSpin->addWidget ( mSuspendSpin ); |
@@ -131,3 +132,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name) | |||
131 | QPushButton* silen = new QPushButton( " Stop sound ", bbox); | 132 | QPushButton* silen = new QPushButton( " Stop sound ", bbox); |
132 | QPushButton* okbut = new QPushButton( "Ok", bbox); | 133 | okbut = new QPushButton( "Ok", bbox); |
133 | mSuspendButton->setFont( fo ); | 134 | mSuspendButton->setFont( fo ); |
@@ -243,4 +244,4 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo | |||
243 | mMessage->setText(mess); | 244 | mMessage->setText(mess); |
244 | int w =sizeHint().width() ; | 245 | int w = minimumSizeHint().width() ; |
245 | int h = sizeHint().height() ; | 246 | int h = minimumSizeHint().height() ; |
246 | int dw = QApplication::desktop()->width(); | 247 | int dw = QApplication::desktop()->width(); |
@@ -248,7 +249,3 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo | |||
248 | setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 249 | setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
249 | show(); | 250 | hide(); |
250 | raise(); | ||
251 | //qApp->processEvents(); | ||
252 | //repaint(); | ||
253 | qApp->processEvents(); | ||
254 | 251 | ||
@@ -260,3 +257,5 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo | |||
260 | #endif | 257 | #endif |
261 | playSoundTimer->start( 1000, true ); | 258 | okbut->setDefault( true ); |
259 | QTimer::singleShot( 1, this, SLOT ( forceRepaint() ) ); | ||
260 | // playSoundTimer->start( 1000, true ); | ||
262 | return true; | 261 | return true; |
@@ -265,4 +264,14 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo | |||
265 | 264 | ||
266 | void AlarmDialog::spinBoxChanged( int ) | 265 | void AlarmDialog::forceRepaint() |
267 | { | 266 | { |
267 | |||
268 | showNormal(); | ||
269 | setActiveWindow(); | ||
270 | raise(); | ||
271 | playSoundTimer->start( 1000, true ); | ||
272 | |||
273 | } | ||
274 | void AlarmDialog::spinBoxChanged( int v ) | ||
275 | { | ||
276 | okbut->setDefault( false ); | ||
268 | mSilent = true; | 277 | mSilent = true; |
@@ -281,5 +290,2 @@ void AlarmDialog::playSound () | |||
281 | mSuspendSpin->setFocus(); | 290 | mSuspendSpin->setFocus(); |
282 | |||
283 | |||
284 | qApp->processEvents(); | ||
285 | if ( alarmCounter < maxAlarmReplay && ! mSilent) { | 291 | if ( alarmCounter < maxAlarmReplay && ! mSilent) { |
diff --git a/kalarmd/alarmdialog.h b/kalarmd/alarmdialog.h index 1e4636c..52e681a 100644 --- a/kalarmd/alarmdialog.h +++ b/kalarmd/alarmdialog.h | |||
@@ -52,2 +52,3 @@ class AlarmDialog : public QDialog { | |||
52 | public slots: | 52 | public slots: |
53 | void forceRepaint(); | ||
53 | void spinBoxChanged( int ); | 54 | void spinBoxChanged( int ); |
@@ -65,2 +66,3 @@ class AlarmDialog : public QDialog { | |||
65 | private: | 66 | private: |
67 | QPushButton* okbut; | ||
66 | int alarmCounter; | 68 | int alarmCounter; |
diff --git a/kalarmd/simplealarmdaemonimpl.cpp b/kalarmd/simplealarmdaemonimpl.cpp index 294ce7d..2a463b3 100644 --- a/kalarmd/simplealarmdaemonimpl.cpp +++ b/kalarmd/simplealarmdaemonimpl.cpp | |||
@@ -307,3 +307,5 @@ void SimpleAlarmDaemonImpl::recieve( const QCString& msg, const QByteArray& ) | |||
307 | } else { | 307 | } else { |
308 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | 308 | { |
309 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); | ||
310 | } | ||
309 | //qDebug("-----system command %s ",tempfilename.latin1() ); | 311 | //qDebug("-----system command %s ",tempfilename.latin1() ); |
@@ -620,4 +622,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time ) | |||
620 | void SimpleAlarmDaemonImpl::writeFile() | 622 | void SimpleAlarmDaemonImpl::writeFile() |
621 | { | 623 | { |
622 | QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | 624 | QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent"); |
625 | //QCopEnvelope e("QPE/Application/kopi", "-writeFile"); | ||
623 | } | 626 | } |