BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Editor for Double variant using ScientificSpinBox. More...
Public Slots | |
void | setData (const QVariant &data) |
Sets the data from the model to editor. More... | |
Signals | |
void | dataChanged (const QVariant &data) |
Signal emit then user changed the data through the editor. More... | |
Public Member Functions | |
ScientificSpinBoxEditor (QWidget *parent=nullptr) | |
QVariant | editorData () |
void | setDecimals (int decimals) |
void | setLimits (const RealLimits &limits) |
void | setSingleStep (double step) |
Protected Member Functions | |
void | initEditor () |
Inits editor widgets from m_data. More... | |
void | setDataIntern (const QVariant &data) |
Saves the data from the editor and informs external delegates. More... | |
Protected Attributes | |
QVariant | m_data |
Private Slots | |
void | onEditingFinished () |
Private Attributes | |
class ScientificSpinBox * | m_doubleEditor |
Editor for Double variant using ScientificSpinBox.
Definition at line 135 of file CustomEditors.h.
ScientificSpinBoxEditor::ScientificSpinBoxEditor | ( | QWidget * | parent = nullptr | ) |
Definition at line 316 of file CustomEditors.cpp.
References m_doubleEditor, onEditingFinished(), and ScientificSpinBox::valueChanged().
|
signalinherited |
Signal emit then user changed the data through the editor.
Referenced by PropertyWidgetItem::connectEditor(), SessionModelDelegate::createEditor(), and CustomEditor::setDataIntern().
|
inlineinherited |
|
protectedvirtual |
Inits editor widgets from m_data.
Reimplemented from CustomEditor.
Definition at line 364 of file CustomEditors.cpp.
References ASSERT, CustomEditor::m_data, m_doubleEditor, and ScientificSpinBox::setValue().
|
privateslot |
Definition at line 356 of file CustomEditors.cpp.
References CustomEditor::m_data, m_doubleEditor, CustomEditor::setDataIntern(), and ScientificSpinBox::value.
Referenced by ScientificSpinBoxEditor().
|
slotinherited |
Sets the data from the model to editor.
Definition at line 48 of file CustomEditors.cpp.
References CustomEditor::initEditor(), and CustomEditor::m_data.
|
protectedinherited |
Saves the data from the editor and informs external delegates.
Definition at line 60 of file CustomEditors.cpp.
References CustomEditor::dataChanged(), and CustomEditor::m_data.
Referenced by ExternalPropertyEditor::buttonClicked(), BoolEditor::onCheckBoxChange(), ScientificDoublePropertyEditor::onEditingFinished(), DoubleEditor::onEditingFinished(), onEditingFinished(), IntEditor::onEditingFinished(), ComboPropertyEditor::onIndexChanged(), and MultiComboPropertyEditor::onModelDataChanged().
void ScientificSpinBoxEditor::setDecimals | ( | int | decimals | ) |
Definition at line 345 of file CustomEditors.cpp.
References m_doubleEditor, ScientificSpinBox::setDecimals(), and ScientificSpinBox::setSingleStep().
void ScientificSpinBoxEditor::setLimits | ( | const RealLimits & | limits | ) |
Definition at line 337 of file CustomEditors.cpp.
References RealLimits::hasLowerLimit(), RealLimits::hasUpperLimit(), RealLimits::lowerLimit(), m_doubleEditor, ScientificSpinBox::setMaximum(), ScientificSpinBox::setMinimum(), and RealLimits::upperLimit().
void ScientificSpinBoxEditor::setSingleStep | ( | double | step | ) |
Definition at line 351 of file CustomEditors.cpp.
References m_doubleEditor, and ScientificSpinBox::setSingleStep().
|
protectedinherited |
Definition at line 45 of file CustomEditors.h.
Referenced by ExternalPropertyEditor::buttonClicked(), CustomEditor::editorData(), ExternalPropertyEditor::initEditor(), ScientificDoublePropertyEditor::initEditor(), DoubleEditor::initEditor(), initEditor(), IntEditor::initEditor(), BoolEditor::initEditor(), MultiComboPropertyEditor::initEditor(), ComboPropertyEditor::internIndex(), ComboPropertyEditor::internLabels(), BoolEditor::onCheckBoxChange(), ScientificDoublePropertyEditor::onEditingFinished(), DoubleEditor::onEditingFinished(), onEditingFinished(), IntEditor::onEditingFinished(), ComboPropertyEditor::onIndexChanged(), MultiComboPropertyEditor::onModelDataChanged(), CustomEditor::setData(), CustomEditor::setDataIntern(), and MultiComboPropertyEditor::updateBoxLabel().
|
private |
Definition at line 151 of file CustomEditors.h.
Referenced by ScientificSpinBoxEditor(), initEditor(), onEditingFinished(), setDecimals(), setLimits(), and setSingleStep().