Commit b43b2065 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Connect buttons

parent 2e576a38
......@@ -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)
......@@ -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()
{
......
......@@ -33,6 +33,9 @@ public:
void save();
void reset();
private:
void slotAddScript();
void slotModifyScript();
void slotRemoveScript();
QListWidget *mListExternal;
QPushButton *mAddScript;
QPushButton *mRemoveScript;
......
Supports Markdown
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