summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
Unidiff
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
@@ -922,6 +922,41 @@ dummy =
922 &(KOPrefs::instance()->mWTshowChanged),topFrame); 922 &(KOPrefs::instance()->mWTshowChanged),topFrame);
923 topLayout->addWidget(dummy->checkBox(),ii++,0); 923 topLayout->addWidget(dummy->checkBox(),ii++,0);
924 924
925 topFrame = addPage(i18n("Conflict detection"),0,0);
926
927 topLayout = new QGridLayout(topFrame,2,1);
928 topLayout->setSpacing(mSpacingHint);
929 topLayout->setMargin(mMarginHint);
930 ii = 0;
931 dummy = addWidBool(i18n("Enable conflict detection"),
932 &(KOPrefs::instance()->mDetectConflicts),topFrame);
933 topLayout->addWidget(dummy->checkBox(), ii++,0);
934 topFrame = new QFrame( topFrame );
935 topLayout->addWidget(topFrame ,ii++,0);
936 topLayout = new QGridLayout(topFrame,4,1);
937 connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) );
938 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);
939 topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0);
940 mFilterEditItem = new QComboBox( topFrame );
941 topLayout->addWidget(mFilterEditItem,ii++,0);
942 topLayout->addWidget( new QLabel ( i18n("Filter for other existing events"), topFrame ) , ii++,0);
943 mFilterAllItem = new QComboBox( topFrame );
944 topLayout->addWidget(mFilterAllItem,ii++,0);
945 dummy = addWidBool(i18n("Check Allday with Allday"),
946 &(KOPrefs::instance()->mCheckConflictsAllDayAllDay),topFrame);
947 topLayout->addWidget(dummy->checkBox(), ii++,0);
948 dummy = addWidBool(i18n("Check Allday with NonAllday"),
949 &(KOPrefs::instance()->mCheckConflictsAllDayNonAD),topFrame);
950 topLayout->addWidget(dummy->checkBox(), ii++,0);
951 dummy = addWidBool(i18n("Check NonAllday with Allday"),
952 &(KOPrefs::instance()->mCheckConflictsNonADAllDay),topFrame);
953 topLayout->addWidget(dummy->checkBox(), ii++,0);
954 dummy = addWidBool(i18n("Check NonAllday with NonAllday"),
955 &(KOPrefs::instance()->mCheckConflictsNonADNonAD),topFrame);
956 topLayout->addWidget(dummy->checkBox(), ii++,0);
957
958
959
925 960
926 topFrame = addPage(i18n("Alarm"),0,0); 961 topFrame = addPage(i18n("Alarm"),0,0);
927 // DesktopIcon("viewmag",KIcon::SizeMedium)); 962 // DesktopIcon("viewmag",KIcon::SizeMedium));
@@ -1435,6 +1470,20 @@ void KOPrefsDialog::usrReadConfig()
1435 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); 1470 mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
1436 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1471 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1437 mCatDefaultColor = KOPrefs::instance()->mEventColor; 1472 mCatDefaultColor = KOPrefs::instance()->mEventColor;
1473
1474
1475 KConfig cfgko(locateLocal("config","korganizerrc"));
1476 cfgko.setGroup("General");
1477 QStringList temp = cfgko.readListEntry("CalendarFilters");
1478 temp.prepend(i18n("No Filter") );
1479 mFilterEditItem->insertStringList( temp );
1480 mFilterAllItem->insertStringList( temp );
1481 int index = temp.findIndex( KOPrefs::instance()->mFilterConflictEditItem );
1482 if ( index >= 0 )
1483 mFilterEditItem->setCurrentItem( index );
1484 index = temp.findIndex( KOPrefs::instance()->mFilterConflictAllItem );
1485 if ( index >= 0 )
1486 mFilterAllItem->setCurrentItem( index );
1438} 1487}
1439 1488
1440 1489
@@ -1479,6 +1528,9 @@ void KOPrefsDialog::usrWriteConfig()
1479 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1528 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1480 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1529 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1481 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1530 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1531
1532 KOPrefs::instance()->mFilterConflictEditItem = mFilterEditItem->currentText();
1533 KOPrefs::instance()->mFilterConflictAllItem = mFilterAllItem->currentText();
1482} 1534}
1483 1535
1484void KOPrefsDialog::updateCategories() 1536void KOPrefsDialog::updateCategories()