summaryrefslogtreecommitdiffabout
path: root/korganizer/filtereditdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/filtereditdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/filtereditdialog.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/korganizer/filtereditdialog.cpp b/korganizer/filtereditdialog.cpp
index ca09844..df84911 100644
--- a/korganizer/filtereditdialog.cpp
+++ b/korganizer/filtereditdialog.cpp
@@ -226,45 +226,52 @@ void FilterEditDialog::filterSelected()
if (f) readFilter(f);
}
void FilterEditDialog::readFilter(CalFilter *filter)
{
int c = filter->criteria();
mEditor->mCompletedCheck->setChecked(c & CalFilter::HideCompleted);
mEditor->mRecurringCheck->setChecked(c & CalFilter::HideRecurring);
mEditor->mPublicCheck->setChecked(c & CalFilter::ShowPublic);
mEditor->mPrivateCheck->setChecked(c & CalFilter::ShowPrivate);
mEditor->mConfidentialCheck->setChecked(c & CalFilter::ShowConfidential);
+
+ mEditor->mEventCheck->setChecked(c & CalFilter::HideEvents);
+ mEditor->mTodoCheck->setChecked(c & CalFilter::HideTodos);
+ mEditor->mJournalCheck->setChecked(c & CalFilter::HideJournals);
if (c & CalFilter::ShowCategories) {
mEditor->mCatShowCheck->setChecked(true);
} else {
mEditor->mCatHideCheck->setChecked(true);
}
mEditor->mCatList->clear();
mEditor->mCatList->insertStringList(filter->categoryList());
mCategories = filter->categoryList();
setCaption( i18n("Filter position: ") + QString::number ( mSelectionCombo->currentItem()+1 ));
}
void FilterEditDialog::writeFilter(CalFilter *filter)
{
int c = 0;
if (mEditor->mCompletedCheck->isChecked()) c |= CalFilter::HideCompleted;
if (mEditor->mRecurringCheck->isChecked()) c |= CalFilter::HideRecurring;
if (mEditor->mCatShowCheck->isChecked()) c |= CalFilter::ShowCategories;
if (mEditor->mPublicCheck->isChecked()) c |= CalFilter::ShowPublic;
if (mEditor->mPrivateCheck->isChecked()) c |= CalFilter::ShowPrivate;
if (mEditor->mConfidentialCheck->isChecked()) c |= CalFilter::ShowConfidential;
+ if (mEditor->mEventCheck->isChecked()) c |= CalFilter::HideEvents;
+ if (mEditor->mTodoCheck->isChecked()) c |= CalFilter::HideTodos;
+ if (mEditor->mJournalCheck->isChecked()) c |= CalFilter::HideJournals;
filter->setCriteria(c);
QStringList categoryList;
for(uint i=0;i<mEditor->mCatList->count();++i) {
categoryList.append(mEditor->mCatList->text(i));
}
filter->setCategoryList(categoryList);
}