summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-27 19:32:16 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-27 19:32:16 (GMT)
commit8b64581ac2db86a65f5ed4622df8722972e0fdd3 (patch)
tree40bcb22130ddbc1b19d6a299c1381a079002504c
parent47c8adad58b9a9e7a5d1f39a4cce18be9d2d050d (diff)
continue to implement it
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/CMakeLists.txt1
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp36
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h34
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.cpp10
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.h3
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditwidget.cpp7
6 files changed, 90 insertions, 1 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/CMakeLists.txt b/plugins/messageviewerplugins/externalscriptplugin/autotests/CMakeLists.txt
index e251f07..f7e397d 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/CMakeLists.txt
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/CMakeLists.txt
@@ -20,3 +20,4 @@ add_messageviewer_viewerplugin_external_plugin_unittest(viewerpluginexternalscri
add_messageviewer_viewerplugin_external_plugin_unittest(viewerpluginexternalscriptparseargumenttest.cpp "../viewerpluginexternalscriptparseargument.cpp" "")
add_messageviewer_viewerplugin_external_plugin_unittest(viewerpluginexternalconfigurewidgettest.cpp "../configuredialog/viewerpluginexternaleditwidget.cpp;../configuredialog/viewerpluginexternaleditdialog.cpp;../configuredialog/viewerpluginexternalconfigurewidget.cpp;../viewerpluginexternalscriptsloadjob.cpp;../viewerpluginexternalscriptinfo.cpp" "")
add_messageviewer_viewerplugin_external_plugin_unittest(viewerpluginexternalconfiguredialogtest.cpp "../configuredialog/viewerpluginexternaleditwidget.cpp;../configuredialog/viewerpluginexternaleditdialog.cpp;../configuredialog/viewerpluginexternalconfiguredialog.cpp;../configuredialog/viewerpluginexternalconfigurewidget.cpp;../viewerpluginexternalscriptsloadjob.cpp;../viewerpluginexternalscriptinfo.cpp" "")
+add_messageviewer_viewerplugin_external_plugin_unittest(viewerpluginexternaleditwidgettest.cpp "../configuredialog/viewerpluginexternaleditwidget.cpp" "")
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp
new file mode 100644
index 0000000..b9c37a7
--- /dev/null
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.cpp
@@ -0,0 +1,36 @@
+/*
+ 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 "viewerpluginexternaleditwidgettest.h"
+
+#include <QTest>
+
+ViewerPluginExternalEditWidgetTest::ViewerPluginExternalEditWidgetTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+ViewerPluginExternalEditWidgetTest::~ViewerPluginExternalEditWidgetTest()
+{
+
+}
+
+QTEST_MAIN(ViewerPluginExternalEditWidgetTest)
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h
new file mode 100644
index 0000000..06f6ece
--- /dev/null
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditwidgettest.h
@@ -0,0 +1,34 @@
+/*
+ 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 VIEWERPLUGINEXTERNALEDITWIDGETTEST_H
+#define VIEWERPLUGINEXTERNALEDITWIDGETTEST_H
+
+#include <QObject>
+
+class ViewerPluginExternalEditWidgetTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit ViewerPluginExternalEditWidgetTest(QObject *parent = Q_NULLPTR);
+ ~ViewerPluginExternalEditWidgetTest();
+};
+
+#endif // VIEWERPLUGINEXTERNALEDITWIDGETTEST_H
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.cpp b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.cpp
index efdb776..0ba561b 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.cpp
@@ -19,10 +19,20 @@
#include "viewerpluginexternaleditdialog.h"
+#include "viewerpluginexternaleditwidget.h"
+#include <KLocalizedString>
+#include <QDialogButtonBox>
+#include <QVBoxLayout>
ViewerPluginExternalEditDialog::ViewerPluginExternalEditDialog(QWidget *parent)
: QDialog(parent)
{
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+
+ mEditWidget = new ViewerPluginExternalEditWidget(this);
+ mEditWidget->setObjectName(QStringLiteral("editwidget"));
+ mainLayout->addWidget(mEditWidget);
+
}
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.h b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.h
index 8ea0d98..307fae8 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.h
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditdialog.h
@@ -23,12 +23,15 @@
#include <QDialog>
+class ViewerPluginExternalEditWidget;
class ViewerPluginExternalEditDialog : public QDialog
{
Q_OBJECT
public:
explicit ViewerPluginExternalEditDialog(QWidget *parent = Q_NULLPTR);
~ViewerPluginExternalEditDialog();
+private:
+ ViewerPluginExternalEditWidget *mEditWidget;
};
#endif // VIEWERPLUGINEXTERNALEDITDIALOG_H
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditwidget.cpp b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditwidget.cpp
index 603aa04..ef105c6 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditwidget.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternaleditwidget.cpp
@@ -19,11 +19,16 @@
#include "viewerpluginexternaleditwidget.h"
+#include <QVBoxLayout>
+#include <KLocalizedString>
+#include <QLabel>
+#include <QLineEdit>
ViewerPluginExternalEditWidget::ViewerPluginExternalEditWidget(QWidget *parent)
: QWidget(parent)
{
-
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ mainLayout->setMargin(0);
}
ViewerPluginExternalEditWidget::~ViewerPluginExternalEditWidget()