Commit 1def5b92 authored by Laurent Montel's avatar Laurent Montel 😁

Start to implement "add template command" in composer

parent 638772af
......@@ -6,3 +6,4 @@ add_subdirectory(nonbreakingspace)
add_subdirectory(autocorrection)
add_subdirectory(insertemail)
add_subdirectory(insertshorturl)
add_subdirectory(inserttemplatecommand)
/*
Copyright (C) 2018 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 "inserttemplatecommandplugineditor.h"
#include "inserttemplatecommandplugineditorinterface.h"
#include <kpluginfactory.h>
K_PLUGIN_FACTORY_WITH_JSON(InsertTemplateCommandPluginEditorFactory, "kmail_inserttemplatecommandeditorplugin.json", registerPlugin<InsertTemplateCommandPluginEditor>();
)
InsertTemplateCommandPluginEditor::InsertTemplateCommandPluginEditor(QObject *parent, const QList<QVariant> &)
: MessageComposer::PluginEditor(parent)
{
}
InsertTemplateCommandPluginEditor::~InsertTemplateCommandPluginEditor()
{
}
MessageComposer::PluginEditorInterface *InsertTemplateCommandPluginEditor::createInterface(KActionCollection *ac, QObject *parent)
{
InsertTemplateCommandPluginEditorInterface *interface = new InsertTemplateCommandPluginEditorInterface(parent);
interface->createAction(ac);
return interface;
}
#include "inserttemplatecommandplugineditor.moc"
/*
Copyright (C) 2018 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 INSERTTEMPLATECOMMANDPLUGINEDITOR_H
#define INSERTTEMPLATECOMMANDPLUGINEDITOR_H
#include <messagecomposer/plugineditor.h>
#include <messagecomposer/plugineditorinterface.h>
#include <QVariant>
class InsertTemplateCommandPluginEditor : public MessageComposer::PluginEditor
{
Q_OBJECT
public:
explicit InsertTemplateCommandPluginEditor(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
~InsertTemplateCommandPluginEditor();
MessageComposer::PluginEditorInterface *createInterface(KActionCollection *ac, QObject *parent = nullptr) override;
};
#endif
{
"KPlugin": {
"Description": "This plugin allows you to insert a templace command in composer.",
"EnabledByDefault": "true",
"Id": "kmailinserttemplatecommand",
"Name": "Insert Template Command",
"ServiceTypes": [
"KMailEditor/Plugin"
],
"Version": "1.0"
},
"X-KDE-KMailEditor-Order": "2"
}
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