OGS
VtkAlgorithmPropertyCheckbox.cpp
Go to the documentation of this file.
1
14
15// ** INCLUDES **
17
18#include <utility>
19
21
23 const bool value,
24 QString name,
25 VtkAlgorithmProperties* algProps,
26 QWidget* parent /*= 0*/)
27 : QCheckBox(parent), _name(std::move(name)), _algProps(algProps)
28{
29 this->setChecked(value);
30 connect(this, SIGNAL(stateChanged(int)), this, SLOT(setNewValue(int)));
31}
32
34
36{
37 auto boolState = static_cast<bool>(state);
38 _algProps->SetUserProperty(_name, QVariant(boolState));
39}
Definition of the VtkAlgorithmProperties class.
Definition of the VtkAlgorithmPropertyCheckbox class.
Contains properties for the visualization of objects as VtkVisPipelineItems.
void setNewValue(int state)
This slots is automatically called when the checkbox state changed.
VtkAlgorithmPropertyCheckbox(const bool value, QString name, VtkAlgorithmProperties *algProps, QWidget *parent=nullptr)
Constructor.
~VtkAlgorithmPropertyCheckbox() override
Destructor.