Akonadi Calendar

fetchjobcalendar.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 #pragma once
9 
10 #include "akonadi-calendar_export.h"
11 #include "calendarbase.h"
12 
13 #include <item.h>
14 
15 namespace Akonadi
16 {
17 class FetchJobCalendarPrivate;
18 /**
19  * @short A KCalendarCore::Calendar that uses a one time IncidenceFetchJob to populate itself.
20  *
21  * If you want a persistent calendar ( which monitors Akonadi for changes )
22  * use an ETMCalendar.
23  *
24  * @see ETMCalendar
25  * @see CalendarBase
26  *
27  * @author Sérgio Martins <[email protected]>
28  * @since 4.11
29  */
30 class AKONADI_CALENDAR_EXPORT FetchJobCalendar : public Akonadi::CalendarBase
31 {
32  Q_OBJECT
33 public:
35 
36  /**
37  * Creates a new FetchJobCalendar. Loading begins asynchronously.
38  * @see loadFinished()
39  */
40  explicit FetchJobCalendar(QObject *parent = nullptr);
41 
42  /**
43  * Destroys this FetchJobCalendar.
44  */
45  ~FetchJobCalendar() override;
46 
47  /**
48  * Returns if the calendar already finished loading.
49  * This is an alternative to listening for the loadFinished() signal.
50  */
51  Q_REQUIRED_RESULT bool isLoaded() const override;
52 
53 Q_SIGNALS:
54  /**
55  * This signal is emitted when the IncidenceFetchJob finishes.
56  * @param success the success of the operation
57  * @param errorMessage if @p success is false, contains the error message
58  */
59  void loadFinished(bool success, const QString &errorMessage);
60 
61 private:
62  Q_DECLARE_PRIVATE(FetchJobCalendar)
63 };
64 }
65 
KCALUTILS_EXPORT QString errorMessage(const KCalendarCore::Exception &exception)
FreeBusyManager::Singleton.
A KCalendarCore::Calendar that uses a one time IncidenceFetchJob to populate itself.
The base class for all akonadi aware calendars.
Definition: calendarbase.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun May 16 2021 23:12:13 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.