BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Form for editing a particle layout.
Definition at line 32 of file ParticleLayoutForm.h.
Public Member Functions | |
ParticleLayoutForm (LayerForm *parent, ParticleLayoutItem *layoutItem, SampleEditorController *ec) | |
void | enableStructureEditing (bool b) |
ParticleLayoutItem * | layoutItem () const |
void | onAboutToRemoveParticle (ItemWithParticles *item) |
void | onParticleAdded (ItemWithParticles *item) |
void | updateDensityEnabling () |
Disable/enable total density property depending on type of interference function. More... | |
void | updateDensityValue () |
Update the shown density value. More... | |
void | updateTitle (const LayerItem *layerItem) |
Private Attributes | |
GroupBoxCollapser * | m_collapser |
SampleEditorController * | m_ec |
QFormLayout * | m_layout |
ParticleLayoutItem * | m_layoutItem |
QAction * | m_removeAction |
QList< QWidget * > | m_structureEditingWidgets |
DoubleSpinBox * | m_totalDensitySpinBox |
ParticleLayoutForm::ParticleLayoutForm | ( | LayerForm * | parent, |
ParticleLayoutItem * | layoutItem, | ||
SampleEditorController * | ec | ||
) |
Definition at line 31 of file ParticleLayoutForm.cpp.
References GroupBoxCollapser::addAction(), SampleEditorController::addParticle(), FormLayouter::addRow(), FormLayouter::addStructureEditingRow(), FormLayouter::addValue(), LayerEditorUtils::createAddParticleButton(), ActionFactory::createRemoveAction(), ActionFactory::createShowInRealSpaceAction(), LayerEditorUtils::createWidgetForItemWithParticles(), GroupBoxCollapser::installIntoGroupBox(), LayerForm::layerItem(), FormLayouter::layout(), layoutItem(), m_collapser, m_layout, m_layoutItem, m_removeAction, m_structureEditingWidgets, m_totalDensitySpinBox, ParticleLayoutItem::particles(), SampleEditorController::removeLayout(), SampleEditorController::requestViewInRealSpace(), FormLayouter::setContentsMargins(), ParticleLayoutItem::totalDensity(), updateDensityEnabling(), updateTitle(), ParticleLayoutItem::weight(), and FormLayouter::widgetAt().
void ParticleLayoutForm::enableStructureEditing | ( | bool | b | ) |
Definition at line 71 of file ParticleLayoutForm.cpp.
References m_removeAction, and m_structureEditingWidgets.
ParticleLayoutItem * ParticleLayoutForm::layoutItem | ( | ) | const |
Definition at line 78 of file ParticleLayoutForm.cpp.
References m_layoutItem.
Referenced by ParticleLayoutForm().
void ParticleLayoutForm::onAboutToRemoveParticle | ( | ItemWithParticles * | item | ) |
Definition at line 93 of file ParticleLayoutForm.cpp.
References m_layout, m_layoutItem, and ParticleLayoutItem::particles().
void ParticleLayoutForm::onParticleAdded | ( | ItemWithParticles * | item | ) |
Definition at line 83 of file ParticleLayoutForm.cpp.
References LayerEditorUtils::createWidgetForItemWithParticles(), m_ec, m_layout, m_layoutItem, and ParticleLayoutItem::particles().
void ParticleLayoutForm::updateDensityEnabling | ( | ) |
Disable/enable total density property depending on type of interference function.
E.g. 2-dimensional interference calculates density automatically, so the property shown in the particle layout shall be disabled.
Definition at line 102 of file ParticleLayoutForm.cpp.
References m_layoutItem, m_totalDensitySpinBox, and ParticleLayoutItem::totalDensityIsDefinedByInterference().
Referenced by ParticleLayoutForm().
void ParticleLayoutForm::updateDensityValue | ( | ) |
Update the shown density value.
This does not update any internal values, it only refreshes the shown value.
Definition at line 107 of file ParticleLayoutForm.cpp.
References m_totalDensitySpinBox, and DoubleSpinBox::updateValue().
void ParticleLayoutForm::updateTitle | ( | const LayerItem * | layerItem | ) |
Definition at line 112 of file ParticleLayoutForm.cpp.
References LayerItem::layouts(), m_collapser, m_layoutItem, and GroupBoxCollapser::setTitle().
Referenced by ParticleLayoutForm().
|
private |
Definition at line 63 of file ParticleLayoutForm.h.
Referenced by ParticleLayoutForm(), and updateTitle().
|
private |
Definition at line 60 of file ParticleLayoutForm.h.
Referenced by onParticleAdded().
|
private |
Definition at line 57 of file ParticleLayoutForm.h.
Referenced by ParticleLayoutForm(), onAboutToRemoveParticle(), and onParticleAdded().
|
private |
Definition at line 58 of file ParticleLayoutForm.h.
Referenced by ParticleLayoutForm(), layoutItem(), onAboutToRemoveParticle(), onParticleAdded(), updateDensityEnabling(), and updateTitle().
|
private |
Definition at line 59 of file ParticleLayoutForm.h.
Referenced by ParticleLayoutForm(), and enableStructureEditing().
|
private |
Definition at line 61 of file ParticleLayoutForm.h.
Referenced by ParticleLayoutForm(), and enableStructureEditing().
|
private |
Definition at line 62 of file ParticleLayoutForm.h.
Referenced by ParticleLayoutForm(), updateDensityEnabling(), and updateDensityValue().