[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 72896] Filtering of ToDo-List: Don't show tasks with a start
From: Bram Schoenmakers <bramschoenmakers () kde ! nl>
Date: 2004-09-30 18:04:09
Message-ID: 20040930180409.25729.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=72896
bramschoenmakers kde nl changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From bramschoenmakers kde nl 2004-09-30 20:04 -------
CVS commit by bram:
Implemented wish #72896 (Filtering of ToDo-List: Don't show tasks with a start
date later than the current date).
Maybe I'll go for #62319 (task filter needs a "show tasks from ... to ...")
some later.
CCMAIL: 72896-done bugs kde org
CCMAIL: 62319 bugs kde orgi
M +11 -0 korganizer/filteredit_base.ui 1.10
M +1 -0 korganizer/filtereditdialog.cpp 1.25
M +15 -7 libkcal/calfilter.cpp 1.15
M +13 -12 libkcal/calfilter.h 1.12
--- kdepim/libkcal/calfilter.cpp #1.14:1.15
@ -97,6 +97,13 @ bool CalFilter::filterIncidence(Incidenc
if ( !mEnabled ) return true;
- if ( (mCriteria & HideCompleted) && (incidence->type() == "Todo") ) {
- if ( (static_cast<Todo *>(incidence))->isCompleted() )
+ Todo *todo = dynamic_cast<Todo *>(incidence);
+ if( todo ) {
+ if ( (mCriteria & HideCompleted) && todo->isCompleted() )
+ return false;
+
+ if( ( mCriteria & HideInactiveTodos ) &&
+ ( todo->hasStartDate() &&
+ QDateTime::currentDateTime() < todo->dtStart() ||
+ todo->isCompleted() ) )
return false;
}
--- kdepim/libkcal/calfilter.h #1.11:1.12
@ -99,5 +99,6 @ class CalFilter
QStringList categoryList();
- enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4 };
+ enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4,
+ HideInactiveTodos = 8 };
/**
--- kdepim/korganizer/filteredit_base.ui #1.9:1.10
@ -140,4 +140,15 @
</property>
</widget>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>mHideInactiveTodosCheck</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Hide inactive todos</string>
+ </property>
+ </widget>
<spacer>
<property>
--- kdepim/korganizer/filtereditdialog.cpp #1.24:1.25
@ -225,4 +225,5 @ void FilterEditDialog::writeFilter( CalF
if ( mEditor->mRecurringCheck->isChecked() ) c |= CalFilter::HideRecurring;
if ( mEditor->mCatShowCheck->isChecked() ) c |= CalFilter::ShowCategories;
+ if ( mEditor->mHideInactiveTodosCheck->isChecked() ) c |= CalFilter::HideInactiveTodos;
filter->setCriteria( c );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic