BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Utility functions to support layer oriented sample editor.
Functions | |
void | addMultiPropertyToGrid (QGridLayout *m_gridLayout, int firstCol, const DoubleDescriptors &valueDescriptors, function< void(double, DoubleDescriptor)> setNewValue, bool vertically, bool addSpacer) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to the given setNewValue() More... | |
void | addMultiPropertyToGrid (QGridLayout *m_gridLayout, int firstCol, const DoubleDescriptors &valueDescriptors, SampleEditorController *ec, bool addSpacer) |
void | addMultiPropertyToGrid (QGridLayout *m_gridLayout, int firstCol, const DoubleDescriptors &valueDescriptors, SampleEditorController *ec, bool vertically, bool addSpacer) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to SampleEditorController::setDouble() More... | |
void | addVectorToGrid (QGridLayout *m_gridLayout, int firstCol, const VectorDescriptor &v, function< void(double, DoubleDescriptor)> setNewValue, bool vertically, bool addSpacer) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to the given setNewValue() More... | |
void | addVectorToGrid (QGridLayout *m_gridLayout, int firstCol, const VectorDescriptor &v, SampleEditorController *ec, bool vertically, bool addSpacer) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to SampleEditorController::setDouble() More... | |
QPushButton * | createAddParticleButton (QWidget *parentWidget, std::function< void(FormFactorItemCatalog::Type t)> slotAddFormFactor, std::function< void(ItemWithParticlesCatalog::Type t)> slotAddParticle) |
QLabel * | createBoldLabel (const QString &text) |
QWidget * | createWidgetForItemWithParticles (QWidget *parentWidget, ItemWithParticles *itemWithParticles, bool allowAbundance, SampleEditorController *ec, bool allowRemove=true) |
DoubleDescriptors | doubleDescriptorsOfItem (FormFactorItem *item) |
DoubleDescriptors | doubleDescriptorsOfItem (LayerBasicRoughnessItem *item) |
DoubleDescriptors | doubleDescriptorsOfItem (Profile1DItem *item) |
DoubleDescriptors | doubleDescriptorsOfItem (Profile2DItem *item) |
DoubleDescriptors | doubleDescriptorsOfItem (RotationItem *item) |
QList< QColor > | predefinedLayerColors () |
void | updateLabelUnit (QLabel *label) |
void | updateLabelUnit (QLabel *label, DoubleSpinBox *editor) |
void LayerEditorUtils::addMultiPropertyToGrid | ( | QGridLayout * | m_gridLayout, |
int | firstCol, | ||
const DoubleDescriptors & | valueDescriptors, | ||
function< void(double, DoubleDescriptor)> | setNewValue, | ||
bool | vertically, | ||
bool | addSpacer | ||
) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to the given setNewValue()
Definition at line 79 of file LayerEditorUtils.cpp.
References DoubleSpinBox::baseValueChanged(), and updateLabelUnit().
void LayerEditorUtils::addMultiPropertyToGrid | ( | QGridLayout * | m_gridLayout, |
int | firstCol, | ||
const DoubleDescriptors & | valueDescriptors, | ||
SampleEditorController * | ec, | ||
bool | addSpacer | ||
) |
Definition at line 110 of file LayerEditorUtils.cpp.
References addMultiPropertyToGrid().
void LayerEditorUtils::addMultiPropertyToGrid | ( | QGridLayout * | m_gridLayout, |
int | firstCol, | ||
const DoubleDescriptors & | valueDescriptors, | ||
SampleEditorController * | ec, | ||
bool | vertically, | ||
bool | addSpacer | ||
) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to SampleEditorController::setDouble()
Definition at line 66 of file LayerEditorUtils.cpp.
References SampleEditorController::setDouble().
Referenced by FormLayouter::addGroupOfValues(), addMultiPropertyToGrid(), FormLayouter::addVector(), addVectorToGrid(), SelectionContainerForm::createContent(), and LatticeTypeSelectionForm::createContent().
void LayerEditorUtils::addVectorToGrid | ( | QGridLayout * | m_gridLayout, |
int | firstCol, | ||
const VectorDescriptor & | v, | ||
function< void(double, DoubleDescriptor)> | setNewValue, | ||
bool | vertically, | ||
bool | addSpacer | ||
) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to the given setNewValue()
Definition at line 126 of file LayerEditorUtils.cpp.
References addMultiPropertyToGrid(), VectorDescriptor::x, VectorDescriptor::y, and VectorDescriptor::z.
void LayerEditorUtils::addVectorToGrid | ( | QGridLayout * | m_gridLayout, |
int | firstCol, | ||
const VectorDescriptor & | v, | ||
SampleEditorController * | ec, | ||
bool | vertically, | ||
bool | addSpacer | ||
) |
Create DoubleSpinBoxes for the DoubeDescriptors and connect them to SampleEditorController::setDouble()
Definition at line 118 of file LayerEditorUtils.cpp.
References addMultiPropertyToGrid(), VectorDescriptor::x, VectorDescriptor::y, and VectorDescriptor::z.
Referenced by MaterialInplaceForm::createWidgets().
QPushButton * LayerEditorUtils::createAddParticleButton | ( | QWidget * | parentWidget, |
std::function< void(FormFactorItemCatalog::Type t)> | slotAddFormFactor, | ||
std::function< void(ItemWithParticlesCatalog::Type t)> | slotAddParticle | ||
) |
Definition at line 197 of file LayerEditorUtils.cpp.
References ItemWithParticlesCatalog::Composition, ItemWithParticlesCatalog::CoreShell, FormFactorItemCatalog::hardParticleTypes(), ItemWithParticlesCatalog::MesoCrystal, FormFactorItemCatalog::rippleTypes(), FormFactorItemCatalog::uiInfo(), and ItemWithParticlesCatalog::uiInfo().
Referenced by ParticleCompositionForm::ParticleCompositionForm(), and ParticleLayoutForm::ParticleLayoutForm().
QLabel * LayerEditorUtils::createBoldLabel | ( | const QString & | text | ) |
Definition at line 135 of file LayerEditorUtils.cpp.
Referenced by FormLayouter::insertRow(), and FormLayouter::insertValue().
QWidget * LayerEditorUtils::createWidgetForItemWithParticles | ( | QWidget * | parentWidget, |
ItemWithParticles * | itemWithParticles, | ||
bool | allowAbundance, | ||
SampleEditorController * | ec, | ||
bool | allowRemove = true |
||
) |
Definition at line 175 of file LayerEditorUtils.cpp.
Referenced by ParticleCompositionForm::ParticleCompositionForm(), ParticleLayoutForm::ParticleLayoutForm(), MesoCrystalForm::createBasisWidgets(), ParticleCompositionForm::onParticleAdded(), and ParticleLayoutForm::onParticleAdded().
DoubleDescriptors LayerEditorUtils::doubleDescriptorsOfItem | ( | FormFactorItem * | item | ) |
Definition at line 162 of file LayerEditorUtils.cpp.
References FormFactorItem::geometryValues().
DoubleDescriptors LayerEditorUtils::doubleDescriptorsOfItem | ( | LayerBasicRoughnessItem * | item | ) |
Definition at line 167 of file LayerEditorUtils.cpp.
References LayerBasicRoughnessItem::hurst(), LayerBasicRoughnessItem::lateralCorrelationLength(), and LayerBasicRoughnessItem::sigma().
Referenced by SelectionContainerForm::SelectionContainerForm().
DoubleDescriptors LayerEditorUtils::doubleDescriptorsOfItem | ( | Profile1DItem * | item | ) |
Definition at line 157 of file LayerEditorUtils.cpp.
References Profile1DItem::valueDescriptors().
DoubleDescriptors LayerEditorUtils::doubleDescriptorsOfItem | ( | Profile2DItem * | item | ) |
Definition at line 152 of file LayerEditorUtils.cpp.
References Profile2DItem::valueDescriptors().
DoubleDescriptors LayerEditorUtils::doubleDescriptorsOfItem | ( | RotationItem * | item | ) |
Definition at line 144 of file LayerEditorUtils.cpp.
References RotationItem::rotationValues().
QList< QColor > LayerEditorUtils::predefinedLayerColors | ( | ) |
Definition at line 239 of file LayerEditorUtils.cpp.
Referenced by LayerForm::LayerForm(), SampleEditorController::addLayerFromUndo(), and LayerOrientedSampleEditor::createLayerColors().
void LayerEditorUtils::updateLabelUnit | ( | QLabel * | label | ) |
Definition at line 60 of file LayerEditorUtils.cpp.
Referenced by addMultiPropertyToGrid(), FormLayouter::insertValue(), updateLabelUnit(), and MultiLayerForm::updateUnits().
void LayerEditorUtils::updateLabelUnit | ( | QLabel * | label, |
DoubleSpinBox * | editor | ||
) |
Definition at line 55 of file LayerEditorUtils.cpp.
References DoubleSpinBox::displayUnitAsString(), and updateLabelUnit().