summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/setAlarm.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/tools/clock/setAlarm.cpp b/noncore/tools/clock/setAlarm.cpp
index bd964e0..990ff81 100644
--- a/noncore/tools/clock/setAlarm.cpp
+++ b/noncore/tools/clock/setAlarm.cpp
@@ -27,24 +27,25 @@
27#include <qvariant.h> 27#include <qvariant.h>
28#include <qtooltip.h> 28#include <qtooltip.h>
29#include <qwhatsthis.h> 29#include <qwhatsthis.h>
30#include <qbuttongroup.h> 30#include <qbuttongroup.h>
31 31
32Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl ) 32Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl )
33 : QDialog( parent, name, modal, fl ) 33 : QDialog( parent, name, modal, fl )
34{ 34{
35 if ( !name ) 35 if ( !name )
36 setName( "Set_Alarm" ); 36 setName( "Set_Alarm" );
37 resize( 240, 101 ); 37 resize( 240, 101 );
38 setMaximumSize( QSize( 240, 320 ) ); 38 setMaximumSize( QSize( 240, 320 ) );
39 move(0,48);
39 setCaption( tr( "Set Alarm" ) ); 40 setCaption( tr( "Set Alarm" ) );
40 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 41 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
41 42
42 Set_AlarmLayout = new QGridLayout( this ); 43 Set_AlarmLayout = new QGridLayout( this );
43 Set_AlarmLayout->setSpacing( 6 ); 44 Set_AlarmLayout->setSpacing( 6 );
44 Set_AlarmLayout->setMargin( 11 ); 45 Set_AlarmLayout->setMargin( 11 );
45 46
46 TextLabel1 = new QLabel( this, "TextLabel1" ); 47 TextLabel1 = new QLabel( this, "TextLabel1" );
47 TextLabel1->setText( tr( "Hour" ) ); 48 TextLabel1->setText( tr( "Hour" ) );
48 49
49 Set_AlarmLayout->addWidget( TextLabel1, 0, 0 ); 50 Set_AlarmLayout->addWidget( TextLabel1, 0, 0 );
50 51
@@ -124,26 +125,26 @@ Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl
124 int i_alarmHour = alarmHour.toInt(&ok,10); 125 int i_alarmHour = alarmHour.toInt(&ok,10);
125 QString alarmMinute=config.readEntry("clockAlarmMinute","0"); 126 QString alarmMinute=config.readEntry("clockAlarmMinute","0");
126 QString snoozeTime=config.readEntry("clockAlarmSnooze","0"); 127 QString snoozeTime=config.readEntry("clockAlarmSnooze","0");
127 if(ampm) { 128 if(ampm) {
128 Hour_Slider->setMaxValue( 12); 129 Hour_Slider->setMaxValue( 12);
129 Hour_Slider->setMinValue( 1); 130 Hour_Slider->setMinValue( 1);
130 131
131 if( i_alarmHour > 12) { 132 if( i_alarmHour > 12) {
132 i_alarmHour = i_alarmHour - 12; 133 i_alarmHour = i_alarmHour - 12;
133 Pm_RadioButton->setChecked(TRUE); 134 Pm_RadioButton->setChecked(TRUE);
134 } 135 }
135 else if ( i_alarmHour == 0 ) { 136 else if ( i_alarmHour == 0 ) {
136 i_alarmHour = 12; 137 i_alarmHour = 12;
137 } 138 }
138 Hour_Slider->setValue( i_alarmHour ); 139 Hour_Slider->setValue( i_alarmHour );
139 Minute_Slider->setValue( alarmMinute.toInt(&ok,10) ); 140 Minute_Slider->setValue( alarmMinute.toInt(&ok,10) );
140 SnoozeSlider->setValue( snoozeTime.toInt(&ok,10) ); 141 SnoozeSlider->setValue( snoozeTime.toInt(&ok,10) );
141 } else { 142 } else {
142 Hour_Slider->setMaxValue( 23); 143 Hour_Slider->setMaxValue( 23);
143 Hour_Slider->setMinValue( 0); 144 Hour_Slider->setMinValue( 0);
144 Hour_Slider->setValue( i_alarmHour); 145 Hour_Slider->setValue( i_alarmHour);
145 Minute_Slider->setValue( alarmMinute.toInt(&ok,10) ); 146 Minute_Slider->setValue( alarmMinute.toInt(&ok,10) );
146 SnoozeSlider->setValue( snoozeTime.toInt(&ok,10) ); 147 SnoozeSlider->setValue( snoozeTime.toInt(&ok,10) );
147 Am_RadioButton->hide(); 148 Am_RadioButton->hide();
148 Pm_RadioButton->hide(); 149 Pm_RadioButton->hide();
149 } 150 }