libkcal Library API Documentation

KCal::CalFilter Class Reference

Filter for calendar objects. More...

#include <calfilter.h>

List of all members.

Public Types

enum  { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4 }

Public Member Functions

 CalFilter ()
 Construct filter.

 CalFilter (const QString &name)
 Construct filter with name.

 ~CalFilter ()
 Destruct filter.

void setName (const QString &name)
 Set name of filter.

QString name () const
 Return name of filter.

void apply (QPtrList< Event > *eventlist)
 Apply filter to eventlist, all events not matching filter criterias are removed from the list.

void apply (QPtrList< Todo > *todolist)
 Apply filter to todolist, all todos not matching filter criterias are removed from the list.

bool filterEvent (Event *)
 Apply filter criteria on the specified event.

bool filterTodo (Todo *)
 Apply filter criteria on the specified todo.

bool filterIncidence (Incidence *)
 Apply filter criteria on the specified incidence.

void setEnabled (bool)
 Enable or disable filter.

bool isEnabled ()
 Return wheter the filter is enabled or not.

void setCategoryList (const QStringList &)
 Set list of categories, which is used for showing/hiding categories of events.

QStringList categoryList ()
 Return category list, used for showing/hiding categories of events.

void setCriteria (int)
 Set criteria, which have to be fulfilled by events passing the filter.

int criteria ()
 Get inclusive filter criteria.


Detailed Description

Filter for calendar objects.

Definition at line 35 of file calfilter.h.


Constructor & Destructor Documentation

CalFilter::CalFilter  ) 
 

Construct filter.

Definition at line 27 of file calfilter.cpp.

CalFilter::CalFilter const QString name  ) 
 

Construct filter with name.

Definition at line 33 of file calfilter.cpp.

CalFilter::~CalFilter  ) 
 

Destruct filter.

Definition at line 38 of file calfilter.cpp.


Member Function Documentation

void KCal::CalFilter::setName const QString name  )  [inline]
 

Set name of filter.

Definition at line 47 of file calfilter.h.

QString KCal::CalFilter::name  )  const [inline]
 

Return name of filter.

Definition at line 51 of file calfilter.h.

void CalFilter::apply QPtrList< Event > *  eventlist  ) 
 

Apply filter to eventlist, all events not matching filter criterias are removed from the list.

Definition at line 42 of file calfilter.cpp.

References QPtrList::current(), filterEvent(), QPtrList::first(), QPtrList::next(), and QPtrList::remove().

Referenced by KCal::Calendar::events(), and KCal::Calendar::todos().

void CalFilter::apply QPtrList< Todo > *  todolist  ) 
 

Apply filter to todolist, all todos not matching filter criterias are removed from the list.

Definition at line 62 of file calfilter.cpp.

References QPtrList::current(), filterTodo(), QPtrList::first(), QPtrList::next(), and QPtrList::remove().

bool CalFilter::filterEvent Event  ) 
 

Apply filter criteria on the specified event.

Return true, if event passes criteria, otherwise return false.

Definition at line 81 of file calfilter.cpp.

References KCal::Recurrence::doesRecur(), filterIncidence(), and KCal::Incidence::recurrence().

Referenced by apply().

bool CalFilter::filterTodo Todo  ) 
 

Apply filter criteria on the specified todo.

Return true, if event passes criteria, otherwise return false.

Definition at line 92 of file calfilter.cpp.

References filterIncidence(), and KCal::Todo::isCompleted().

Referenced by apply().

bool CalFilter::filterIncidence Incidence  ) 
 

Apply filter criteria on the specified incidence.

Return true, if event passes criteria, otherwise return false.

Definition at line 103 of file calfilter.cpp.

References KCal::Incidence::categories().

Referenced by filterEvent(), and filterTodo().

void CalFilter::setEnabled bool   ) 
 

Enable or disable filter.

Definition at line 138 of file calfilter.cpp.

bool CalFilter::isEnabled  ) 
 

Return wheter the filter is enabled or not.

Definition at line 143 of file calfilter.cpp.

void CalFilter::setCategoryList const QStringList  ) 
 

Set list of categories, which is used for showing/hiding categories of events.

See related functions.

Definition at line 158 of file calfilter.cpp.

QStringList CalFilter::categoryList  ) 
 

Return category list, used for showing/hiding categories of events.

See related functions.

Definition at line 163 of file calfilter.cpp.

void CalFilter::setCriteria int   ) 
 

Set criteria, which have to be fulfilled by events passing the filter.

Definition at line 148 of file calfilter.cpp.

int CalFilter::criteria  ) 
 

Get inclusive filter criteria.

Definition at line 153 of file calfilter.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sat Oct 18 02:47:04 2003 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001