summaryrefslogtreecommitdiff
path: root/rockworkd/libpebble/calendarevent.h
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2016-02-11 23:55:16 +0100
committerAndrew Branson <andrew.branson@cern.ch>2016-02-11 23:55:16 +0100
commit29aaea2d80a9eb1715b6cddfac2d2aacf76358bd (patch)
tree012795b6bec16c72f38d33cff46324c9a0225868 /rockworkd/libpebble/calendarevent.h
launchpad ~mzanetti/rockwork/trunk r87
Diffstat (limited to 'rockworkd/libpebble/calendarevent.h')
-rw-r--r--rockworkd/libpebble/calendarevent.h69
1 files changed, 69 insertions, 0 deletions
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 <QString>
+#include <QStringList>
+#include <QDateTime>
+#include <QUuid>
+
+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