Kgapi

calendar.h
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
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 <QColor>
16#include <QScopedPointer>
17
18namespace KGAPI2
19{
20
21/**
22 * @brief An object that represents a Google calendar.
23 *
24 * @author Daniel Vrátil <dvratil@redhat.com>
25 * @since 0.1
26 */
27class KGAPICALENDAR_EXPORT Calendar : public KGAPI2::Object
28{
29public:
30 /**
31 * @brief Constructor
32 */
33 explicit Calendar();
34
35 /**
36 * @brief Copy constructor
37 */
38 Calendar(const Calendar &other);
39
40 /**
41 * @brief Destructor
42 */
43 ~Calendar() override;
44
45 bool operator==(const Calendar &other) const;
46
47 /**
48 * @brief Returns uID of the calendar.
49 */
50 [[nodiscard]] QString uid() const;
51
52 /**
53 * @brief Sets UID of the calendar.
54 *
55 * @param uid
56 */
57 void setUid(const QString &uid);
58
59 /**
60 * @brief Returns calendar title (name).
61 */
62 [[nodiscard]] QString title() const;
63
64 /**
65 * @brief Sets a calendar title (name).
66 *
67 * @param title
68 */
69 void setTitle(const QString &title);
70
71 /**
72 * @brief Returns detailed description of the calendar.
73 */
74 [[nodiscard]] QString details() const;
75
76 /**
77 * @brief Sets detailed description of a calendar.
78 *
79 * @param details
80 */
81 void setDetails(const QString &details);
82
83 /**
84 * @brief Returns geographic location of the calendar.
85 */
86 [[nodiscard]] QString location() const;
87
88 /**
89 * @brief Sets geographic location of the calendar.
90 *
91 * @param location
92 */
93 void setLocation(const QString &location);
94
95 /**
96 * @brief Returns timezone of the calendar.
97 */
98 [[nodiscard]] QString timezone() const;
99
100 /**
101 * @brief Sets timezone of the calendar.
102 *
103 * @param timezone
104 */
105 void setTimezone(const QString &timezone);
106
107 /**
108 * @brief Returns whether calendar is editable or read-only.
109 */
110 [[nodiscard]] bool editable() const;
111
112 /**
113 * @brief Sets calendar to read-only or editable.
114 *
115 * @param editable
116 */
117 void setEditable(const bool editable);
118
119 /**
120 * @brief Sets default reminders for all new events in the calendar.
121 *
122 * @param reminders
123 */
124 void setDefaultReminders(const RemindersList &reminders);
125
126 /**
127 * @brief Adds a default reminder for all events in the calendar.
128 *
129 * @param reminder
130 */
131 void addDefaultReminer(const ReminderPtr &reminder);
132
133 /**
134 * @brief Returns default reminders for all events in the calendar.
135 */
136 RemindersList defaultReminders() const;
137
138 /**
139 * @brief Returns calendar background color.
140 *
141 * @since 2.1
142 */
143 [[nodiscard]] QColor backgroundColor() const;
144
145 /**
146 * @brief Sets calendar background color.
147 *
148 * @param color
149 *
150 * @since 2.1
151 */
152 void setBackgroundColor(const QColor &color);
153
154 /**
155 * @brief Returns calendar foreground color.
156 *
157 * @since 2.1
158 */
159 [[nodiscard]] QColor foregroundColor() const;
160
161 /**
162 * @brief Sets calendar foreground color
163 *
164 * @param color
165 *
166 * @since 2.1
167 */
168 void setForegroundColor(const QColor &color);
169
170protected:
171 class Private;
173};
174
175} // namespace KGAPI2
An object that represents a Google calendar.
Definition calendar.h:28
~Calendar() override
Destructor.
Base class for all objects.
Definition object.h:31
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:17:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.