Akonadi Calendar

etmcalendar.h
1 /*
2  SPDX-FileCopyrightText: 2011 Sérgio Martins <[email protected]>
3  SPDX-FileCopyrightText: 2012 Sérgio Martins <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef _AKONADI_ETMCALENDAR_H_
9 #define _AKONADI_ETMCALENDAR_H_
10 
11 #include "akonadi-calendar_export.h"
12 #include "calendarbase.h"
13 
14 #include <collection.h>
15 
16 class QAbstractItemModel;
18 
19 namespace Akonadi {
20 class Monitor;
21 class ETMCalendarPrivate;
22 class EntityTreeModel;
23 
40 class AKONADI_CALENDAR_EXPORT ETMCalendar : public CalendarBase
41 {
42  Q_OBJECT
43 public:
44 
45  enum CollectionColumn {
46  CollectionTitle = 0,
47  CollectionColumnCount
48  };
49 
51 
55  explicit ETMCalendar(QObject *parent = nullptr);
56 
62  explicit ETMCalendar(const QStringList &mimeTypes, QObject *parent = nullptr);
63 
77  explicit ETMCalendar(ETMCalendar *calendar, QObject *parent = nullptr);
78 
79  explicit ETMCalendar(Monitor *monitor, QObject *parent = nullptr);
83  ~ETMCalendar() override;
84 
90  Q_REQUIRED_RESULT Akonadi::Collection collection(Akonadi::Collection::Id) const;
91 
95  Q_REQUIRED_RESULT bool hasRight(const Akonadi::Item &item, Akonadi::Collection::Right right) const;
96 
103  Q_REQUIRED_RESULT bool hasRight(const QString &uid, Akonadi::Collection::Right right) const;
104 
109  KCheckableProxyModel *checkableProxyModel() const;
110 
121  QAbstractItemModel *model() const;
122 
136  Akonadi::EntityTreeModel *entityTreeModel() const;
137 
144  KCalendarCore::Alarm::List alarms(const QDateTime &from, const QDateTime &to, bool excludeBlockedAlarms = false) const override;
145 
153  void setCollectionFilteringEnabled(bool enable);
154 
159  Q_REQUIRED_RESULT bool collectionFilteringEnabled() const;
160 
164  Q_REQUIRED_RESULT bool isLoaded() const override;
165 
166 Q_SIGNALS:
173  void collectionChanged(const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames);
174 
180  void collectionsAdded(const Akonadi::Collection::List &collection);
181 
187  void collectionsRemoved(const Akonadi::Collection::List &collection);
188 
192  void calendarChanged();
193 
194 private:
195  Q_DECLARE_PRIVATE(ETMCalendar)
196 };
197 }
198 
199 #endif
FreeBusyManager::Singleton.
The base class for all akonadi aware calendars.
Definition: calendarbase.h:35
A KCalendarCore::Calendar that uses an EntityTreeModel to populate itself.
Definition: etmcalendar.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 3 2020 23:10:05 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.