summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-27 06:58:24 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-27 06:58:24 (GMT)
commitb43b20652ee512980b4dae8ae957402ab4806e81 (patch)
tree261527804047bea12f15eda7de313f15028078a2
parent2e576a3888c80ce3a0b0db25420e9d0efdcee917 (diff)
Connect buttons
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp18
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp18
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h3
3 files changed, 39 insertions, 0 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp
index 0f426f8..9e99b39 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfigurewidgettest.cpp
@@ -23,6 +23,8 @@
#include <QTest>
#include <QLabel>
#include <QVBoxLayout>
+#include <QListWidget>
+#include <QPushButton>
ViewerPluginExternalConfigureWidgetTest::ViewerPluginExternalConfigureWidgetTest(QObject *parent)
: QObject(parent)
@@ -43,6 +45,22 @@ void ViewerPluginExternalConfigureWidgetTest::shouldHaveDefaultValue()
QHBoxLayout *mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("layout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
+
+
+ QListWidget *mListExternal = w.findChild<QListWidget *>(QStringLiteral("listexternal"));
+ QVERIFY(mListExternal);
+
+ QPushButton *mAddScript = w.findChild<QPushButton *>(QStringLiteral("addscript"));
+ QVERIFY(mAddScript);
+ QVERIFY(!mAddScript->text().isEmpty());
+
+ QPushButton *mModifyScript = w.findChild<QPushButton *>(QStringLiteral("modifyscript"));
+ QVERIFY(mModifyScript);
+ QVERIFY(!mModifyScript->text().isEmpty());
+
+ QPushButton *mRemoveScript = w.findChild<QPushButton *>(QStringLiteral("removescript"));
+ QVERIFY(mRemoveScript);
+ QVERIFY(!mRemoveScript->text().isEmpty());
}
QTEST_MAIN(ViewerPluginExternalConfigureWidgetTest)
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
index 3a9985a..c44dbc1 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
@@ -47,14 +47,17 @@ ViewerPluginExternalConfigureWidget::ViewerPluginExternalConfigureWidget(QWidget
mainLayout->addLayout(buttonLayout);
mAddScript = new QPushButton(i18n("Add Script..."), this);
+ connect(mAddScript, &QPushButton::clicked, this, &ViewerPluginExternalConfigureWidget::slotAddScript);
mAddScript->setObjectName(QStringLiteral("addscript"));
buttonLayout->addWidget(mAddScript);
mModifyScript = new QPushButton(i18n("Modify Script..."), this);
+ connect(mModifyScript, &QPushButton::clicked, this, &ViewerPluginExternalConfigureWidget::slotModifyScript);
mModifyScript->setObjectName(QStringLiteral("modifyscript"));
buttonLayout->addWidget(mModifyScript);
mRemoveScript = new QPushButton(i18n("Remove Script"), this);
+ connect(mRemoveScript, &QPushButton::clicked, this, &ViewerPluginExternalConfigureWidget::slotRemoveScript);
mRemoveScript->setObjectName(QStringLiteral("removescript"));
buttonLayout->addWidget(mRemoveScript);
}
@@ -64,6 +67,21 @@ ViewerPluginExternalConfigureWidget::~ViewerPluginExternalConfigureWidget()
}
+void ViewerPluginExternalConfigureWidget::slotRemoveScript()
+{
+
+}
+
+void ViewerPluginExternalConfigureWidget::slotModifyScript()
+{
+
+}
+
+void ViewerPluginExternalConfigureWidget::slotAddScript()
+{
+
+}
+
void ViewerPluginExternalConfigureWidget::load()
{
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h
index fe82817..dfaa1f0 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.h
@@ -33,6 +33,9 @@ public:
void save();
void reset();
private:
+ void slotAddScript();
+ void slotModifyScript();
+ void slotRemoveScript();
QListWidget *mListExternal;
QPushButton *mAddScript;
QPushButton *mRemoveScript;