BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Definition at line 28 of file ParticleLayoutItem.h.
Public Member Functions | |
ParticleLayoutItem (const MaterialItems *materials) | |
void | addParticle (ItemWithParticles *particle) |
QVector< ItemWithParticles * > | containedItemsWithParticles () const |
Return full hierarchical contained items with particles. More... | |
SelectionDescriptor< InterferenceItem * > | interference () const |
DoubleDescriptor | ownDensity () const |
The density value which belonging only to the layout. More... | |
QVector< ItemWithParticles * > | particles () const |
The particles this layout contains. More... | |
void | removeInterference () |
void | removeParticle (ItemWithParticles *particle) |
void | serialize (Streamer &s) |
void | setInterference (InterferenceItem *interference) |
DoubleDescriptor | totalDensity () const |
The real density. More... | |
bool | totalDensityIsDefinedByInterference () const |
Returns whether total density is defined by the currently selected interference. More... | |
double | totalDensityValue () const |
DoubleDescriptor | weight () const |
Private Attributes | |
SelectionProperty< InterferenceItem * > | m_interference |
const MaterialItems * | m_materials |
DoubleProperty | m_ownDensity |
QVector< ItemWithParticles * > | m_particles |
DoubleProperty | m_weight |
ParticleLayoutItem::ParticleLayoutItem | ( | const MaterialItems * | materials | ) |
Definition at line 25 of file ParticleLayoutItem.cpp.
References SelectionProperty< T >::init(), DoubleProperty::init(), m_interference, m_ownDensity, m_weight, nanometerMinus2, and unitless.
void ParticleLayoutItem::addParticle | ( | ItemWithParticles * | particle | ) |
Definition at line 93 of file ParticleLayoutItem.cpp.
References m_particles.
Referenced by SampleEditorController::addParticle(), and GUI::Transform::FromCore::itemizeSample().
QVector< ItemWithParticles * > ParticleLayoutItem::containedItemsWithParticles | ( | ) | const |
Return full hierarchical contained items with particles.
Definition at line 104 of file ParticleLayoutItem.cpp.
References m_particles.
Referenced by LayerItem::itemsWithParticles().
SelectionDescriptor< InterferenceItem * > ParticleLayoutItem::interference | ( | ) | const |
Definition at line 112 of file ParticleLayoutItem.cpp.
References m_interference.
Referenced by InterferenceForm::InterferenceForm(), ParameterTreeBuilder::addInterference(), InterferenceForm::createInterferenceWidgets(), SampleEditorController::selectInterference(), and setInterference().
DoubleDescriptor ParticleLayoutItem::ownDensity | ( | ) | const |
The density value which belonging only to the layout.
This is the editable value. If an interference is present, this value may not be the one to be used for building the domain layout or to be presented. For the correct value-to-use, whether an interference is present or not, use totalDensity().
Definition at line 40 of file ParticleLayoutItem.cpp.
References m_ownDensity.
Referenced by GUI::Transform::FromCore::itemizeSample(), and totalDensity().
QVector< ItemWithParticles * > ParticleLayoutItem::particles | ( | ) | const |
The particles this layout contains.
Note that this is not a hierarchical search! Only the topmost particles are returned, not their contained particles. For a hierarchical search use containedItemsWithParticles
Definition at line 88 of file ParticleLayoutItem.cpp.
References m_particles.
Referenced by ParticleLayoutForm::ParticleLayoutForm(), GUI::RealSpace::BuilderUtils::computeCumulativeAbundances(), ParticleLayoutForm::onAboutToRemoveParticle(), ParticleLayoutForm::onParticleAdded(), GUI::RealSpace::BuilderUtils::particle3DContainerVector(), and RealSpaceBuilder::populateLayout().
void ParticleLayoutItem::removeInterference | ( | ) |
Definition at line 122 of file ParticleLayoutItem.cpp.
References m_interference, and SelectionProperty< T >::set().
void ParticleLayoutItem::removeParticle | ( | ItemWithParticles * | particle | ) |
Definition at line 98 of file ParticleLayoutItem.cpp.
References m_particles.
void ParticleLayoutItem::serialize | ( | Streamer & | s | ) |
Definition at line 133 of file ParticleLayoutItem.cpp.
References Streamer::assertVersion(), m_interference, m_materials, m_ownDensity, m_particles, m_weight, and Serialize::rwProperty().
void ParticleLayoutItem::setInterference | ( | InterferenceItem * | interference | ) |
Definition at line 117 of file ParticleLayoutItem.cpp.
References interference(), m_interference, and SelectionProperty< T >::set().
DoubleDescriptor ParticleLayoutItem::totalDensity | ( | ) | const |
The real density.
Returns ownDensity() if the interference is not influencing the density. If the interference is defining the density, this is the interference-calculated density.
Definition at line 45 of file ParticleLayoutItem.cpp.
References DoubleDescriptor::get, m_ownDensity, ownDensity(), DoubleDescriptor::path, DoubleDescriptor::set, DoubleProperty::set(), totalDensityIsDefinedByInterference(), totalDensityValue(), and DoubleProperty::uid().
Referenced by ParticleLayoutForm::ParticleLayoutForm(), and RealSpaceBuilder::populateLayout().
bool ParticleLayoutItem::totalDensityIsDefinedByInterference | ( | ) | const |
Returns whether total density is defined by the currently selected interference.
Two dimensional interference calculates density automatically; in these cases the "own" total density value should not be edited but set by the one from the interference.
Definition at line 127 of file ParticleLayoutItem.cpp.
References SelectionProperty< T >::get(), and m_interference.
Referenced by totalDensity(), totalDensityValue(), and ParticleLayoutForm::updateDensityEnabling().
double ParticleLayoutItem::totalDensityValue | ( | ) | const |
Definition at line 58 of file ParticleLayoutItem.cpp.
References SelectionProperty< T >::get(), m_interference, m_ownDensity, totalDensityIsDefinedByInterference(), and Lattice2DItem::unitCellArea().
Referenced by totalDensity().
DoubleDescriptor ParticleLayoutItem::weight | ( | ) | const |
Definition at line 83 of file ParticleLayoutItem.cpp.
References m_weight.
Referenced by ParticleLayoutForm::ParticleLayoutForm(), and GUI::Transform::FromCore::itemizeSample().
|
private |
Definition at line 75 of file ParticleLayoutItem.h.
Referenced by ParticleLayoutItem(), interference(), removeInterference(), serialize(), setInterference(), totalDensityIsDefinedByInterference(), and totalDensityValue().
|
private |
Definition at line 77 of file ParticleLayoutItem.h.
Referenced by serialize().
|
private |
Definition at line 73 of file ParticleLayoutItem.h.
Referenced by ParticleLayoutItem(), ownDensity(), serialize(), totalDensity(), and totalDensityValue().
|
private |
Definition at line 76 of file ParticleLayoutItem.h.
Referenced by addParticle(), containedItemsWithParticles(), particles(), removeParticle(), and serialize().
|
private |
Definition at line 74 of file ParticleLayoutItem.h.
Referenced by ParticleLayoutItem(), serialize(), and weight().