BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Widget for selecting a distribution (combo box) and input of the corresponding values with respect to the given distribution (e.g. mean and deviation for gauss distribution)
Definition at line 46 of file DistributionEditor.h.
Signals | |
void | distributionChanged () |
Public Member Functions | |
DistributionSelector (std::optional< MeanConfig > mean_config, GUI::ID::Distributions distributions, QWidget *parent, BeamDistributionItem *item) | |
GUI::ID::Distributions | distributions () const |
BeamDistributionItem * | item () const |
void | refresh () |
Private Member Functions | |
void | createDistributionWidgets () |
void | createMeanSpinBox (const DoubleDescriptor &d) |
DoubleSpinBox * | createSpinBox (const DoubleDescriptor &d) |
QSpinBox * | createSpinBox (const UIntDescriptor &d) |
Private Attributes | |
QComboBox * | m_distributionCombo |
GUI::ID::Distributions | m_distributions |
QFormLayout * | m_formLayout |
BeamDistributionItem * | m_item |
std::optional< MeanConfig > | m_meanConfig |
DistributionSelector::DistributionSelector | ( | std::optional< MeanConfig > | mean_config, |
GUI::ID::Distributions | distributions, | ||
QWidget * | parent, | ||
BeamDistributionItem * | item | ||
) |
mean_config | controls how the mean value is shown and can be input. If this parameter is nullopt then the mean value can not be input and only symmetric distributions are provided |
Definition at line 35 of file DistributionEditor.cpp.
References createDistributionWidgets(), GUI::Util::createSelectionCombo(), BeamDistributionItem::distributionSelection(), item(), m_distributionCombo, and m_formLayout.
|
private |
Definition at line 57 of file DistributionEditor.cpp.
References DoubleSpinBox::baseValueChanged(), createMeanSpinBox(), createSpinBox(), BeamDistributionItem::distribution(), m_formLayout, and m_item.
Referenced by DistributionSelector(), and refresh().
|
private |
Definition at line 129 of file DistributionEditor.cpp.
References GUI::Util::createScientificSpinBox(), createSpinBox(), distributionChanged(), m_formLayout, m_meanConfig, DoubleDescriptor::set, and ScientificSpinBox::valueChanged().
Referenced by createDistributionWidgets().
|
private |
Definition at line 109 of file DistributionEditor.cpp.
References DoubleSpinBox::baseValueChanged(), GUI::Util::createSpinBox(), distributionChanged(), m_formLayout, and DoubleDescriptor::set.
Referenced by createDistributionWidgets(), and createMeanSpinBox().
|
private |
Definition at line 119 of file DistributionEditor.cpp.
References GUI::Util::createSpinBox(), distributionChanged(), m_formLayout, and UIntDescriptor::set.
|
signal |
GUI::ID::Distributions DistributionSelector::distributions | ( | ) | const |
Definition at line 148 of file DistributionEditor.cpp.
References m_distributions.
BeamDistributionItem * DistributionSelector::item | ( | ) | const |
Definition at line 143 of file DistributionEditor.cpp.
References m_item.
Referenced by DistributionSelector(), DistributionEditor::updatePlot(), and InclinationAnglesEditor::updatePlot().
void DistributionSelector::refresh | ( | ) |
Definition at line 153 of file DistributionEditor.cpp.
References createDistributionWidgets(), BeamDistributionItem::distributionSelection(), m_distributionCombo, and m_item.
Referenced by DistributionEditor::updateData().
|
private |
Definition at line 78 of file DistributionEditor.h.
Referenced by DistributionSelector(), and refresh().
|
private |
Definition at line 76 of file DistributionEditor.h.
Referenced by distributions().
|
private |
Definition at line 77 of file DistributionEditor.h.
Referenced by DistributionSelector(), createDistributionWidgets(), createMeanSpinBox(), and createSpinBox().
|
private |
Definition at line 74 of file DistributionEditor.h.
Referenced by createDistributionWidgets(), item(), and refresh().
|
private |
Definition at line 75 of file DistributionEditor.h.
Referenced by createMeanSpinBox().