-rw-r--r-- | kalarmd/alarmdialog.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp index 521781e..751ba57 100644 --- a/kalarmd/alarmdialog.cpp +++ b/kalarmd/alarmdialog.cpp @@ -49,51 +49,54 @@ #include "alarmdialog.h" AlarmDialog::AlarmDialog(QWidget *parent,const char *name) : QDialog (parent, name, true, Qt::WStyle_StaysOnTop ) { setCaption( "KO/Pi Alarm!" ); QVBoxLayout* layout = new QVBoxLayout( this); QLabel* l = new QLabel("The following event triggered alarm:",this); layout->addWidget ( l ); l->setAlignment( AlignCenter); mMessage = new QLabel ( " ", this ); int fs = 18; int fs2 = 12; if ( QApplication::desktop()->width() < 480 ) { setMaximumSize(220, 260); fs2 = 10; } else { setMaximumSize(440, 440); } layout->setSpacing( 3 ); layout->setMargin( 3 ); - - l->setFont( QFont("helvetica",fs2, QFont::Bold) ); - mMessage->setFont( QFont("helvetica",fs, QFont::Bold) ); + QFont fo = QApplication::font(); + fo.setBold( true ); + fo.setPointSize( fs2 ); + l->setFont( fo ); + fo.setPointSize( fs ); + mMessage->setFont(fo ); mMessage->setAlignment( AlignCenter); l = new QLabel("Missed Alarms:",this); l->setAlignment( AlignCenter); layout->addWidget ( mMessage ); layout->addWidget ( l ); mMissedAlarms= new QLabel ( "", this ); mMissedAlarms->setAlignment( AlignCenter); playSoundTimer = new QTimer( this ); connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) ); playSoundTimer->stop(); layout->addWidget ( mMissedAlarms ); QHBox *suspendBox = new QHBox( this ); suspendBox->setSpacing(3); layout->addWidget ( suspendBox ); (void)new QLabel("Suspend duration (minutes):",suspendBox); mSuspendSpin = new QSpinBox(1,1440,1,suspendBox); mSuspendSpin->setValue(7); // default suspend duration QHBox * bbox = new QHBox ( this ); layout->addWidget ( bbox ); bbox->layout()->setSpacing( 5 ); QPushButton* suspend = new QPushButton( "Suspend", bbox); |