17 #include <QVBoxLayout>
22 const int max_val = 65536;
23 const int min_val = -max_val;
30 setAutoFillBackground(
true);
35 auto layout =
new QVBoxLayout;
37 layout->setSpacing(0);
41 connect(
m_intEditor,
static_cast<void (QSpinBox::*)(
int)
>(&QSpinBox::valueChanged),
57 if (new_value !=
m_data.value<
int>())
63 if (
m_data.type() != QVariant::Int)
64 throw std::runtime_error(
"IntegerEditor::update_components() -> Error. Wrong variant type");
Base class for all custom variant editors.
void setDataIntern(const QVariant &data)
Saves the data as given by editor's internal components and notifies the model.
void update_components() override
Should update widget components from m_data, if necessary.
IntegerEditor(QWidget *parent=nullptr)
void setRange(int minimum, int maximum)
materialitems.h Collection of materials to populate MaterialModel.