Skip to content

Latest commit

 

History

History
119 lines (96 loc) · 4.94 KB

calendareventmodification.h

File metadata and controls

119 lines (96 loc) · 4.94 KB
 
Dec 20, 2020
Dec 20, 2020
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
/*
* Copyright (c) 2014 - 2019 Jolla Ltd.
* Copyright (c) 2020 Open Mobile Platform LLC.
*
* You may use this file under the terms of the BSD license as follows:
*
* "Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Nemo Mobile nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
*/
33
34
35
36
37
38
39
#ifndef CALENDAREVENTMODIFICATION_H
#define CALENDAREVENTMODIFICATION_H
#include <QObject>
#include "calendardata.h"
#include "calendarevent.h"
Aug 20, 2014
Aug 20, 2014
40
#include "calendareventoccurrence.h"
May 24, 2019
May 24, 2019
41
#include "calendarcontactmodel.h"
Mar 4, 2022
Mar 4, 2022
43
class CalendarEventModification : public CalendarEvent
Mar 4, 2022
Mar 4, 2022
46
47
// These properties already exist in the CalendarEvent class, but are redefined
// here to add WRITE access.
48
49
50
Q_PROPERTY(QString displayLabel READ displayLabel WRITE setDisplayLabel NOTIFY displayLabelChanged)
Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
Q_PROPERTY(bool allDay READ allDay WRITE setAllDay NOTIFY allDayChanged)
May 24, 2019
May 24, 2019
51
Q_PROPERTY(CalendarEvent::Recur recur READ recur WRITE setRecur NOTIFY recurChanged)
Jun 4, 2020
Jun 4, 2020
52
Q_PROPERTY(CalendarEvent::Days recurWeeklyDays READ recurWeeklyDays WRITE setRecurWeeklyDays NOTIFY recurWeeklyDaysChanged)
Jan 11, 2019
Jan 11, 2019
53
Q_PROPERTY(int reminder READ reminder WRITE setReminder NOTIFY reminderChanged)
Jan 28, 2021
Jan 28, 2021
54
Q_PROPERTY(QDateTime reminderDateTime READ reminderDateTime WRITE setReminderDateTime NOTIFY reminderDateTimeChanged)
55
56
Q_PROPERTY(QString location READ location WRITE setLocation NOTIFY locationChanged)
Q_PROPERTY(QString calendarUid READ calendarUid WRITE setCalendarUid NOTIFY calendarUidChanged)
Jan 31, 2022
Jan 31, 2022
57
Q_PROPERTY(CalendarEvent::SyncFailureResolution syncFailureResolution READ syncFailureResolution WRITE setSyncFailureResolution NOTIFY syncFailureResolutionChanged)
Mar 9, 2022
Mar 9, 2022
60
CalendarEventModification(const CalendarStoredEvent *source, const CalendarEventOccurrence *occurrence = 0, QObject *parent = 0);
May 24, 2019
May 24, 2019
61
62
explicit CalendarEventModification(QObject *parent = 0);
~CalendarEventModification();
63
64
65
66
67
68
void setDisplayLabel(const QString &displayLabel);
void setDescription(const QString &description);
QDateTime startTime() const;
Dec 20, 2020
Dec 20, 2020
69
Q_INVOKABLE void setStartTime(const QDateTime &startTime, Qt::TimeSpec spec, const QString &timezone = QString());
70
71
QDateTime endTime() const;
Dec 20, 2020
Dec 20, 2020
72
Q_INVOKABLE void setEndTime(const QDateTime &endTime, Qt::TimeSpec spec, const QString &timezone = QString());
73
74
75
void setAllDay(bool);
May 24, 2019
May 24, 2019
76
void setRecur(CalendarEvent::Recur);
77
78
79
80
Q_INVOKABLE void setRecurEndDate(const QDateTime &dateTime);
Q_INVOKABLE void unsetRecurEndDate();
Jun 4, 2020
Jun 4, 2020
81
82
void setRecurWeeklyDays(CalendarEvent::Days days);
Jan 11, 2019
Jan 11, 2019
83
void setReminder(int seconds);
Jan 11, 2019
Jan 11, 2019
84
Jan 28, 2021
Jan 28, 2021
85
86
void setReminderDateTime(const QDateTime &dateTime);
87
88
89
90
void setLocation(const QString &newLocation);
void setCalendarUid(const QString &uid);
Jan 31, 2022
Jan 31, 2022
91
92
void setSyncFailureResolution(CalendarEvent::SyncFailureResolution resolution);
May 24, 2019
May 24, 2019
93
94
Q_INVOKABLE void setAttendees(CalendarContactModel *required, CalendarContactModel *optional);
95
96
97
98
99
100
101
102
103
Q_INVOKABLE void save();
signals:
void displayLabelChanged();
void descriptionChanged();
void startTimeChanged();
void endTimeChanged();
void allDayChanged();
void recurChanged();
Jun 4, 2020
Jun 4, 2020
104
void recurWeeklyDaysChanged();
105
void reminderChanged();
Jan 28, 2021
Jan 28, 2021
106
void reminderDateTimeChanged();
107
108
109
110
void locationChanged();
void recurEndDateChanged();
void hasRecurEndDateChanged();
void calendarUidChanged();
Jan 31, 2022
Jan 31, 2022
111
void syncFailureResolutionChanged();
Mar 4, 2022
Mar 4, 2022
114
bool m_attendeesSet = false;
May 24, 2019
May 24, 2019
115
116
QList<CalendarData::EmailContact> m_requiredAttendees;
QList<CalendarData::EmailContact> m_optionalAttendees;