File indexing completed on 2024-05-12 05:22:13
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #pragma once 0010 0011 #include "kgapicalendar_export.h" 0012 #include "object.h" 0013 #include "types.h" 0014 0015 #include <KCalendarCore/Event> 0016 0017 #include <QScopedPointer> 0018 0019 namespace KGAPI2 0020 { 0021 0022 /** 0023 * @brief Represents a single event from Google Calendar 0024 * 0025 * @author Daniel Vrátil <dvratil@redhat.com> 0026 * @since 0.1 0027 */ 0028 class KGAPICALENDAR_EXPORT Event : public KGAPI2::Object, public KCalendarCore::Event 0029 { 0030 public: 0031 /** 0032 * @brief Constructor 0033 */ 0034 Event(); 0035 0036 /** 0037 * @brief Copy constructor 0038 */ 0039 Event(const Event &other); 0040 0041 /** 0042 * @brief Copy constructor 0043 */ 0044 explicit Event(const KCalendarCore::Event &event); 0045 0046 /** 0047 * @brief Destructor 0048 */ 0049 ~Event() override; 0050 0051 bool operator==(const Event &other) const; 0052 0053 /** 0054 * @brief Marks the event as deleted 0055 * 0056 * @param deleted 0057 */ 0058 void setDeleted(bool deleted); 0059 0060 /** 0061 * @brief Returns whether the event was removed 0062 */ 0063 [[nodiscard]] bool deleted() const; 0064 0065 /** 0066 * @brief Sets whether the event should use calendar's default reminders. 0067 * 0068 * @param useDefault 0069 */ 0070 void setUseDefaultReminders(bool useDefault); 0071 0072 /** 0073 * @brief Returns whether the event should use calendar's default reminders. 0074 */ 0075 [[nodiscard]] bool useDefaultReminders() const; 0076 0077 /** 0078 * @brief Returns ID used by Google to identify the event in calendar. 0079 * 0080 * This is not the same as UID. 0081 */ 0082 [[nodiscard]] QString id() const; 0083 0084 /** 0085 * @brief Sets event ID used by Google to identify the event in calendar. 0086 */ 0087 void setId(const QString &id); 0088 0089 /** 0090 * @brief Returns the hangout link for Google Meet. 0091 */ 0092 [[nodiscard]] QString hangoutLink() const; 0093 0094 /** 0095 * @brief Sets the hangout link for Google Meet. 0096 */ 0097 void setHangoutLink(const QString &id); 0098 0099 private: 0100 class Private; 0101 QScopedPointer<Private> const d; 0102 }; 0103 0104 } // namespace KGAPI