summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-27 06:18:40 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-27 06:18:40 (GMT)
commit2e576a3888c80ce3a0b0db25420e9d0efdcee917 (patch)
treee1eaab08edb05bbd5455d039d10475c843983782
parent2ef217414cc863d8b4d11602f7c0aa35852f7ae4 (diff)
Continue to implement it
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp2
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp28
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h4
3 files changed, 31 insertions, 3 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp
index b9b81c7..0f426f8 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp
@@ -40,7 +40,7 @@ void ViewerPluginExternalConfigureWidgetTest::shouldHaveDefaultValue()
ViewerPluginExternalConfigureWidget w;
QLabel *label = w.findChild<QLabel *>(QStringLiteral("lab"));
QVERIFY(label);
- QVBoxLayout *mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("layout"));
+ QHBoxLayout *mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("layout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
}
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
index 85413a5..3a9985a 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
@@ -23,16 +23,40 @@
#include <KLocalizedString>
#include "../viewerpluginexternalscriptsloadjob.h"
#include <QLabel>
+#include <QListWidget>
+#include <QPushButton>
ViewerPluginExternalConfigureWidget::ViewerPluginExternalConfigureWidget(QWidget *parent)
: QWidget(parent)
{
- QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ QHBoxLayout *mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("layout"));
mainLayout->setMargin(0);
+
+ QVBoxLayout *listLayout = new QVBoxLayout;
+ mainLayout->addLayout(listLayout);
QLabel *lab = new QLabel(i18n("External Script:"), this);
lab->setObjectName(QStringLiteral("lab"));
- mainLayout->addWidget(lab);
+ listLayout->addWidget(lab);
+
+ mListExternal = new QListWidget(this);
+ mListExternal->setObjectName(QStringLiteral("listexternal"));
+ listLayout->addWidget(mListExternal);
+
+ QVBoxLayout *buttonLayout = new QVBoxLayout;
+ mainLayout->addLayout(buttonLayout);
+
+ mAddScript = new QPushButton(i18n("Add Script..."), this);
+ mAddScript->setObjectName(QStringLiteral("addscript"));
+ buttonLayout->addWidget(mAddScript);
+
+ mModifyScript = new QPushButton(i18n("Modify Script..."), this);
+ mModifyScript->setObjectName(QStringLiteral("modifyscript"));
+ buttonLayout->addWidget(mModifyScript);
+
+ mRemoveScript = new QPushButton(i18n("Remove Script"), this);
+ mRemoveScript->setObjectName(QStringLiteral("removescript"));
+ buttonLayout->addWidget(mRemoveScript);
}
ViewerPluginExternalConfigureWidget::~ViewerPluginExternalConfigureWidget()
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h
index d7a7ce7..fe82817 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h
@@ -22,6 +22,7 @@
#include <QWidget>
class QListWidget;
+class QPushButton;
class ViewerPluginExternalConfigureWidget : public QWidget
{
Q_OBJECT
@@ -33,6 +34,9 @@ public:
void reset();
private:
QListWidget *mListExternal;
+ QPushButton *mAddScript;
+ QPushButton *mRemoveScript;
+ QPushButton *mModifyScript;
};
#endif // VIEWERPLUGINEXTERNALCONFIGUREWIDGET_H