Attica 5.109.0
event.h
1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2009 Eckhart Wörner <ewoerner@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8
9#ifndef ATTICA_EVENT_H
10#define ATTICA_EVENT_H
11
12#include "attica_export.h"
13
14#include <QDate>
15#include <QList>
16#include <QMap>
17#include <QSharedDataPointer>
18#include <QUrl>
19
20namespace Attica
21{
27class ATTICA_EXPORT Event
28{
29public:
30 typedef QList<Event> List;
31 class Parser;
32
37
42 Event(const Event &other);
43
49 Event &operator=(const Event &other);
50
55
61 void setId(const QString &id);
62
68 QString id() const;
69
74 void setName(const QString &name);
75
80 QString name() const;
81
86 void setDescription(const QString &description);
87
92 QString description() const;
93
98 void setUser(const QString &user);
99
104 QString user() const;
105
110 void setStartDate(const QDate &startDate);
111
116 QDate startDate() const;
117
122 void setEndDate(const QDate &endDate);
123
128 QDate endDate() const;
129
134 void setLatitude(qreal latitude);
135
140 qreal latitude() const;
141
146 void setLongitude(qreal longitude);
147
152 qreal longitude() const;
153
158 void setHomepage(const QUrl &homepage);
159
164 QUrl homepage() const;
165
170 void setCountry(const QString &country);
171
176 QString country() const;
177
182 void setCity(const QString &city);
183
188 QString city() const;
189
196 void addExtendedAttribute(const QString &key, const QString &value);
197
203 QString extendedAttribute(const QString &key) const;
204
209 QMap<QString, QString> extendedAttributes() const;
210
215 bool isValid() const;
216
217private:
218 class Private;
219 QSharedDataPointer<Private> d;
220};
221
222}
223
224#endif
Represents a single event.
Definition event.h:28
QUrl homepage() const
Gets the homepage of the Event.
void setEndDate(const QDate &endDate)
Sets the end date of the Event.
QString name() const
Gets the name of the Event.
void setUser(const QString &user)
Sets the id of the user bound to the Event.
QString country() const
Gets the country where the Event takes place.
Event()
Creates an empty Event.
~Event()
Destructor.
void setLongitude(qreal longitude)
Sets the longitude of the position the Event takes place.
QString city() const
Gets the city where the Event takes place.
void setLatitude(qreal latitude)
Sets the latitude of the position the Event takes place.
QMap< QString, QString > extendedAttributes() const
Get all attributes that are not included in the basis set of attributes exposed by the Event class.
void setCountry(const QString &country)
Sets the country where the Event takes place.
qreal latitude() const
Gets the latitude of the position the Event takes place.
void setStartDate(const QDate &startDate)
Sets the start date of the Event.
void setCity(const QString &city)
Sets the city where the Event takes place.
Event & operator=(const Event &other)
Assignment operator.
QString extendedAttribute(const QString &key) const
Get an attribute that is not included in the basis set of attributes exposed by the Event class.
bool isValid() const
Checks whether this Event has an id.
Event(const Event &other)
Copy constructor.
void setId(const QString &id)
Sets the id of the Event.
QString user() const
Gets the id of the user bound to the Event.
QDate startDate() const
Gets the start date of the Event.
QDate endDate() const
Gets the start date of the Event.
QString id() const
Gets the id of the Event.
void addExtendedAttribute(const QString &key, const QString &value)
Add an attribute that is not included in the basis set of attributes exposed by the Event class.
void setHomepage(const QUrl &homepage)
Sets the homepage of the Event.
QString description() const
Gets the description of the Event.
void setDescription(const QString &description)
Sets the description of the Event.
void setName(const QString &name)
Sets the name of the Event.
qreal longitude() const
Gets the longitude of the position the Event takes place.
The Attica namespace,.
Definition activity.h:21