26 #include "calfilter.h"
34 mCompletedTimeSpan = 0;
42 mCompletedTimeSpan = 0;
51 if ( !mEnabled )
return;
55 Event::List::Iterator it = eventlist->begin();
56 while( it != eventlist->end() ) {
58 it = eventlist->remove( it );
70 if ( !mEnabled )
return;
74 Todo::List::Iterator it = todolist->begin();
75 while( it != todolist->end() ) {
77 it = todolist->remove( it );
88 if ( !mEnabled )
return;
90 Journal::List::Iterator it = journallist->begin();
91 while( it != journallist->end() ) {
93 it = journallist->remove( it );
104 if ( !mEnabled )
return true;
106 Todo *todo =
dynamic_cast<Todo *
>(incidence);
108 if ( (mCriteria & HideCompleted) && todo->
isCompleted() ) {
110 if ( todo->
completed().addDays( mCompletedTimeSpan ) <
111 TQDateTime::currentDateTime() ) {
116 if( ( mCriteria & HideInactiveTodos ) &&
118 TQDateTime::currentDateTime() < todo->
dtStart() ||
122 if ( mCriteria & HideTodosWithoutAttendeeInEmailList ) {
123 bool iAmOneOfTheAttendees =
false;
126 Attendee::List::ConstIterator it;
127 for( it = attendees.begin(); it != attendees.end(); ++it ) {
128 if ( mEmailList.find( (*it)->email() ) != mEmailList.end() ) {
129 iAmOneOfTheAttendees =
true;
135 iAmOneOfTheAttendees =
true;
137 if ( !iAmOneOfTheAttendees )
143 if (mCriteria & HideRecurring) {
144 if (incidence->
doesRecur())
return false;
147 if (mCriteria & ShowCategories) {
148 for (TQStringList::ConstIterator it = mCategoryList.constBegin();
149 it != mCategoryList.constEnd(); ++it ) {
150 TQStringList incidenceCategories = incidence->
categories();
151 for (TQStringList::ConstIterator it2 = incidenceCategories.constBegin();
152 it2 != incidenceCategories.constEnd(); ++it2 ) {
153 if ((*it) == (*it2)) {
160 for (TQStringList::ConstIterator it = mCategoryList.constBegin();
161 it != mCategoryList.constEnd(); ++it ) {
162 TQStringList incidenceCategories = incidence->
categories();
163 for (TQStringList::ConstIterator it2 = incidenceCategories.constBegin();
164 it2 != incidenceCategories.constEnd(); ++it2 ) {
165 if ((*it) == (*it2)) {
205 return mCategoryList;
220 mCompletedTimeSpan = timespan;
225 return mCompletedTimeSpan;