summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefsdialog.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 9e2378a..bbdf508 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -921,8 +921,43 @@ dummy =
dummy = addWidBool(i18n("Last modified time"),
&(KOPrefs::instance()->mWTshowChanged),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
+ topFrame = addPage(i18n("Conflict detection"),0,0);
+
+ topLayout = new QGridLayout(topFrame,2,1);
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
+ ii = 0;
+ dummy = addWidBool(i18n("Enable conflict detection"),
+ &(KOPrefs::instance()->mDetectConflicts),topFrame);
+ topLayout->addWidget(dummy->checkBox(), ii++,0);
+ topFrame = new QFrame( topFrame );
+ topLayout->addWidget(topFrame ,ii++,0);
+ topLayout = new QGridLayout(topFrame,4,1);
+ connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) );
+ topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an <b>edited event</b> with other <b>existing events</b> for overlapping. You can define which events are checked:"), topFrame ) , ii++,0);
+ topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0);
+ mFilterEditItem = new QComboBox( topFrame );
+ topLayout->addWidget(mFilterEditItem,ii++,0);
+ topLayout->addWidget( new QLabel ( i18n("Filter for other existing events"), topFrame ) , ii++,0);
+ mFilterAllItem = new QComboBox( topFrame );
+ topLayout->addWidget(mFilterAllItem,ii++,0);
+ dummy = addWidBool(i18n("Check Allday with Allday"),
+ &(KOPrefs::instance()->mCheckConflictsAllDayAllDay),topFrame);
+ topLayout->addWidget(dummy->checkBox(), ii++,0);
+ dummy = addWidBool(i18n("Check Allday with NonAllday"),
+ &(KOPrefs::instance()->mCheckConflictsAllDayNonAD),topFrame);
+ topLayout->addWidget(dummy->checkBox(), ii++,0);
+ dummy = addWidBool(i18n("Check NonAllday with Allday"),
+ &(KOPrefs::instance()->mCheckConflictsNonADAllDay),topFrame);
+ topLayout->addWidget(dummy->checkBox(), ii++,0);
+ dummy = addWidBool(i18n("Check NonAllday with NonAllday"),
+ &(KOPrefs::instance()->mCheckConflictsNonADNonAD),topFrame);
+ topLayout->addWidget(dummy->checkBox(), ii++,0);
+
+
+
topFrame = addPage(i18n("Alarm"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
@@ -1434,8 +1469,22 @@ void KOPrefsDialog::usrReadConfig()
mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
mCatDefaultColor = KOPrefs::instance()->mEventColor;
+
+
+ KConfig cfgko(locateLocal("config","korganizerrc"));
+ cfgko.setGroup("General");
+ QStringList temp = cfgko.readListEntry("CalendarFilters");
+ temp.prepend(i18n("No Filter") );
+ mFilterEditItem->insertStringList( temp );
+ mFilterAllItem->insertStringList( temp );
+ int index = temp.findIndex( KOPrefs::instance()->mFilterConflictEditItem );
+ if ( index >= 0 )
+ mFilterEditItem->setCurrentItem( index );
+ index = temp.findIndex( KOPrefs::instance()->mFilterConflictAllItem );
+ if ( index >= 0 )
+ mFilterAllItem->setCurrentItem( index );
}
void KOPrefsDialog::usrWriteConfig()
@@ -1478,8 +1527,11 @@ void KOPrefsDialog::usrWriteConfig()
KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
+
+ KOPrefs::instance()->mFilterConflictEditItem = mFilterEditItem->currentText();
+ KOPrefs::instance()->mFilterConflictAllItem = mFilterAllItem->currentText();
}
void KOPrefsDialog::updateCategories()
{