diff --git a/rpm/nemo-qml-plugin-calendar-qt5.spec b/rpm/nemo-qml-plugin-calendar-qt5.spec index 2078535e..bab94887 100644 --- a/rpm/nemo-qml-plugin-calendar-qt5.spec +++ b/rpm/nemo-qml-plugin-calendar-qt5.spec @@ -1,7 +1,7 @@ Name: nemo-qml-plugin-calendar-qt5 Summary: Calendar plugin for Nemo Mobile -Version: 0.6.9 +Version: 0.6.13 Release: 1 Group: System/Libraries License: BSD diff --git a/src/calendarevent.cpp b/src/calendarevent.cpp index adc41a7d..617f462c 100644 --- a/src/calendarevent.cpp +++ b/src/calendarevent.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2013 - 2019 Jolla Ltd. - * Copyright (c) 2020 Open Mobile Platform LLC. + * Copyright (c) 2020 - 2021 Open Mobile Platform LLC. * * You may use this file under the terms of the BSD license as follows: * @@ -192,6 +192,12 @@ bool CalendarEvent::sendResponse(int response) return mManager->sendResponse(mManager->getEvent(mUniqueId, mRecurrenceId), (Response)response); } +void CalendarEvent::deleteEvent() +{ + mManager->deleteEvent(mUniqueId, mRecurrenceId, QDateTime()); + mManager->save(); +} + QDateTime CalendarEvent::recurrenceId() const { return mRecurrenceId; diff --git a/src/calendarevent.h b/src/calendarevent.h index 622eaedf..42fdffce 100644 --- a/src/calendarevent.h +++ b/src/calendarevent.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2013 Jolla Ltd. - * Contact: Robin Burchell + * Copyright (c) 2013 - 2019 Jolla Ltd. + * Copyright (c) 2020 - 2021 Open Mobile Platform LLC. * * You may use this file under the terms of the BSD license as follows: * @@ -152,6 +152,7 @@ class CalendarEvent : public QObject Q_INVOKABLE bool sendResponse(int response); Q_INVOKABLE QString iCalendar(const QString &prodId = QString()) const; + Q_INVOKABLE void deleteEvent(); private slots: void notebookColorChanged(QString notebookUid); diff --git a/src/calendarimportevent.cpp b/src/calendarimportevent.cpp index b40bc96e..820bd7d4 100644 --- a/src/calendarimportevent.cpp +++ b/src/calendarimportevent.cpp @@ -1,6 +1,6 @@ /* - * Copyright (C) 2015 - 2019 Jolla Ltd. - * Copyright (C) 2020 Open Mobile Platform LLC. + * Copyright (c) 2015 - 2019 Jolla Ltd. + * Copyright (c) 2020 - 2021 Open Mobile Platform LLC. * * You may use this file under the terms of the BSD license as follows: * @@ -122,6 +122,11 @@ QString CalendarImportEvent::color() const return mColor; } +bool CalendarImportEvent::readOnly() const +{ + return true; +} + QString CalendarImportEvent::location() const { if (!mEvent) diff --git a/src/calendarimportevent.h b/src/calendarimportevent.h index f8583936..948d3d81 100644 --- a/src/calendarimportevent.h +++ b/src/calendarimportevent.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2015 - 2019 Jolla Ltd. - * Copyright (C) 2020 Open Mobile Platform LLC. + * Copyright (c) 2015 - 2019 Jolla Ltd. + * Copyright (c) 2020 - 2021 Open Mobile Platform LLC. * * You may use this file under the terms of the BSD license as follows: * @@ -60,6 +60,7 @@ class CalendarImportEvent : public QObject Q_PROPERTY(CalendarEvent::Secrecy secrecy READ secrecy CONSTANT) Q_PROPERTY(CalendarEvent::Response ownerStatus READ ownerStatus CONSTANT) Q_PROPERTY(bool rsvp READ rsvp CONSTANT) + Q_PROPERTY(bool readOnly READ readOnly CONSTANT) public: CalendarImportEvent(KCalendarCore::Event::Ptr event); @@ -74,6 +75,7 @@ class CalendarImportEvent : public QObject int reminder() const; QString uniqueId() const; QString color() const; + bool readOnly() const; QString location() const; QList attendees() const; CalendarEvent::Secrecy secrecy() const;