-
Notifications
You must be signed in to change notification settings - Fork 6
/
calendarevent.cpp
132 lines (108 loc) · 1.88 KB
/
calendarevent.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#include "calendarevent.h"
namespace watchfish
{
struct CalendarEventData : public QSharedData
{
QString uid;
QDateTime start;
QDateTime end;
QDateTime alertTime;
QString title;
QString location;
QString description;
bool allDay;
};
CalendarEvent::CalendarEvent() : data(new CalendarEventData)
{
}
CalendarEvent::CalendarEvent(const CalendarEvent &rhs) : data(rhs.data)
{
}
CalendarEvent &CalendarEvent::operator=(const CalendarEvent &rhs)
{
if (this != &rhs)
data.operator=(rhs.data);
return *this;
}
CalendarEvent::~CalendarEvent()
{
}
QString CalendarEvent::uid() const
{
return data->uid;
}
void CalendarEvent::setUid(const QString &v)
{
if (data->uid != v) {
data->uid = v;
}
}
QDateTime CalendarEvent::start() const
{
return data->start;
}
void CalendarEvent::setStart(const QDateTime &v)
{
if (data->start != v) {
data->start = v;
}
}
QDateTime CalendarEvent::end() const
{
return data->end;
}
void CalendarEvent::setEnd(const QDateTime &v)
{
if (data->end != v) {
data->end = v;
}
}
QDateTime CalendarEvent::alertTime() const
{
return data->alertTime;
}
void CalendarEvent::setAlertTime(const QDateTime &v)
{
if (data->alertTime != v) {
data->alertTime = v;
}
}
QString CalendarEvent::title() const
{
return data->title;
}
void CalendarEvent::setTitle(const QString &v)
{
if (data->title != v) {
data->title = v;
}
}
QString CalendarEvent::location() const
{
return data->location;
}
void CalendarEvent::setLocation(const QString &v)
{
if (data->location != v) {
data->location = v;
}
}
QString CalendarEvent::description() const
{
return data->description;
}
void CalendarEvent::setDescription(const QString &v)
{
if (data->description != v) {
data->description = v;
}
}
bool CalendarEvent::allDay() const {
return data->allDay;
}
void CalendarEvent::setAllDay(bool allDay) {
if (data->allDay != allDay) {
data->allDay = allDay;
}
}
}