diff --git a/src/datatypes/event.cpp b/src/datatypes/event.cpp index 920dab4..1c2eba7 100644 --- a/src/datatypes/event.cpp +++ b/src/datatypes/event.cpp @@ -1,50 +1,54 @@ /* Copyright (C) 2018 Volker Krause This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "event.h" #include "datatypes_p.h" #include #include using namespace KItinerary; namespace KItinerary { class EventPrivate: public QSharedData { public: QString name; + QString description; + QUrl image; QUrl url; QDateTime startDate; QDateTime endDate; QDateTime doorTime; QVariant location; }; KITINERARY_MAKE_SIMPLE_CLASS(Event) KITINERARY_MAKE_PROPERTY(Event, QString, name, setName) +KITINERARY_MAKE_PROPERTY(Event, QString, description, setDescription) +KITINERARY_MAKE_PROPERTY(Event, QUrl, image, setImage) KITINERARY_MAKE_PROPERTY(Event, QUrl, url, setUrl) KITINERARY_MAKE_PROPERTY(Event, QDateTime, startDate, setStartDate) KITINERARY_MAKE_PROPERTY(Event, QDateTime, endDate, setEndDate) KITINERARY_MAKE_PROPERTY(Event, QDateTime, doorTime, setDoorTime) KITINERARY_MAKE_PROPERTY(Event, QVariant, location, setLocation) KITINERARY_MAKE_OPERATOR(Event) } #include "moc_event.cpp" diff --git a/src/datatypes/event.h b/src/datatypes/event.h index d42e1ce..b590326 100644 --- a/src/datatypes/event.h +++ b/src/datatypes/event.h @@ -1,50 +1,52 @@ /* Copyright (C) 2018 Volker Krause This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef KITINERARY_EVENT_H #define KITINERARY_EVENT_H #include "kitinerary_export.h" #include "datatypes.h" namespace KItinerary { class EventPrivate; /** An event. * @see https://schema.org/Event * @see https://developers.google.com/gmail/markup/reference/event-reservation */ class KITINERARY_EXPORT Event { KITINERARY_GADGET(Event) KITINERARY_PROPERTY(QString, name, setName) + KITINERARY_PROPERTY(QString, description, setDescription) + KITINERARY_PROPERTY(QUrl, image, setImage) KITINERARY_PROPERTY(QUrl, url, setUrl) KITINERARY_PROPERTY(QDateTime, startDate, setStartDate) KITINERARY_PROPERTY(QDateTime, endDate, setEndDate) KITINERARY_PROPERTY(QDateTime, doorTime, setDoorTime) KITINERARY_PROPERTY(QVariant, location, setLocation) private: QExplicitlySharedDataPointer d; }; } Q_DECLARE_METATYPE(KItinerary::Event) #endif // KITINERARY_EVENT_H