BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Definition at line 31 of file MultiLayerItem.h.
Public Member Functions | |
MultiLayerItem () | |
LayerItem * | addLayer (int index=-1) |
Creates and inserts a layer at given index. More... | |
void | addStandardMaterials () |
DoubleDescriptor | crossCorrLength () const |
QString | description () const |
R3 | externalField () const |
VectorDescriptor | externalFieldVector () const |
void | initFrom (const MultiLayerItem *other) |
QVector< ItemWithMaterial * > | itemsWithMaterial () const |
QVector< LayerItem * > | layers () const |
MaterialItems & | materialItems () |
const MaterialItems & | materialItems () const |
void | moveLayer (LayerItem *item, LayerItem *beforeThisLayer) |
void | readContentFrom (QXmlStreamReader *reader) |
void | removeLayer (LayerItem *item) |
QString | sampleName () const |
void | serialize (Streamer &s) |
void | setDescription (const QString &description) |
void | setExternalField (const R3 &externalField) |
void | setSampleName (const QString &name) |
void | writeContentTo (QXmlStreamWriter *writer) const |
Private Attributes | |
DoubleProperty | m_crossCorrelationLength |
QString | m_description |
VectorProperty | m_externalField |
QVector< LayerItem * > | m_layers |
MaterialItems | m_materials |
QString | m_name |
MultiLayerItem::MultiLayerItem | ( | ) |
Definition at line 21 of file MultiLayerItem.cpp.
References VectorProperty::init(), DoubleProperty::init(), m_crossCorrelationLength, m_externalField, m_name, and nanometer.
LayerItem * MultiLayerItem::addLayer | ( | int | index = -1 | ) |
Creates and inserts a layer at given index.
No properties etc. have been initialized, this has to be done by the caller If index = -1, create a layer at the end of the list.
Definition at line 96 of file MultiLayerItem.cpp.
References m_layers, and m_materials.
Referenced by SampleEditorController::addLayerFromUndo(), and CommandRemoveLayer::undo().
void MultiLayerItem::addStandardMaterials | ( | ) |
Definition at line 43 of file MultiLayerItem.cpp.
References MaterialItems::addRefractiveMaterial(), and m_materials.
DoubleDescriptor MultiLayerItem::crossCorrLength | ( | ) | const |
Definition at line 71 of file MultiLayerItem.cpp.
References m_crossCorrelationLength.
Referenced by MultiLayerForm::MultiLayerForm(), and ParameterTreeBuilder::addSample().
QString MultiLayerItem::description | ( | ) | const |
Definition at line 61 of file MultiLayerItem.cpp.
References m_description.
Referenced by MultiLayerForm::MultiLayerForm(), and setDescription().
R3 MultiLayerItem::externalField | ( | ) | const |
Definition at line 76 of file MultiLayerItem.cpp.
References m_externalField.
Referenced by setExternalField().
VectorDescriptor MultiLayerItem::externalFieldVector | ( | ) | const |
Definition at line 86 of file MultiLayerItem.cpp.
References m_externalField.
Referenced by MultiLayerForm::MultiLayerForm(), and ParameterTreeBuilder::addSample().
void MultiLayerItem::initFrom | ( | const MultiLayerItem * | other | ) |
Definition at line 30 of file MultiLayerItem.cpp.
References GUI::Util::copyContents(), and other.
Referenced by JobItem::copySampleIntoJob().
QVector< ItemWithMaterial * > MultiLayerItem::itemsWithMaterial | ( | ) | const |
Definition at line 35 of file MultiLayerItem.cpp.
References m_layers.
Referenced by MaterialEditorDialog::identifiersOfUsedMaterials().
QVector< LayerItem * > MultiLayerItem::layers | ( | ) | const |
Definition at line 91 of file MultiLayerItem.cpp.
References m_layers.
Referenced by CommandRemoveLayer::CommandRemoveLayer(), MultiLayerForm::MultiLayerForm(), SampleEditorController::addLayer(), SampleEditorController::addLayerFromUndo(), ParameterTreeBuilder::addSample(), LayerOrientedSampleEditor::createLayerColors(), LayerForm::enableStructureEditing(), SampleValidator::isValidMultiLayer(), GUI::Transform::ToCore::itemToSample(), MultiLayerForm::onLayerAdded(), MultiLayerForm::onLayerMoved(), RealSpaceBuilder::populateMultiLayer(), SampleEditorController::removeLayerFromUndo(), LayerForm::updateLayerPositionDependentElements(), and LayerForm::updateTitle().
MaterialItems & MultiLayerItem::materialItems | ( | ) |
Definition at line 168 of file MultiLayerItem.cpp.
References m_materials.
Referenced by MaterialEditorDialog::MaterialEditorDialog(), MaterialEditorDialog::accept(), ParameterTreeBuilder::addMaterials(), SampleEditorController::materialItems(), MaterialInplaceForm::selectMaterial(), and RealSpaceCanvas::updateScene().
const MaterialItems & MultiLayerItem::materialItems | ( | ) | const |
Definition at line 163 of file MultiLayerItem.cpp.
References m_materials.
Definition at line 119 of file MultiLayerItem.cpp.
References m_layers.
Referenced by SampleEditorController::onStoppedToMoveLayer().
void MultiLayerItem::readContentFrom | ( | QXmlStreamReader * | reader | ) |
Definition at line 138 of file MultiLayerItem.cpp.
References serialize().
Referenced by JobItem::readNonSessionItems().
void MultiLayerItem::removeLayer | ( | LayerItem * | item | ) |
Definition at line 108 of file MultiLayerItem.cpp.
References m_layers.
Referenced by SampleEditorController::removeLayerFromUndo().
QString MultiLayerItem::sampleName | ( | ) | const |
Definition at line 51 of file MultiLayerItem.cpp.
References m_name.
Referenced by MultiLayerForm::MultiLayerForm(), and JobItem::sampleName().
void MultiLayerItem::serialize | ( | Streamer & | s | ) |
Definition at line 144 of file MultiLayerItem.cpp.
References Streamer::assertVersion(), m_crossCorrelationLength, m_description, m_externalField, m_layers, m_materials, m_name, Serialize::rwClass(), Serialize::rwProperty(), Serialize::rwValue(), Serialize::rwVector(), and Streamer::xmlReader().
Referenced by readContentFrom(), and writeContentTo().
void MultiLayerItem::setDescription | ( | const QString & | description | ) |
Definition at line 66 of file MultiLayerItem.cpp.
References description(), and m_description.
Referenced by SampleListModel::setData(), and SampleEditorController::setSampleDescription().
void MultiLayerItem::setExternalField | ( | const R3 & | externalField | ) |
Definition at line 81 of file MultiLayerItem.cpp.
References externalField(), m_externalField, and VectorProperty::set().
void MultiLayerItem::setSampleName | ( | const QString & | name | ) |
Definition at line 56 of file MultiLayerItem.cpp.
References m_name, and GUI::RealSpace::Particles::name().
Referenced by SampleListModel::createSample(), SampleListModel::createSampleFromExamples(), SampleListModel::setData(), and SampleEditorController::setSampleName().
void MultiLayerItem::writeContentTo | ( | QXmlStreamWriter * | writer | ) | const |
Definition at line 132 of file MultiLayerItem.cpp.
References serialize().
Referenced by JobItem::writeNonSessionItems().
|
private |
Definition at line 74 of file MultiLayerItem.h.
Referenced by MultiLayerItem(), crossCorrLength(), and serialize().
|
private |
Definition at line 73 of file MultiLayerItem.h.
Referenced by description(), serialize(), and setDescription().
|
private |
Definition at line 75 of file MultiLayerItem.h.
Referenced by MultiLayerItem(), externalField(), externalFieldVector(), serialize(), and setExternalField().
|
private |
Definition at line 76 of file MultiLayerItem.h.
Referenced by addLayer(), itemsWithMaterial(), layers(), moveLayer(), removeLayer(), and serialize().
|
private |
Definition at line 77 of file MultiLayerItem.h.
Referenced by addLayer(), addStandardMaterials(), materialItems(), and serialize().
|
private |
Definition at line 72 of file MultiLayerItem.h.
Referenced by MultiLayerItem(), sampleName(), serialize(), and setSampleName().