Commit 2e576a38 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement it

parent 2ef21741
......@@ -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);
}
......
......@@ -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()
......
......@@ -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
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