From 29aaea2d80a9eb1715b6cddfac2d2aacf76358bd Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Thu, 11 Feb 2016 23:55:16 +0100 Subject: launchpad ~mzanetti/rockwork/trunk r87 --- rockworkd/libpebble/calendarevent.h | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 rockworkd/libpebble/calendarevent.h (limited to 'rockworkd/libpebble/calendarevent.h') diff --git a/rockworkd/libpebble/calendarevent.h b/rockworkd/libpebble/calendarevent.h new file mode 100644 index 0000000..5361a48 --- /dev/null +++ b/rockworkd/libpebble/calendarevent.h @@ -0,0 +1,69 @@ +#ifndef CALENDAREVENT_H +#define CALENDAREVENT_H + +#include +#include +#include +#include + +class CalendarEvent +{ +public: + CalendarEvent(); + + bool isValid() const; + + QString id() const; + void setId(const QString &id); + + QUuid uuid() const; + void generateNewUuid(); + + QString title() const; + void setTitle(const QString &title); + + QString description() const; + void setDescription(const QString &description); + + QDateTime startTime() const; + void setStartTime(const QDateTime &startTime); + + QDateTime endTime() const; + void setEndTime(const QDateTime &endTime); + + QString location() const; + void setLocation(const QString &location); + + QString calendar() const; + void setCalendar(const QString &calendar); + + QString comment() const; + void setComment(const QString &comment); + + QStringList guests() const; + void setGuests(const QStringList &guests); + + bool recurring() const; + void setRecurring(bool recurring); + + bool operator==(const CalendarEvent &other) const; + + void saveToCache(const QString &cachePath) const; + void loadFromCache(const QString &cachePath, const QString &uuid); + void removeFromCache(const QString &cachePath) const; + +private: + QString m_id; + QUuid m_uuid; + QString m_title; + QString m_description; + QDateTime m_startTime; + QDateTime m_endTime; + QString m_location; + QString m_calendar; + QString m_comment; + QStringList m_guests; + bool m_recurring = false; +}; + +#endif // CALENDAREVENT_H -- cgit v1.2.3