Commit 4aedf658 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Remove unneeded superclass from decoration class

parent 4f90ad96
Pipeline #169742 passed with stage
in 4 minutes and 16 seconds
......@@ -136,8 +136,9 @@ QUrl StoredElement::url() const
////////////////////////////////////////////////////////////////////////////////
Decoration::Decoration(QObject *parent, const QVariantList &args)
: CalendarSupport::Plugin(parent, args)
: QObject(parent)
{
Q_UNUSED(args)
}
Decoration::~Decoration()
......@@ -258,6 +259,10 @@ Element::List Decoration::createYearElements(const QDate &)
return {};
}
void Decoration::configure(QWidget *)
{
}
QDate Decoration::weekDate(QDate date)
{
QDate result = date;
......
......@@ -7,12 +7,12 @@
#include "eventviews_export.h"
#include <CalendarSupport/Plugin>
#include <QUrl>
#include <QDate>
#include <QMap>
#include <QPixmap>
#include <QVariant>
namespace EventViews
{
......@@ -137,21 +137,11 @@ protected:
The decoration is made of various decoration elements,
which show a defined text/picture/widget for a given date.
*/
class EVENTVIEWS_EXPORT Decoration : public CalendarSupport::Plugin
class EVENTVIEWS_EXPORT Decoration : public QObject
{
Q_OBJECT
public:
static int interfaceVersion()
{
return 2;
}
static QString serviceType()
{
return QStringLiteral("Calendar/Decoration");
}
using List = QList<Decoration *>;
Decoration(QObject *parent = nullptr, const QVariantList &args = {});
......@@ -177,6 +167,10 @@ public:
*/
virtual Element::List yearElements(const QDate &d);
virtual void configure(QWidget *);
virtual QString info() const = 0;
protected:
/**
Register the given elements for the given date. They will be deleted when
......
Supports Markdown
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