Kgapi

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

KDE's Doxygen guidelines are available online.