diff options
Diffstat (limited to 'korganizer/koprefsdialog.cpp')
-rw-r--r-- | korganizer/koprefsdialog.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 99045c309..fd9fd8246 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -331,11 +331,17 @@ class KOPrefsDialogTime : public KPrefsModule mAlarmTimeCombo->insertStringList( alarmList ); topLayout->addWidget( mAlarmTimeCombo, 5, 1 ); + QLabel *alarmDefaultLabel = new QLabel( i18n( "Enable reminders by default:" ), topFrame); + topLayout->addWidget( alarmDefaultLabel, 6, 0 ); + mAlarmTimeDefaultCheckBox = new QCheckBox( topFrame ); + topLayout->addWidget( mAlarmTimeDefaultCheckBox, 6, 1 ); + connect( mAlarmTimeDefaultCheckBox, SIGNAL( toggled( bool ) ), + SLOT( slotWidChanged() ) ); QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, i18n("Working Hours"), topFrame); - topLayout->addMultiCellWidget( workingHoursGroup, 6, 6, 0, 1 ); + topLayout->addMultiCellWidget( workingHoursGroup, 7, 7, 0, 1 ); QHBox *workDaysBox = new QHBox( workingHoursGroup ); // Respect start of week setting @@ -369,7 +375,7 @@ class KOPrefsDialogTime : public KPrefsModule addWidBool( KOPrefs::instance()->excludeHolidaysItem(), workingHoursGroup ); - topLayout->setRowStretch(7,1); + topLayout->setRowStretch(8,1); load(); } @@ -381,6 +387,7 @@ class KOPrefsDialogTime : public KPrefsModule i18n( KOPrefs::instance()->mTimeZoneId.utf8() ) ); mAlarmTimeCombo->setCurrentItem( KOPrefs::instance()->mAlarmTime ); + mAlarmTimeDefaultCheckBox->setChecked ( KOPrefs::instance()->mAlarmsEnabledByDefault ); for ( int i = 0; i < 7; ++i ) { mWorkDays[i]->setChecked( (1<<i) & (KOPrefs::instance()->mWorkWeekMask) ); } @@ -403,6 +410,7 @@ class KOPrefsDialogTime : public KPrefsModule mRegionMap[mHolidayCombo->currentText()]; KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); + KOPrefs::instance()->mAlarmsEnabledByDefault = mAlarmTimeDefaultCheckBox->isChecked(); int mask = 0; for ( int i = 0; i < 7; ++i ) { if (mWorkDays[i]->isChecked()) mask = mask | (1<<i); @@ -433,6 +441,7 @@ class KOPrefsDialogTime : public KPrefsModule QComboBox *mHolidayCombo; QMap<QString,QString> mRegionMap; QComboBox *mAlarmTimeCombo; + QCheckBox *mAlarmTimeDefaultCheckBox; QCheckBox *mWorkDays[7]; }; |