summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
authorzautrix <zautrix>2005-08-17 22:44:12 (UTC)
committer zautrix <zautrix>2005-08-17 22:44:12 (UTC)
commitbd0f0feb2e1af8a346dc724c81f31214c52128e4 (patch) (side-by-side diff)
tree7234e97f485901026e37a2deab734e9d431002f2 /korganizer/koprefsdialog.cpp
parent671857b232224314ad7720ad4bc037758a90fa4b (diff)
downloadkdepimpi-bd0f0feb2e1af8a346dc724c81f31214c52128e4.zip
kdepimpi-bd0f0feb2e1af8a346dc724c81f31214c52128e4.tar.gz
kdepimpi-bd0f0feb2e1af8a346dc724c81f31214c52128e4.tar.bz2
conflict settings
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
@@ -924,2 +924,37 @@ dummy =
+ 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);
+
+
+
@@ -1437,2 +1472,16 @@ void KOPrefsDialog::usrReadConfig()
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 );
}
@@ -1481,2 +1530,5 @@ void KOPrefsDialog::usrWriteConfig()
KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
+
+ KOPrefs::instance()->mFilterConflictEditItem = mFilterEditItem->currentText();
+ KOPrefs::instance()->mFilterConflictAllItem = mFilterAllItem->currentText();
}