Commit 20c3c979 authored by flypig's avatar flypig

Merge branch 'jb46945' into 'master'

Add deleteEvent() method to CalendarEvent

See merge request !71
parents cb019e29 a99f8774
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
......
/*
* 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;
......
/*
* Copyright (C) 2013 Jolla Ltd.
* Contact: Robin Burchell <robin.burchell@jollamobile.com>
* 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 @@ public:
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);
......
/*
* 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)
......
/*
* 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 @@ public:
int reminder() const;
QString uniqueId() const;
QString color() const;
bool readOnly() const;
QString location() const;
QList<QObject*> attendees() const;
CalendarEvent::Secrecy secrecy() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment