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{
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;
40
41 [[nodiscard]] bool hasRight(Akonadi::Collection::Right right) const;
42
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.
void calendarChanged()
Emitted whenever an incidence is added, removed or changed.
bool addJournal(const KCalendarCore::Journal::Ptr &journal) override
Adds a Journal to the calendar.
bool addEvent(const KCalendarCore::Event::Ptr &event) override
Adds an Event to the calendar.
bool addTodo(const KCalendarCore::Todo::Ptr &todo) override
Adds a Todo to the calendar.
QSharedPointer< Event > Ptr
QSharedPointer< Journal > Ptr
Todo::Ptr todo(const QString &uid, const QDateTime &recurrenceId={}) const override
Event::Ptr event(const QString &uid, const QDateTime &recurrenceId={}) const override
Journal::Ptr journal(const QString &uid, const QDateTime &recurrenceId={}) const override
QSharedPointer< Todo > Ptr
FreeBusyManager::Singleton.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:53:46 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.