[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim-addons] kmail/editorplugins: Start to implement "add template command" in composer
From: Laurent Montel <null () kde ! org>
Date: 2018-01-31 20:45:13
Message-ID: E1egzFp-0008TM-Oz () code ! kde ! org
[Download RAW message or body]
Git commit 1def5b92433fac4c4b1b2478053d16b3834a1600 by Laurent Montel.
Committed on 31/01/2018 at 20:44.
Pushed by mlaurent into branch 'master'.
Start to implement "add template command" in composer
M +1 -0 kmail/editorplugins/CMakeLists.txt
A +0 -0 kmail/editorplugins/inserttemplatecommand/CMakeLists.txt
A +43 -0 kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.cpp \
[License: GPL (v2+)] A +38 -0 \
kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.h \
[License: GPL (v2+)] A +13 -0 \
kmail/editorplugins/inserttemplatecommand/kmail_inserttemplatecommandeditorplugin.json
https://commits.kde.org/kdepim-addons/1def5b92433fac4c4b1b2478053d16b3834a1600
diff --git a/kmail/editorplugins/CMakeLists.txt b/kmail/editorplugins/CMakeLists.txt
index aab0eb45..39c6d949 100644
--- a/kmail/editorplugins/CMakeLists.txt
+++ b/kmail/editorplugins/CMakeLists.txt
@@ -6,3 +6,4 @@ add_subdirectory(nonbreakingspace)
add_subdirectory(autocorrection)
add_subdirectory(insertemail)
add_subdirectory(insertshorturl)
+add_subdirectory(inserttemplatecommand)
diff --git a/kmail/editorplugins/inserttemplatecommand/CMakeLists.txt \
b/kmail/editorplugins/inserttemplatecommand/CMakeLists.txt new file mode 100644
index 00000000..e69de29b
diff --git a/kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.cpp \
b/kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.cpp new \
file mode 100644 index 00000000..e3d476c4
--- /dev/null
+++ b/kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.cpp
@@ -0,0 +1,43 @@
+/*
+ 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"
diff --git a/kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.h \
b/kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.h new \
file mode 100644 index 00000000..4eca35fd
--- /dev/null
+++ b/kmail/editorplugins/inserttemplatecommand/inserttemplatecommandplugineditor.h
@@ -0,0 +1,38 @@
+/*
+ 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
diff --git a/kmail/editorplugins/inserttemplatecommand/kmail_inserttemplatecommandeditorplugin.json \
b/kmail/editorplugins/inserttemplatecommand/kmail_inserttemplatecommandeditorplugin.json
new file mode 100644
index 00000000..dd17e32a
--- /dev/null
+++ b/kmail/editorplugins/inserttemplatecommand/kmail_inserttemplatecommandeditorplugin.json
@@ -0,0 +1,13 @@
+{
+ "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"
+}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic