Commit f1de1a83 authored by Laurent Montel's avatar Laurent Montel 😁

improve plugin support

parent cbf7588b
......@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
set(PIM_VERSION "5.2.70")
set(PIM_VERSION "5.2.71")
set(MESSAGELIB_LIB_VERSION ${PIM_VERSION})
set(KDEPIMLIBS_LIB_VERSION "5.2.40")
......
......@@ -41,3 +41,14 @@ PluginEditorCheckBeforeSend::~PluginEditorCheckBeforeSend()
{
delete d;
}
bool PluginEditorCheckBeforeSend::hasConfigureDialog() const
{
return false;
}
PluginEditorCheckBeforeSendConfigureWidgetSetting PluginEditorCheckBeforeSend::createConfigureWidget(QWidget *parent) const
{
Q_UNUSED(parent);
return {};
}
......@@ -26,6 +26,26 @@ namespace MessageComposer
{
class PluginEditorCheckBeforeSendPrivate;
class PluginEditorCheckBeforeSendInterface;
class PluginEditorCheckBeforeSendConfigureWidget;
struct MESSAGECOMPOSER_EXPORT PluginEditorCheckBeforeSendConfigureWidgetSetting {
PluginEditorCheckBeforeSendConfigureWidgetSetting()
: configureWidget(Q_NULLPTR)
{
}
PluginEditorCheckBeforeSendConfigureWidgetSetting(MessageComposer::PluginEditorCheckBeforeSendConfigureWidget *w, const QString &widgetName)
: name(widgetName),
configureWidget(w)
{
}
QString name;
MessageComposer::PluginEditorCheckBeforeSendConfigureWidget *configureWidget;
};
class MESSAGECOMPOSER_EXPORT PluginEditorCheckBeforeSend : public QObject
{
Q_OBJECT
......@@ -35,6 +55,11 @@ public:
virtual PluginEditorCheckBeforeSendInterface *createInterface(QObject *parent) = 0;
virtual bool hasConfigureDialog() const;
virtual PluginEditorCheckBeforeSendConfigureWidgetSetting createConfigureWidget(QWidget *parent) const;
private:
PluginEditorCheckBeforeSendPrivate *const d;
};
......
......@@ -45,17 +45,6 @@ PluginEditorCheckBeforeSendInterface::~PluginEditorCheckBeforeSendInterface()
delete d;
}
bool PluginEditorCheckBeforeSendInterface::hasConfigureDialog() const
{
return false;
}
PluginEditorCheckBeforeSendConfigureWidget *PluginEditorCheckBeforeSendInterface::createConfigureWidget(QWidget *parent) const
{
Q_UNUSED(parent);
return {};
}
void PluginEditorCheckBeforeSendInterface::setParentWidget(QWidget *parent)
{
d->mParentWidget = parent;
......
......@@ -33,10 +33,6 @@ public:
explicit PluginEditorCheckBeforeSendInterface(QObject *parent = Q_NULLPTR);
~PluginEditorCheckBeforeSendInterface();
virtual bool hasConfigureDialog() const;
virtual PluginEditorCheckBeforeSendConfigureWidget *createConfigureWidget(QWidget *parent) const;
virtual bool exec() = 0;
void setParentWidget(QWidget *parent);
......
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