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

Add interface

parent a94d5822
set(kmail_checkbeforesendeditorplugin_SRCS
checkbeforesendplugin.cpp
checkbeforesendinterface.cpp
)
ecm_qt_declare_logging_category(kmail_checkbeforesendeditorplugin_SRCS HEADER checkbeforesendplugin_debug.h IDENTIFIER KMAIL_EDITOR_checkbeforesend_PLUGIN_LOG CATEGORY_NAME log_kmail_checkbeforesendplugin)
......
/*
Copyright (C) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "checkbeforesendinterface.h"
CheckBeforeSendInterface::CheckBeforeSendInterface(QObject *parent)
: MessageComposer::PluginEditorCheckBeforeSendInterface(parent)
{
}
CheckBeforeSendInterface::~CheckBeforeSendInterface()
{
}
bool CheckBeforeSendInterface::exec(const MessageComposer::PluginEditorCheckBeforeSendParams &params)
{
//TODO
return true;
}
void CheckBeforeSendInterface::reloadConfig()
{
//TODO
}
/*
Copyright (C) 2016 Montel Laurent <montel@kde.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This program 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
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CHECKBEFORESENDINTERFACE_H
#define CHECKBEFORESENDINTERFACE_H
#include <MessageComposer/PluginEditorCheckBeforeSendInterface>
class CheckBeforeSendInterface : public MessageComposer::PluginEditorCheckBeforeSendInterface
{
Q_OBJECT
public:
explicit CheckBeforeSendInterface(QObject *parent = Q_NULLPTR);
~CheckBeforeSendInterface();
bool exec(const MessageComposer::PluginEditorCheckBeforeSendParams &params) Q_DECL_OVERRIDE;
public Q_SLOTS:
void reloadConfig() Q_DECL_OVERRIDE;
};
#endif // CHECKBEFORESENDINTERFACE_H
......@@ -19,6 +19,11 @@
#include "checkbeforesendplugin.h"
#include <KLocalizedString>
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(ChangeCasePluginEditorFactory, "kmail_checkbeforesendplugin.json", registerPlugin<CheckBeforeSendPlugin>();)
CheckBeforeSendPlugin::CheckBeforeSendPlugin(QObject *parent, const QList<QVariant> &)
: MessageComposer::PluginEditorCheckBeforeSend(parent)
{
......@@ -47,3 +52,5 @@ MessageComposer::PluginEditorCheckBeforeSendConfigureWidgetSetting CheckBeforeSe
//TODO
return {};
}
#include "checkbeforesendplugin.moc"
{
"KPlugin": {
"Name": "Check Before Send",
"ServiceTypes": [
"KMailEditor/PluginCheckBeforeSend"
],
"Version": "1.0"
}
}
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