Commit 992e8318 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add combobox for default script.

parent ce388a58
......@@ -23,6 +23,7 @@
#include <QHBoxLayout>
#include <QTextEdit>
#include <QWebEngineSettings>
#include <QComboBox>
template<typename Arg, typename R, typename C>
struct InvokeWrapper {
......@@ -118,9 +119,19 @@ TestScriptWidget::TestScriptWidget(QWidget *parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
QVBoxLayout *vScriptLayout = new QVBoxLayout;
layout->addLayout(vScriptLayout);
QComboBox *scriptCombo = new QComboBox;
vScriptLayout->addWidget(scriptCombo);
//TODO fill with script
fillScriptCombo(scriptCombo);
mScriptEdit = new QTextEdit;
mScriptEdit->setAcceptRichText(false);
layout->addWidget(mScriptEdit);
vScriptLayout->addWidget(mScriptEdit);
QVBoxLayout *vboxLayout = new QVBoxLayout;
layout->addLayout(vboxLayout);
......@@ -133,6 +144,11 @@ TestScriptWidget::TestScriptWidget(QWidget *parent)
vboxLayout->addWidget(button);
}
void TestScriptWidget::fillScriptCombo(QComboBox *scriptCombo)
{
//TODO
}
void TestScriptWidget::setResult(const QString &res)
{
mResultEdit->setText(res);
......
......@@ -21,6 +21,7 @@
#include <QWebEngineView>
#include <QWidget>
class QTextEdit;
class QComboBox;
class TestScriptWidget : public QWidget
{
Q_OBJECT
......@@ -31,6 +32,7 @@ public:
Q_SIGNALS:
void executeScript();
private:
void fillScriptCombo(QComboBox *scriptCombo);
QTextEdit *mScriptEdit;
QTextEdit *mResultEdit;
};
......
Markdown is supported
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