Commit 257d7608 authored by Laurent Montel's avatar Laurent Montel 😁

Add interface too

parent 2e285564
......@@ -111,6 +111,7 @@ set(messagecomposer_plugineditorinit_SRCS
plugineditorinit/plugineditorinitconfigurewidget.cpp
plugineditorinit/plugineditorinit.cpp
plugineditorinit/plugineditorinitmanager.cpp
plugineditorinit/plugineditorinitinterface.cpp
)
......@@ -215,6 +216,7 @@ ecm_generate_headers(MessageComposer_Camelplugineditorinit_HEADERS
PluginEditorInitConfigureWidget
PluginEditorInit
PluginEditorInitManager
PluginEditorInitInterface
REQUIRED_HEADERS MessageComposer_plugineditorinit_HEADERS
PREFIX MessageComposer
RELATIVE plugineditorinit
......
/*
Copyright (C) 2017 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "plugineditorinitinterface.h"
using namespace MessageComposer;
class MessageComposer::PluginEditorInitInterfacePrivate
{
public:
PluginEditorInitInterfacePrivate()
: mParentWidget(nullptr)
{
}
QWidget *mParentWidget;
};
PluginEditorInitInterface::PluginEditorInitInterface(QObject *parent)
: QObject(parent),
d(new MessageComposer::PluginEditorInitInterfacePrivate)
{
}
PluginEditorInitInterface::~PluginEditorInitInterface()
{
delete d;
}
void PluginEditorInitInterface::setParentWidget(QWidget *parent)
{
d->mParentWidget = parent;
}
QWidget *PluginEditorInitInterface::parentWidget() const
{
return d->mParentWidget;
}
void PluginEditorInitInterface::reloadConfig()
{
//Reimplement it
}
/*
Copyright (C) 2017 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef PLUGINEDITORINITINTERFACE_H
#define PLUGINEDITORINITINTERFACE_H
#include <QObject>
#include "messagecomposer_export.h"
namespace MessageComposer
{
class PluginEditorInitInterfacePrivate;
class PluginEditorInitParams;
class MESSAGECOMPOSER_EXPORT PluginEditorInitInterface : public QObject
{
Q_OBJECT
public:
explicit PluginEditorInitInterface(QObject *parent = nullptr);
~PluginEditorInitInterface();
virtual bool exec() = 0;
void setParentWidget(QWidget *parent);
QWidget *parentWidget() const;
public Q_SLOTS:
virtual void reloadConfig();
private:
PluginEditorInitInterfacePrivate *const d;
};
}
#endif // PLUGINEDITORINITINTERFACE_H
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