• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • kcalcore
calfilter.h
Go to the documentation of this file.
1/*
2 This file is part of the kcalcore library.
3
4 Copyright (c) 2001,2003,2004 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
30
31#ifndef KCALCORE_CALFILTER_H
32#define KCALCORE_CALFILTER_H
33
34#include "kcalcore_export.h"
35#include "event.h"
36#include "journal.h"
37#include "todo.h"
38
39namespace KCalCore {
40
55class KCALCORE_EXPORT CalFilter
56{
57public:
61 enum Criteria {
62 HideRecurring = 1,
63 HideCompletedTodos = 2,
64 ShowCategories = 4,
65 HideInactiveTodos = 8,
66 HideNoMatchingAttendeeTodos = 16
67 };
68
72 CalFilter();
73
79 explicit CalFilter(const QString &name);
80
84 ~CalFilter();
85
92 void setName(const QString &name);
93
98 QString name() const;
99
107 void setCriteria(int criteria);
108
113 int criteria() const;
114
121 void apply(Event::List *eventList) const;
122
129 void apply(Todo::List *todoList) const;
130
137 void apply(Journal::List *journalList) const;
138
145 bool filterIncidence(Incidence::Ptr incidence) const;
146
153 void setEnabled(bool enabled);
154
159 bool isEnabled() const;
160
168 void setCategoryList(const QStringList &categoryList);
169
174 QStringList categoryList() const;
175
183 void setEmailList(const QStringList &emailList);
184
189 QStringList emailList() const;
190
201 void setCompletedTimeSpan(int timespan);
202
207 int completedTimeSpan() const;
208
214 bool operator==(const CalFilter &filter) const;
215
216private:
217 //@cond PRIVATE
218 Q_DISABLE_COPY(CalFilter)
219 class Private;
220 Private *const d;
221 //@endcond
222};
223
224}
225
226#endif
KCalCore::CalFilter
Provides a filter for calendars.
Definition calfilter.h:56
KCalCore::CalFilter::categoryList
QStringList categoryList() const
Returns the category list for this filter.
Definition calfilter.cpp:250
KCalCore::CalFilter::setCompletedTimeSpan
void setCompletedTimeSpan(int timespan)
Sets the number of days for the HideCompletedTodos criteria.
Definition calfilter.cpp:265
KCalCore::CalFilter::operator==
bool operator==(const CalFilter &filter) const
Compares this with filter for equality.
Definition calfilter.cpp:78
KCalCore::CalFilter::setCategoryList
void setCategoryList(const QStringList &categoryList)
Sets the list of categories to be considered when filtering incidences according to the ShowCategorie...
Definition calfilter.cpp:245
KCalCore::CalFilter::setEmailList
void setEmailList(const QStringList &emailList)
Sets the list of email addresses to be considered when filtering incidences according ot the HideNoMa...
Definition calfilter.cpp:255
KCalCore::CalFilter::isEnabled
bool isEnabled() const
Returns whether the filter is enabled or not.
Definition calfilter.cpp:230
KCalCore::CalFilter::setEnabled
void setEnabled(bool enabled)
Enables or disables the filter.
Definition calfilter.cpp:225
KCalCore::CalFilter::CalFilter
CalFilter()
Constructs an empty filter – a filter without a name or criteria.
Definition calfilter.cpp:63
KCalCore::CalFilter::apply
void apply(Todo::List *todoList) const
Applies the filter to a list of To-dos.
KCalCore::CalFilter::emailList
QStringList emailList() const
Returns the email list for this filter.
Definition calfilter.cpp:260
KCalCore::CalFilter::Criteria
Criteria
Filtering Criteria.
Definition calfilter.h:61
KCalCore::CalFilter::HideRecurring
@ HideRecurring
Remove incidences that recur.
Definition calfilter.h:62
KCalCore::CalFilter::ShowCategories
@ ShowCategories
Show incidences with at least one matching category.
Definition calfilter.h:64
KCalCore::CalFilter::HideNoMatchingAttendeeTodos
@ HideNoMatchingAttendeeTodos
Remove to-dos without a matching attendee.
Definition calfilter.h:66
KCalCore::CalFilter::HideCompletedTodos
@ HideCompletedTodos
Remove completed to-dos.
Definition calfilter.h:63
KCalCore::CalFilter::HideInactiveTodos
@ HideInactiveTodos
Remove to-dos that haven't started yet.
Definition calfilter.h:65
KCalCore::CalFilter::apply
void apply(Journal::List *journalList) const
Applies the filter to a list of Journals.
KCalCore::CalFilter::filterIncidence
bool filterIncidence(Incidence::Ptr incidence) const
Applies the filter criteria to the specified Incidence.
Definition calfilter.cpp:136
KCalCore::CalFilter::completedTimeSpan
int completedTimeSpan() const
Returns the completed time span for this filter.
Definition calfilter.cpp:270
KCalCore::Event::List
QVector< Ptr > List
List of events.
Definition event.h:60
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
Definition incidence.h:112
KCalCore::Journal::List
QVector< Ptr > List
List of journals.
Definition journal.h:54
KCalCore::Todo::List
QVector< Ptr > List
List of to-dos.
Definition todo.h:55
event.h
This file is part of the API for handling calendar data and defines the Event class.
journal.h
This file is part of the API for handling calendar data and defines the Journal class.
KCalCore
TODO: KDE5:
Definition alarm.h:47
todo.h
This file is part of the API for handling calendar data and defines the Todo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal