summaryrefslogtreecommitdiffabout
path: root/libkcal/calfilter.cpp
Unidiff
Diffstat (limited to 'libkcal/calfilter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calfilter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp
index 72f70c2..fa1dbd5 100644
--- a/libkcal/calfilter.cpp
+++ b/libkcal/calfilter.cpp
@@ -12,65 +12,67 @@
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <kdebug.h> 21#include <kdebug.h>
22 22
23#include "calfilter.h" 23#include "calfilter.h"
24//Added by qt3to4:
25#include <Q3PtrList>
24 26
25using namespace KCal; 27using namespace KCal;
26 28
27CalFilter::CalFilter() 29CalFilter::CalFilter()
28{ 30{
29 mEnabled = true; 31 mEnabled = true;
30 mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; 32 mCriteria = ShowPublic | ShowPrivate| ShowConfidential ;
31} 33}
32 34
33CalFilter::CalFilter(const QString &name) 35CalFilter::CalFilter(const QString &name)
34{ 36{
35 mName = name; 37 mName = name;
36 mEnabled = true; 38 mEnabled = true;
37 mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; 39 mCriteria = ShowPublic | ShowPrivate| ShowConfidential ;
38} 40}
39 41
40CalFilter::~CalFilter() 42CalFilter::~CalFilter()
41{ 43{
42} 44}
43 45
44void CalFilter::apply(QPtrList<Event> *eventlist) 46void CalFilter::apply(Q3PtrList<Event> *eventlist)
45{ 47{
46 if (!mEnabled) return; 48 if (!mEnabled) return;
47 49
48// kdDebug(5800) << "CalFilter::apply()" << endl; 50// kdDebug(5800) << "CalFilter::apply()" << endl;
49 51
50 Event *event = eventlist->first(); 52 Event *event = eventlist->first();
51 while(event) { 53 while(event) {
52 if (!filterEvent(event)) { 54 if (!filterEvent(event)) {
53 eventlist->remove(); 55 eventlist->remove();
54 event = eventlist->current(); 56 event = eventlist->current();
55 } else { 57 } else {
56 event = eventlist->next(); 58 event = eventlist->next();
57 } 59 }
58 } 60 }
59 61
60// kdDebug(5800) << "CalFilter::apply() done" << endl; 62// kdDebug(5800) << "CalFilter::apply() done" << endl;
61} 63}
62 64
63// TODO: avoid duplicating apply() code 65// TODO: avoid duplicating apply() code
64void CalFilter::apply(QPtrList<Todo> *eventlist) 66void CalFilter::apply(Q3PtrList<Todo> *eventlist)
65{ 67{
66 if (!mEnabled) return; 68 if (!mEnabled) return;
67 Todo *event = eventlist->first(); 69 Todo *event = eventlist->first();
68 while(event) { 70 while(event) {
69 if (!filterTodo(event)) { 71 if (!filterTodo(event)) {
70 eventlist->remove(); 72 eventlist->remove();
71 event = eventlist->current(); 73 event = eventlist->current();
72 } else { 74 } else {
73 event = eventlist->next(); 75 event = eventlist->next();
74 } 76 }
75 } 77 }
76 78