KCalendarCore

calfilter.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  SPDX-FileCopyrightText: 2001, 2003, 2004 Cornelius Schumacher <[email protected]>
5  SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <[email protected]>
6 
7  SPDX-License-Identifier: LGPL-2.0-or-later
8 */
18 #ifndef KCALCORE_CALFILTER_H
19 #define KCALCORE_CALFILTER_H
20 
21 #include "kcalendarcore_export.h"
22 #include "event.h"
23 #include "journal.h"
24 #include "todo.h"
25 
26 namespace KCalendarCore
27 {
28 
43 class KCALENDARCORE_EXPORT CalFilter
44 {
45 public:
49  enum Criteria {
50  HideRecurring = 1,
51  HideCompletedTodos = 2,
52  ShowCategories = 4,
53  HideInactiveTodos = 8,
54  HideNoMatchingAttendeeTodos = 16
55  };
56 
60  CalFilter();
61 
67  explicit CalFilter(const QString &name);
68 
72  ~CalFilter();
73 
80  void setName(const QString &name);
81 
86  Q_REQUIRED_RESULT QString name() const;
87 
95  void setCriteria(int criteria);
96 
101  Q_REQUIRED_RESULT int criteria() const;
102 
109  void apply(Event::List *eventList) const;
110 
117  void apply(Todo::List *todoList) const;
118 
125  void apply(Journal::List *journalList) const;
126 
133  Q_REQUIRED_RESULT bool filterIncidence(const Incidence::Ptr &incidence) const;
134 
141  void setEnabled(bool enabled);
142 
147  Q_REQUIRED_RESULT bool isEnabled() const;
148 
156  void setCategoryList(const QStringList &categoryList);
157 
162  Q_REQUIRED_RESULT QStringList categoryList() const;
163 
171  void setEmailList(const QStringList &emailList);
172 
177  Q_REQUIRED_RESULT QStringList emailList() const;
178 
189  void setCompletedTimeSpan(int timespan);
190 
195  Q_REQUIRED_RESULT int completedTimeSpan() const;
196 
202  bool operator==(const CalFilter &filter) const;
203 
204 private:
205  //@cond PRIVATE
206  Q_DISABLE_COPY(CalFilter)
207  class Private;
208  Private *const d;
209  //@endcond
210 };
211 
212 }
213 
214 #endif
This file is part of the API for handling calendar data and defines the Todo class.
This file is part of the API for handling calendar data and defines the Journal class.
This file is part of the API for handling calendar data and defines the Event class.
Criteria
Filtering Criteria.
Definition: calfilter.h:49
Provides a filter for calendars.
Definition: calfilter.h:43
Namespace for all KCalendarCore types.
Definition: alarm.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Nov 26 2020 22:49:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.