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

Improve plugin interface

parent 071dde0f
......@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
set(MESSAGELIB_LIB_VERSION "5.1.46")
set(MESSAGELIB_LIB_VERSION "5.1.47")
set(KF5_VERSION "5.17.0")
set(KDEPIMLIBS_LIB_VERSION "5.1.42")
......
......@@ -108,7 +108,33 @@ bool PluginEditorInterface::hasConfigureDialog() const
return false;
}
bool MessageComposer::PluginEditorInterface::hasToolBarSupport() const
{
return false;
}
void PluginEditorInterface::showConfigureDialog(QWidget *parentWidget)
{
Q_UNUSED(parentWidget);
}
QString PluginEditorInterface::actionXmlExtension(ActionType::Type type)
{
switch(type) {
case MessageComposer::ActionType::Tools:
return QStringLiteral("_plugins_tools");
case MessageComposer::ActionType::Edit:
return QStringLiteral("_plugins_edit");
case MessageComposer::ActionType::File:
return QStringLiteral("_plugins_file");
case MessageComposer::ActionType::Action:
return QStringLiteral("_plugins_actions");
case MessageComposer::ActionType::PopupMenu:
return QStringLiteral("_popupmenu_actions");
case MessageComposer::ActionType::ToolBar:
return QStringLiteral("_toolbar_actions");
}
return {};
}
......@@ -38,7 +38,8 @@ public:
Edit = 1,
File = 2,
Action = 3,
PopupMenu = 4
PopupMenu = 4,
ToolBar = 5
};
ActionType();
......@@ -74,9 +75,10 @@ public:
virtual bool hasPopupMenuSupport() const;
virtual bool hasConfigureDialog() const;
virtual bool hasToolBarSupport() const;
virtual void showConfigureDialog(QWidget *parentWidget = Q_NULLPTR);
static QString actionXmlExtension(ActionType::Type type);
Q_SIGNALS:
void emitPluginActivated(MessageComposer::PluginEditorInterface *interface);
......
......@@ -20,6 +20,7 @@
#include <QFileInfo>
#include <QSet>
#include <QDebug>
#include <KPluginLoader>
#include <kpluginmetadata.h>
#include <KPluginFactory>
......@@ -132,7 +133,6 @@ PluginEditorManager::PluginEditorManager(QObject *parent)
: QObject(parent),
d(new MessageComposer::PluginEditorManagerPrivate(this))
{
}
PluginEditorManager::~PluginEditorManager()
......
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