summaryrefslogtreecommitdiffabout
path: root/kalarmd
Unidiff
Diffstat (limited to 'kalarmd') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/alarmdialog.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/kalarmd/alarmdialog.cpp b/kalarmd/alarmdialog.cpp
index 17d4afa..ddb125a 100644
--- a/kalarmd/alarmdialog.cpp
+++ b/kalarmd/alarmdialog.cpp
@@ -69,64 +69,69 @@ AlarmDialog::AlarmDialog(QWidget *parent,const char *name)
69 mMessage = new QLabel ( " ", this ); 69 mMessage = new QLabel ( " ", this );
70 int fs = 18; 70 int fs = 18;
71 int fs2 = 12; 71 int fs2 = 12;
72 int baseSize = 6; 72 int baseSize = 6;
73 if ( QApplication::desktop()->width() < 480 ) { 73 if ( QApplication::desktop()->width() < 480 ) {
74 fs2 = 10; 74 fs2 = 10;
75 fs = 12; 75 fs = 12;
76 baseSize = 4; 76 baseSize = 4;
77 } 77 }
78 layout->setSpacing( 3 ); 78 layout->setSpacing( 3 );
79 layout->setMargin( 3 ); 79 layout->setMargin( 3 );
80 QFont fo = QApplication::font(); 80 QFont fo = QApplication::font();
81 fo.setBold( true ); 81 fo.setBold( true );
82 fo.setPointSize( fs2 ); 82 fo.setPointSize( fs2 );
83 l->setFont( fo ); 83 l->setFont( fo );
84 fo.setPointSize( fs ); 84 fo.setPointSize( fs );
85 mMessage->setFont(fo ); 85 mMessage->setFont(fo );
86 mMessage->setAlignment( AlignCenter); 86 mMessage->setAlignment( AlignCenter);
87 layout->addWidget ( mMessage ); 87 layout->addWidget ( mMessage );
88 mMissedAlarms= new QLabel ( "(No missed Alarms)", this ); 88 mMissedAlarms= new QLabel ( "(No missed Alarms)", this );
89 mMissedAlarms->setAlignment( AlignCenter); 89 mMissedAlarms->setAlignment( AlignCenter);
90 90
91 playSoundTimer = new QTimer( this ); 91 playSoundTimer = new QTimer( this );
92 connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) ); 92 connect ( playSoundTimer, SIGNAL( timeout() ), this, SLOT (playSound() ) );
93 93
94 playSoundTimer->stop(); 94 playSoundTimer->stop();
95 95
96 layout->addWidget ( mMissedAlarms ); 96 layout->addWidget ( mMissedAlarms );
97 mMissedAlarmsCombo = new QComboBox ( this ); 97 mMissedAlarmsCombo = new QComboBox ( this );
98 layout->addWidget ( mMissedAlarmsCombo ); 98 layout->addWidget ( mMissedAlarmsCombo );
99 99
100 QLabel* labb = new QLabel("Suspend\nduration\n(minutes):",this); 100 QLabel* labb = new QLabel("Suspend\nduration\n(minutes):",this);
101#ifdef DESKTOP_VERSION
102 fo = font();
103 fo.setPointSize( 12 );
104 labb->setFont ( fo );
105#endif
101 labb->setAlignment(AlignCenter); 106 labb->setAlignment(AlignCenter);
102 //layout->addWidget ( labb ); 107 //layout->addWidget ( labb );
103 fo = font(); 108 fo = font();
104 int pointSize = 36; 109 int pointSize = 36;
105 if ( QApplication::desktop()->width() <= 320 ) 110 if ( QApplication::desktop()->width() <= 320 )
106 pointSize = 18; 111 pointSize = 18;
107 fo.setPointSize( pointSize ); 112 fo.setPointSize( pointSize );
108 mSuspendSpin = new QSpinBox(1,1440,1,this); 113 mSuspendSpin = new QSpinBox(1,1440,1,this);
109 mSuspendSpin->setFont( fo ); 114 mSuspendSpin->setFont( fo );
110 mSuspendSpin->setValue(7); // default suspend duration 115 mSuspendSpin->setValue(7); // default suspend duration
111 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); 116 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus );
112 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); 117 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus );
113 118
114#if QT_VERSION < 0x030000 119#if QT_VERSION < 0x030000
115 mSuspendSpin->upButton ()->setFixedSize( QSize( 8*baseSize, 5*baseSize )); 120 mSuspendSpin->upButton ()->setFixedSize( QSize( 8*baseSize, 5*baseSize ));
116 mSuspendSpin->downButton ()->setFixedSize( QSize( 8*baseSize, 5*baseSize )); 121 mSuspendSpin->downButton ()->setFixedSize( QSize( 8*baseSize, 5*baseSize ));
117#endif 122#endif
118 mSuspendSpin->setFixedSize( 18*baseSize, 10*baseSize+2 ); 123 mSuspendSpin->setFixedSize( 18*baseSize, 10*baseSize+2 );
119 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus ); 124 mSuspendSpin->setButtonSymbols( QSpinBox::PlusMinus );
120 QHBoxLayout* layoutSpin = new QHBoxLayout( layout ); 125 QHBoxLayout* layoutSpin = new QHBoxLayout( layout );
121 layoutSpin->addStretch (); 126 layoutSpin->addStretch ();
122 layoutSpin->addWidget ( labb ); 127 layoutSpin->addWidget ( labb );
123 layoutSpin->addWidget ( mSuspendSpin ); 128 layoutSpin->addWidget ( mSuspendSpin );
124 layoutSpin->addStretch (); 129 layoutSpin->addStretch ();
125 130
126 QVBox * bbox = new QVBox ( this ); 131 QVBox * bbox = new QVBox ( this );
127 layout->addWidget ( bbox ); 132 layout->addWidget ( bbox );
128 bbox->layout()->setSpacing( 2 ); 133 bbox->layout()->setSpacing( 2 );
129 labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox); 134 labb = new QLabel("Press \"Cancel\" or \"Esc\" to suspend!",bbox);
130 labb->setAlignment(AlignCenter); 135 labb->setAlignment(AlignCenter);
131 mSuspendButton = new QPushButton( "Suspend", bbox); 136 mSuspendButton = new QPushButton( "Suspend", bbox);
132 QPushButton* silen = new QPushButton( " Stop sound ", bbox); 137 QPushButton* silen = new QPushButton( " Stop sound ", bbox);