21 #include <QFormLayout>
24 : QGroupBox(
"Environment", parent)
25 , m_instrument(instrument)
29 m_formLayout->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
31 auto* backgroundTypeCombo =
33 createBackgroundWidgets();
36 m_formLayout->addRow(
"Background type:", backgroundTypeCombo);
49 auto* spinbox =
new DoubleSpinBox(
this, p->backgroundValue());
50 spinbox->setSingleStep(0.01);
54 p->setBackgroundValue(newValue);
Defines BackgroundItem classes.
Defines class DoubleSpinBox.
Defines class EnvironmentEditor.
Defines class GroupBoxCollapser.
Defines class InstrumentItem and all its children.
SpinBox for DoubleDescriptors, supporting units.
void baseValueChanged(double newBaseValue)
Emitted whenever the value changes.
InstrumentItem * m_instrument
void createBackgroundWidgets()
QFormLayout * m_formLayout
EnvironmentEditor(QWidget *parent, InstrumentItem *instrument)
static GroupBoxCollapser * installIntoGroupBox(QGroupBox *groupBox, bool expanded=true)
Abstract base class for instrument-specific item classes.
SelectionDescriptor< BackgroundItem * > backgroundSelection() const
QComboBox * createSelectionCombo(QWidget *parent, const SelectionDescriptor< T > d, std::function< void(int)> slot=nullptr)
Create a combo box with the information found in a selection descriptor.