18#include <QDoubleValidator>
20#include <QIntValidator>
28 const QList<QString> contents,
35 auto* layout =
new QHBoxLayout;
36 layout->setSpacing(3);
37 layout->setContentsMargins(0, 0, 0, 0);
39 foreach (QString content, contents)
41 auto* lineEdit =
new QLineEdit(content,
this);
42 layout->addWidget(lineEdit);
46 case QVariant::Double:
47 lineEdit->setValidator(
new QDoubleValidator(
this));
51 lineEdit->setValidator(
new QIntValidator(
this));
61 this->setLayout(layout);
62 this->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
69 QLayout* layout = this->layout();
71 for (
int i = 0; i < layout->count(); ++i)
73 auto* lineEdit =
static_cast<QLineEdit*
>(layout->itemAt(i)->widget());
74 list.push_back(QVariant(lineEdit->text()));
Definition of the VtkAlgorithmProperties class.
Definition of the VtkAlgorithmPropertyVectorEdit class.
Contains properties for the visualization of objects as VtkVisPipelineItems.
VtkAlgorithmProperties * _algProps
void editingFinished()
Is emitted when text of one the line edits changed.
void setNewValue()
This slots is automatically called when the checkbox state changed.
VtkAlgorithmPropertyVectorEdit(const QList< QString > contents, QString name, QVariant::Type type, VtkAlgorithmProperties *algProps, QWidget *parent=nullptr)
Constructor.
~VtkAlgorithmPropertyVectorEdit() override