BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Editor for ScientificDoubleProperty variant. 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 | |
ScientificDoublePropertyEditor (QWidget *parent=nullptr) | |
QVariant | editorData () |
void | setLimits (const RealLimits &limits) |
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 QLineEdit * | m_lineEdit |
class QDoubleValidator * | m_validator |
Editor for ScientificDoubleProperty variant.
Definition at line 95 of file CustomEditors.h.
ScientificDoublePropertyEditor::ScientificDoublePropertyEditor | ( | QWidget * | parent = nullptr | ) |
Definition at line 216 of file CustomEditors.cpp.
References m_lineEdit, m_validator, and onEditingFinished().
|
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 252 of file CustomEditors.cpp.
References ASSERT, CustomEditor::m_data, and m_lineEdit.
|
privateslot |
Definition at line 244 of file CustomEditors.cpp.
References CustomEditor::m_data, m_lineEdit, and CustomEditor::setDataIntern().
Referenced by ScientificDoublePropertyEditor().
|
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(), onEditingFinished(), DoubleEditor::onEditingFinished(), ScientificSpinBoxEditor::onEditingFinished(), IntEditor::onEditingFinished(), ComboPropertyEditor::onIndexChanged(), and MultiComboPropertyEditor::onModelDataChanged().
void ScientificDoublePropertyEditor::setLimits | ( | const RealLimits & | limits | ) |
Definition at line 237 of file CustomEditors.cpp.
References RealLimits::hasLowerLimit(), RealLimits::hasUpperLimit(), RealLimits::lowerLimit(), m_validator, and RealLimits::upperLimit().
|
protectedinherited |
Definition at line 45 of file CustomEditors.h.
Referenced by ExternalPropertyEditor::buttonClicked(), CustomEditor::editorData(), ExternalPropertyEditor::initEditor(), initEditor(), DoubleEditor::initEditor(), ScientificSpinBoxEditor::initEditor(), IntEditor::initEditor(), BoolEditor::initEditor(), MultiComboPropertyEditor::initEditor(), ComboPropertyEditor::internIndex(), ComboPropertyEditor::internLabels(), BoolEditor::onCheckBoxChange(), onEditingFinished(), DoubleEditor::onEditingFinished(), ScientificSpinBoxEditor::onEditingFinished(), IntEditor::onEditingFinished(), ComboPropertyEditor::onIndexChanged(), MultiComboPropertyEditor::onModelDataChanged(), CustomEditor::setData(), CustomEditor::setDataIntern(), and MultiComboPropertyEditor::updateBoxLabel().
|
private |
Definition at line 109 of file CustomEditors.h.
Referenced by ScientificDoublePropertyEditor(), initEditor(), and onEditingFinished().
|
private |
Definition at line 110 of file CustomEditors.h.
Referenced by ScientificDoublePropertyEditor(), and setLimits().