Kgapi

calendar/event.h
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * SPDX-FileCopyrightText: 2013 Daniel Vrátil <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #pragma once
10 
11 #include "kgapicalendar_export.h"
12 #include "object.h"
13 #include "types.h"
14 
15 #include <KCalendarCore/Event>
16 
17 #include <QScopedPointer>
18 
19 namespace KGAPI2
20 {
21 
22 /**
23  * @brief Represents a single event from Google Calendar
24  *
25  * @author Daniel Vrátil <[email protected]>
26  * @since 0.1
27  */
28 class KGAPICALENDAR_EXPORT Event : public KGAPI2::Object, public KCalendarCore::Event
29 {
30 public:
31  /**
32  * @brief Constructor
33  */
34  Event();
35 
36  /**
37  * @brief Copy constructor
38  */
39  Event(const Event &other);
40 
41  /**
42  * @brief Copy constructor
43  */
44  explicit Event(const KCalendarCore::Event &event);
45 
46  /**
47  * @brief Destructor
48  */
49  ~Event() override;
50 
51  bool operator==(const Event &other) const;
52 
53  /**
54  * @brief Marks the event as deleted
55  *
56  * @param deleted
57  */
58  void setDeleted(bool deleted);
59 
60  /**
61  * @brief Returns whether the event was removed
62  */
63  [[nodiscard]] bool deleted() const;
64 
65  /**
66  * @brief Sets whether the event should use calendar's default reminders.
67  *
68  * @param useDefault
69  */
70  void setUseDefaultReminders(bool useDefault);
71 
72  /**
73  * @brief Returns whether the event should use calendar's default reminders.
74  */
75  [[nodiscard]] bool useDefaultReminders() const;
76 
77  /**
78  * @brief Returns ID used by Google to identify the event in calendar.
79  *
80  * This is not the same as UID.
81  */
82  [[nodiscard]] QString id() const;
83 
84  /**
85  * @brief Sets event ID used by Google to identify the event in calendar.
86  */
87  void setId(const QString &id);
88 
89  /**
90  * @brief Returns the hangout link for Google Meet.
91  */
92  [[nodiscard]] QString hangoutLink() const;
93 
94  /**
95  * @brief Sets the hangout link for Google Meet.
96  */
97  void setHangoutLink(const QString &id);
98 
99 private:
100  class Private;
101  QScopedPointer<Private> const d;
102 };
103 
104 } // namespace KGAPI
Represents a single event from Google Calendar.
Base class for all objects.
Definition: object.h:30
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:15
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:53:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.