• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KCalCore Library

  • KCalCore
  • CalFilter
Public Types | Public Member Functions
KCalCore::CalFilter Class Reference

#include <calfilter.h>

List of all members.

Public Types

enum  Criteria {
  HideRecurring = 1, HideCompletedTodos = 2, ShowCategories = 4, HideInactiveTodos = 8,
  HideNoMatchingAttendeeTodos = 16
}

Public Member Functions

 CalFilter ()
 CalFilter (const QString &name)
 ~CalFilter ()
void apply (Event::List *eventList) const
void apply (Todo::List *todoList) const
void apply (Journal::List *journalList) const
QStringList categoryList () const
int completedTimeSpan () const
int criteria () const
QStringList emailList () const
bool filterIncidence (Incidence::Ptr incidence) const
bool isEnabled () const
QString name () const
bool operator== (const CalFilter &filter) const
void setCategoryList (const QStringList &categoryList)
void setCompletedTimeSpan (int timespan)
void setCriteria (int criteria)
void setEmailList (const QStringList &emailList)
void setEnabled (bool enabled)
void setName (const QString &name)

Detailed Description

Provides a filter for calendars.

This class provides a means for filtering calendar incidences by a list of email addresses, a list of categories, or other Criteria.

The following Criteria are available:

  • remove recurring Incidences
  • keep Incidences with a matching category (see setCategoryList())
  • remove completed To-dos (see setCompletedTimeSpan())
  • remove inactive To-dos
  • remove To-dos without a matching attendee (see setEmailList())

Member Enumeration Documentation

enum KCalCore::CalFilter::Criteria

Filtering Criteria.

Enumerator:
HideRecurring 

Remove incidences that recur.

HideCompletedTodos 

Remove completed to-dos.

ShowCategories 

Show incidences with at least one matching category.

HideInactiveTodos 

Remove to-dos that haven't started yet.

HideNoMatchingAttendeeTodos 

Remove to-dos without a matching attendee.

Definition at line 61 of file calfilter.h.


Constructor & Destructor Documentation

CalFilter::CalFilter ( )

Constructs an empty filter -- a filter without a name or criteria.

Private class that helps to provide binary compatibility between releases.

Definition at line 63 of file calfilter.cpp.

CalFilter::CalFilter ( const QString &  name) [explicit]

Constructs a filter with name.

Parameters:
nameis the name of this filter.

Definition at line 67 of file calfilter.cpp.

CalFilter::~CalFilter ( )

Destroys this filter.

Definition at line 73 of file calfilter.cpp.


Member Function Documentation

void CalFilter::apply ( Event::List *  eventList) const

Applies the filter to a list of Events.

All events not matching the filter criteria are removed from the list.

Parameters:
eventListis a list of Events to filter.

Definition at line 87 of file calfilter.cpp.

void KCalCore::CalFilter::apply ( Todo::List *  todoList) const

Applies the filter to a list of To-dos.

All to-dos not matching the filter criterias are removed from the list.

Parameters:
todoListis a list of To-dos to filter.
void KCalCore::CalFilter::apply ( Journal::List *  journalList) const

Applies the filter to a list of Journals.

All journals not matching the filter criterias are removed from the list.

Parameters:
journalListis a list of Journals to filter.
QStringList CalFilter::categoryList ( ) const

Returns the category list for this filter.

See also:
setCategoryList().

Definition at line 250 of file calfilter.cpp.

int CalFilter::completedTimeSpan ( ) const

Returns the completed time span for this filter.

See also:
setCompletedTimeSpan()

Definition at line 270 of file calfilter.cpp.

int CalFilter::criteria ( ) const

Returns the inclusive filter criteria.

See also:
setCriteria().

Definition at line 240 of file calfilter.cpp.

QStringList CalFilter::emailList ( ) const

Returns the email list for this filter.

See also:
setEmailList().

Definition at line 260 of file calfilter.cpp.

bool CalFilter::filterIncidence ( Incidence::Ptr  incidence) const

Applies the filter criteria to the specified Incidence.

Parameters:
incidenceis the Incidence to filter.
Returns:
true if the Incidence passes the criteria; false otherwise.

Definition at line 136 of file calfilter.cpp.

bool CalFilter::isEnabled ( ) const

Returns whether the filter is enabled or not.

See also:
setEnabled().

Definition at line 230 of file calfilter.cpp.

QString CalFilter::name ( ) const

Returns the filter name.

See also:
setName().

Definition at line 220 of file calfilter.cpp.

bool KCalCore::CalFilter::operator== ( const CalFilter &  filter) const

Compares this with filter for equality.

Parameters:
filterthe CalFilter to compare.

Definition at line 78 of file calfilter.cpp.

void CalFilter::setCategoryList ( const QStringList &  categoryList)

Sets the list of categories to be considered when filtering incidences according to the ShowCategories criteria.

Parameters:
categoryListis a QStringList of categories.
See also:
categoryList().

Definition at line 245 of file calfilter.cpp.

void CalFilter::setCompletedTimeSpan ( int  timespan)

Sets the number of days for the HideCompletedTodos criteria.

If a to-do has been completed within the recent timespan days, then that to-do will be removed during filtering. If a time span is not specified in the filter, then all completed to-dos will be removed if the HideCompletedTodos criteria is set.

Parameters:
timespanis an integer representing a time span in days.
See also:
completedTimeSpan().

Definition at line 265 of file calfilter.cpp.

void CalFilter::setCriteria ( int  criteria)

Sets the criteria which must be fulfilled for an Incidence to pass the filter.

Parameters:
criteriais a combination of Criteria.
See also:
criteria().

Definition at line 235 of file calfilter.cpp.

void CalFilter::setEmailList ( const QStringList &  emailList)

Sets the list of email addresses to be considered when filtering incidences according ot the HideNoMatchingAttendeeTodos criteria.

Parameters:
emailListis a QStringList of email addresses.
See also:
emailList().

Definition at line 255 of file calfilter.cpp.

void CalFilter::setEnabled ( bool  enabled)

Enables or disables the filter.

Parameters:
enabledis true if the filter is to be enabled; false otherwise.
See also:
isEnabled().

Definition at line 225 of file calfilter.cpp.

void CalFilter::setName ( const QString &  name)

Sets the filter name.

Parameters:
nameis the name of this filter.
See also:
name().

Definition at line 215 of file calfilter.cpp.


The documentation for this class was generated from the following files:
  • calfilter.h
  • calfilter.cpp

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal