summaryrefslogtreecommitdiffabout
path: root/kalarmd
authorzautrix <zautrix>2005-04-08 23:40:38 (UTC)
committer zautrix <zautrix>2005-04-08 23:40:38 (UTC)
commita74c23d91e80343cd1ccfd1fe712958fad1d5891 (patch) (side-by-side diff)
tree2dc90dffe822e1425ace17cdbf9e420fa0be6ac7 /kalarmd
parentc4bab697d650c249cdff45b753b9e6df2a817877 (diff)
downloadkdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.zip
kdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.tar.gz
kdepimpi-a74c23d91e80343cd1ccfd1fe712958fad1d5891.tar.bz2
ad fix
Diffstat (limited to 'kalarmd') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/alarmdialog.cpp36
-rw-r--r--kalarmd/alarmdialog.h2
-rw-r--r--kalarmd/simplealarmdaemonimpl.cpp9
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)
- QLabel* labb = new QLabel("Suspend duration (minutes):",this);
+ QLabel* labb = new QLabel("Suspend\nduration\n(minutes):",this);
labb->setAlignment(AlignCenter);
- layout->addWidget ( labb );
+ //layout->addWidget ( labb );
fo = font();
@@ -121,2 +121,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
layoutSpin->addStretch ();
+ layoutSpin->addWidget ( labb );
layoutSpin->addWidget ( mSuspendSpin );
@@ -131,3 +132,3 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
QPushButton* silen = new QPushButton( " Stop sound ", bbox);
- QPushButton* okbut = new QPushButton( "Ok", bbox);
+ okbut = new QPushButton( "Ok", bbox);
mSuspendButton->setFont( fo );
@@ -243,4 +244,4 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo
mMessage->setText(mess);
- int w =sizeHint().width() ;
- int h = sizeHint().height() ;
+ int w = minimumSizeHint().width() ;
+ int h = minimumSizeHint().height() ;
int dw = QApplication::desktop()->width();
@@ -248,7 +249,3 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo
setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
- show();
- raise();
- //qApp->processEvents();
- //repaint();
- qApp->processEvents();
+ hide();
@@ -260,3 +257,5 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo
#endif
- playSoundTimer->start( 1000, true );
+ okbut->setDefault( true );
+ QTimer::singleShot( 1, this, SLOT ( forceRepaint() ) );
+ // playSoundTimer->start( 1000, true );
return true;
@@ -265,4 +264,14 @@ bool AlarmDialog::eventNotification( QString mess, int replay , QString fn, boo
-void AlarmDialog::spinBoxChanged( int )
+void AlarmDialog::forceRepaint()
{
+
+ showNormal();
+ setActiveWindow();
+ raise();
+ playSoundTimer->start( 1000, true );
+
+}
+void AlarmDialog::spinBoxChanged( int v )
+{
+ okbut->setDefault( false );
mSilent = true;
@@ -281,5 +290,2 @@ void AlarmDialog::playSound ()
mSuspendSpin->setFocus();
-
-
- qApp->processEvents();
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 {
public slots:
+ void forceRepaint();
void spinBoxChanged( int );
@@ -65,2 +66,3 @@ class AlarmDialog : public QDialog {
private:
+ QPushButton* okbut;
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& )
} else {
- QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
+ {
+ QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
+ }
//qDebug("-----system command %s ",tempfilename.latin1() );
@@ -620,4 +622,5 @@ void SimpleAlarmDaemonImpl::confTimer( int time )
void SimpleAlarmDaemonImpl::writeFile()
-{
- QCopEnvelope e("QPE/Application/kopi", "-writeFile");
+{
+ QCopEnvelope e("QPE/Application/kopi", "-writeFileSilent");
+ //QCopEnvelope e("QPE/Application/kopi", "-writeFile");
}