BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The ParameterItem class represent a tuning value in a parameter tuning tree.
Definition at line 42 of file ParameterTreeItems.h.
Public Member Functions | |
ParameterItem (QObject *parent) | |
int | decimalsOfLink () const |
RealLimits | limitsOfLink () const |
QString | link () const |
Unique string to identify this ParameterItem. More... | |
void | linkToDescriptor (DoubleDescriptor d) |
Links this item to the given value defined by a descriptor. More... | |
void | linkToSessionItem (SessionItem *item) |
Links this item to the given session item. More... | |
void | propagateValueToLink (double newValue) |
Sets current value to the original PropertyItem of MultiLayerItem/InstrumentItem. More... | |
void | setTitle (const QString &title) |
QString | title () const |
QString | titleForFitItem () const |
double | valueOfLink () const |
Private Attributes | |
DoubleDescriptor | m_d |
The linked double value. More... | |
QString | m_link |
See docu of link() More... | |
QString | m_title |
ParameterItem::ParameterItem | ( | QObject * | parent | ) |
Definition at line 75 of file ParameterTreeItems.cpp.
int ParameterItem::decimalsOfLink | ( | ) | const |
Definition at line 122 of file ParameterTreeItems.cpp.
References DoubleDescriptor::decimals, and m_d.
Referenced by ParameterTuningDelegate::createEditor().
RealLimits ParameterItem::limitsOfLink | ( | ) | const |
Definition at line 117 of file ParameterTreeItems.cpp.
References DoubleDescriptor::limits, and m_d.
Referenced by ParameterTuningDelegate::createEditor(), and FitParameterContainerItem::createFitParameter().
QString ParameterItem::link | ( | ) | const |
Unique string to identify this ParameterItem.
The link is arbitrary. It can't be used for finding the linked item (therefore it does not have to be a model path). However, it is used for comparison, also across project load/save. Therefore the link is always the same, not e.g. an always generated UUID. This link is used for setting backup values and for finding this ParameterItem when referring from fit parameters.
Definition at line 127 of file ParameterTreeItems.cpp.
References m_link.
Referenced by FitParameterContainerItem::addToFitParameter(), FitParameterContainerItem::createFitParameter(), FitParameterContainerItem::fitParameterItem(), and FitParameterContainerItem::removeLink().
void ParameterItem::linkToDescriptor | ( | DoubleDescriptor | d | ) |
Links this item to the given value defined by a descriptor.
Definition at line 105 of file ParameterTreeItems.cpp.
References m_d, m_link, and DoubleDescriptor::path.
void ParameterItem::linkToSessionItem | ( | SessionItem * | item | ) |
Links this item to the given session item.
Definition at line 111 of file ParameterTreeItems.cpp.
References GUI::Util::Path::getPathFromIndex(), SessionItem::index(), m_d, and m_link.
void ParameterItem::propagateValueToLink | ( | double | newValue | ) |
Sets current value to the original PropertyItem of MultiLayerItem/InstrumentItem.
Definition at line 100 of file ParameterTreeItems.cpp.
References m_d, and DoubleDescriptor::set.
Referenced by ParameterTuningDelegate::emitSignals().
void ParameterItem::setTitle | ( | const QString & | title | ) |
Definition at line 88 of file ParameterTreeItems.cpp.
References m_title, and title().
QString ParameterItem::title | ( | ) | const |
QString ParameterItem::titleForFitItem | ( | ) | const |
Definition at line 132 of file ParameterTreeItems.cpp.
References m_title.
Referenced by FitParameterContainerItem::addToFitParameter(), and FitParameterContainerItem::createFitParameter().
double ParameterItem::valueOfLink | ( | ) | const |
Definition at line 93 of file ParameterTreeItems.cpp.
References DoubleDescriptor::get, and m_d.
Referenced by FitParameterContainerItem::createFitParameter().
|
private |
The linked double value.
Definition at line 75 of file ParameterTreeItems.h.
Referenced by decimalsOfLink(), limitsOfLink(), linkToDescriptor(), linkToSessionItem(), propagateValueToLink(), and valueOfLink().
|
private |
See docu of link()
Definition at line 74 of file ParameterTreeItems.h.
Referenced by link(), linkToDescriptor(), and linkToSessionItem().
|
private |
Definition at line 73 of file ParameterTreeItems.h.
Referenced by setTitle(), title(), and titleForFitItem().