summaryrefslogtreecommitdiffabout
path: root/kalarmd/alarmdialog.cpp
Unidiff
Diffstat (limited to 'kalarmd/alarmdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/alarmdialog.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp
index 18ce9da..467fef7 100644
--- a/kalarmd/alarmdialog.cpp
+++ b/kalarmd/alarmdialog.cpp
@@ -23,9 +23,10 @@
23 23
24// $Id$ 24// $Id$
25 25
26#include <qhbox.h> 26#include <q3hbox.h>
27#include <qvbox.h> 27#include <q3vbox.h>
28#include <qapp.h> 28#include <qapplication.h>
29#include <QDesktopWidget>
29#include <qlabel.h> 30#include <qlabel.h>
30#include <qlayout.h> 31#include <qlayout.h>
31#include <qfile.h> 32#include <qfile.h>
@@ -39,6 +40,9 @@
39#undef protected 40#undef protected
40#else 41#else
41#include <qspinbox.h> 42#include <qspinbox.h>
43//Added by qt3to4:
44#include <Q3HBoxLayout>
45#include <Q3VBoxLayout>
42#endif 46#endif
43#include <stdlib.h> 47#include <stdlib.h>
44#ifndef _WIN32_ 48#ifndef _WIN32_
@@ -62,10 +66,10 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
62 : QDialog (parent, name ,false, Qt::WStyle_StaysOnTop ) 66 : QDialog (parent, name ,false, Qt::WStyle_StaysOnTop )
63{ 67{
64 setCaption( "KO/Pi Alarm!" ); 68 setCaption( "KO/Pi Alarm!" );
65 QVBoxLayout* layout = new QVBoxLayout( this); 69 Q3VBoxLayout* layout = new Q3VBoxLayout( this);
66 QLabel* l = new QLabel("The following event triggered alarm:",this); 70 QLabel* l = new QLabel("The following event triggered alarm:",this);
67 layout->addWidget ( l ); 71 layout->addWidget ( l );
68 l->setAlignment( AlignCenter); 72 l->setAlignment( Qt::AlignCenter);
69 mMessage = new QLabel ( " ", this ); 73 mMessage = new QLabel ( " ", this );
70 int fs = 18; 74 int fs = 18;
71 int fs2 = 12; 75 int fs2 = 12;
@@ -83,10 +87,10 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
83 l->setFont( fo ); 87 l->setFont( fo );
84 fo.setPointSize( fs ); 88 fo.setPointSize( fs );
85 mMessage->setFont(fo ); 89 mMessage->setFont(fo );
86 mMessage->setAlignment( AlignCenter); 90 mMessage->setAlignment( Qt::AlignCenter);
87 layout->addWidget ( mMessage ); 91 layout->addWidget ( mMessage );
88 mMissedAlarms= new QLabel ( "(No missed Alarms)", this ); 92 mMissedAlarms= new QLabel ( "(No missed Alarms)", this );
89 mMissedAlarms->setAlignment( AlignCenter); 93 mMissedAlarms->setAlignment( Qt::AlignCenter);
90 94
91 playSoundTimer = new QTimer( this ); 95 playSoundTimer = new QTimer( this );
92 connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) ); 96 connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) );
@@ -103,7 +107,7 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
103 fo.setPointSize( 12 ); 107 fo.setPointSize( 12 );
104 labb->setFont ( fo ); 108 labb->setFont ( fo );
105#endif 109#endif
106 labb->setAlignment(AlignCenter); 110 labb->setAlignment(Qt::AlignCenter);
107 //layout->addWidget ( labb ); 111 //layout->addWidget ( labb );
108 fo = font(); 112 fo = font();
109 int pointSize = 36; 113 int pointSize = 36;
@@ -122,17 +126,17 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
122#endif 126#endif
123 mSuspendSpin->setFixedSize( 18*baseSize, 10*baseSize+2 ); 127 mSuspendSpin->setFixedSize( 18*baseSize, 10*baseSize+2 );
124 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); 128 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus );
125 QHBoxLayout* layoutSpin = new QHBoxLayout( layout ); 129 Q3HBoxLayout* layoutSpin = new Q3HBoxLayout( layout );
126 layoutSpin->addStretch (); 130 layoutSpin->addStretch ();
127 layoutSpin->addWidget ( labb ); 131 layoutSpin->addWidget ( labb );
128 layoutSpin->addWidget ( mSuspendSpin ); 132 layoutSpin->addWidget ( mSuspendSpin );
129 layoutSpin->addStretch (); 133 layoutSpin->addStretch ();
130 134
131 QVBox * bbox = new QVBox ( this ); 135 Q3VBox * bbox = new Q3VBox ( this );
132 layout->addWidget ( bbox ); 136 layout->addWidget ( bbox );
133 bbox->layout()->setSpacing( 2 ); 137 bbox->layout()->setSpacing( 2 );
134 labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox); 138 labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox);
135 labb->setAlignment(AlignCenter); 139 labb->setAlignment(Qt::AlignCenter);
136 mSuspendButton = new QPushButton( "Suspend", bbox); 140 mSuspendButton = new QPushButton( "Suspend", bbox);
137 QPushButton* silen = new QPushButton( " Stop sound ", bbox); 141 QPushButton* silen = new QPushButton( " Stop sound ", bbox);
138 okbut = new QPushButton( "Ok", bbox); 142 okbut = new QPushButton( "Ok", bbox);