Akonadi Calendar

collectioncalendar.h
1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-FileCopyrightText: 2023 Daniel Vrátil <dvratil@kde.org>
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "akonadi-calendar_export.h"
10#include "calendarbase.h"
11
13
14namespace Akonadi
15{
16class Collection;
17class EntityTreeModel;
18
19class CollectionCalendarPrivate;
20
21/** Calendar representing a single Akonadi::Collection. */
22class AKONADI_CALENDAR_EXPORT CollectionCalendar : public Akonadi::CalendarBase
23{
24 Q_OBJECT
25public:
27
28 explicit CollectionCalendar(const Akonadi::Collection &col, QObject *parent = nullptr);
29 CollectionCalendar(QAbstractItemModel *model, const Akonadi::Collection &col, QObject *parent = nullptr);
30 ~CollectionCalendar() override;
31
32 [[nodiscard]] Akonadi::Collection collection() const;
33 void setCollection(const Akonadi::Collection &c);
34
35 [[nodiscard]] Akonadi::EntityTreeModel *model() const;
36
37 bool addEvent(const KCalendarCore::Event::Ptr &event) override;
38 bool addTodo(const KCalendarCore::Todo::Ptr &todo) override;
39 bool addJournal(const KCalendarCore::Journal::Ptr &journal) override;
40
41 [[nodiscard]] bool hasRight(Akonadi::Collection::Right right) const;
42
43Q_SIGNALS:
44 /**
45 * @brief Emitted whenever an incidence is added, removed or changed
46 */
48
49private:
50 Q_DECLARE_PRIVATE(CollectionCalendar)
51};
52
53} // namespace Akonadi
The base class for all akonadi aware calendars.
Calendar representing a single Akonadi::Collection.
void calendarChanged()
Emitted whenever an incidence is added, removed or changed.
FreeBusyManager::Singleton.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:48:03 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.