SPDX-FileCopyrightText: 2015 Martin Klapetek <mklapetek@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include "calendareventsplugin.h"
#include <QSharedData>
class CalendarEvents::EventData::Private : public QSharedData
{
public:
Private()
: isAllDay(false)
, isMinor(false)
{
}
Private(const Private &other)
: QSharedData(other)
{
startDateTime = other.startDateTime;
endDateTime = other.endDateTime;
title = other.title;
description = other.description;
uid = other.uid;
eventColor = other.eventColor;
type = other.type;
isAllDay = other.isAllDay;
isMinor = other.isMinor;
}
~Private()
{
}
QDateTime startDateTime;
QDateTime endDateTime;
QString title;
QString description;
QString uid;
QString eventColor;
EventType type;
bool isAllDay;
bool isMinor;
};
namespace CalendarEvents
{
EventData::EventData()
: d(new Private())
{
}
EventData::EventData(const EventData &other)
: d(other.d)
{
}
EventData::~EventData()
{
}
EventData &EventData::operator=(const EventData &other)
{
if (this == &other) {
return *this;
}
d = other.d;
return *this;
}
QDateTime EventData::startDateTime() const
{
return d->startDateTime;
}
void EventData::setStartDateTime(const QDateTime &startDateTime)
{
d->startDateTime = startDateTime;
}
QDateTime EventData::endDateTime() const
{
return d->endDateTime;
}
void EventData::setEndDateTime(const QDateTime &endDateTime)
{
d->endDateTime = endDateTime;
}
bool EventData::isAllDay() const
{
return d->isAllDay;
}
void EventData::setIsAllDay(bool isAllDay)
{
d->isAllDay = isAllDay;
}
bool EventData::isMinor() const
{
return d->isMinor;
}
void EventData::setIsMinor(bool isMinor)
{
d->isMinor = isMinor;
}
QString EventData::title() const
{
return d->title;
}
void EventData::setTitle(const QString &title)
{
d->title = title;
}
QString EventData::description() const
{
return d->description;
}
void EventData::setDescription(const QString &description)
{
d->description = description;
}
QString EventData::uid() const
{
return d->uid;
}
void EventData::setUid(const QString &uid)
{
d->uid = uid;
}
EventData::EventType EventData::type() const
{
return d->type;
}
void EventData::setEventType(EventData::EventType type)
{
d->type = type;
}
QString EventData::eventColor() const
{
return d->eventColor;
}
void EventData::setEventColor(const QString &color)
{
d->eventColor = color;
}
}