BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
LineEdit to edit values in a scientific notation, operating on a DoubleDescriptor.
In the future it can be enhanced to support units. At the moment, no DoubleDescriptor with units is used with a DoubleLineEdit, therefore the handling of units is not implemented yet. Only the naming is prepared already (also to have a naming alike to DoubleSpinBox).
Definition at line 28 of file DoubleLineEdit.h.
Signals | |
void | baseValueChanged (double newBaseValue) |
Emitted whenever the value changes. More... | |
Public Member Functions | |
DoubleLineEdit (QWidget *parent, const DoubleDescriptor &d) | |
void | setBaseValue (double baseValue) |
Set the base value (unit is the one of the contained descriptor). More... | |
const DoubleDescriptor & | valueDescriptor () const |
The descriptor on which this line edit operates. More... | |
Private Slots | |
void | onEditingFinished () |
Private Attributes | |
QDoubleValidator * | m_validator |
DoubleDescriptor | m_valueDescriptor |
DoubleLineEdit::DoubleLineEdit | ( | QWidget * | parent, |
const DoubleDescriptor & | d | ||
) |
Definition at line 18 of file DoubleLineEdit.cpp.
References DoubleDescriptor::get, DoubleDescriptor::limits, m_validator, m_valueDescriptor, onEditingFinished(), and setBaseValue().
|
signal |
Emitted whenever the value changes.
newBaseValue is in the unit of the valueDescriptor.
Referenced by MaterialInplaceForm::createWidgets(), and onEditingFinished().
|
privateslot |
Definition at line 46 of file DoubleLineEdit.cpp.
References baseValueChanged(), DoubleDescriptor::get, and m_valueDescriptor.
Referenced by DoubleLineEdit().
void DoubleLineEdit::setBaseValue | ( | double | baseValue | ) |
Set the base value (unit is the one of the contained descriptor).
Definition at line 36 of file DoubleLineEdit.cpp.
Referenced by DoubleLineEdit().
const DoubleDescriptor & DoubleLineEdit::valueDescriptor | ( | ) | const |
The descriptor on which this line edit operates.
Definition at line 41 of file DoubleLineEdit.cpp.
References m_valueDescriptor.
|
private |
Definition at line 49 of file DoubleLineEdit.h.
Referenced by DoubleLineEdit().
|
private |
Definition at line 50 of file DoubleLineEdit.h.
Referenced by DoubleLineEdit(), onEditingFinished(), and valueDescriptor().