OGS
VtkAlgorithmPropertyCheckbox.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
4// ** INCLUDES **
6
7#include <utility>
8
10
12 const bool value,
13 QString name,
14 VtkAlgorithmProperties* algProps,
15 QWidget* parent /*= 0*/)
16 : QCheckBox(parent), _name(std::move(name)), _algProps(algProps)
17{
18 this->setChecked(value);
19 connect(this, SIGNAL(stateChanged(int)), this, SLOT(setNewValue(int)));
20}
21
23
25{
26 auto boolState = static_cast<bool>(state);
27 _algProps->SetUserProperty(_name, QVariant(boolState));
28}
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.