BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Definition at line 26 of file ItemWithMaterial.h.
Public Member Functions | |
ItemWithMaterial (const MaterialItems *materials) | |
Overhand the material list where the current material has to be searched for. More... | |
QColor | materialColor () const |
QString | materialIdentifier () const |
MaterialItem * | materialItem () const |
Returns the material item this item links to. More... | |
QString | materialName () const |
void | setMaterial (const MaterialItem *materialItem) |
Set the material this item shall use. Stores the identifier, not the pointer! More... | |
void | setMaterial (const QString &materialIdentifier) |
Set the material this item shall use. Stores the given identifier, not a pointer to the material! More... | |
void | setMaterialUndefined () |
Set "no material defined". More... | |
Protected Attributes | |
QString | m_materialIdentifier |
const MaterialItems * | m_materialItems |
|
explicit |
Overhand the material list where the current material has to be searched for.
Definition at line 31 of file ItemWithMaterial.cpp.
References m_materialItems.
QColor ItemWithMaterial::materialColor | ( | ) | const |
Definition at line 42 of file ItemWithMaterial.cpp.
References MaterialItem::color(), and materialItem().
Referenced by GUI::View::TransformTo3D::createLayer().
QString ItemWithMaterial::materialIdentifier | ( | ) | const |
Definition at line 54 of file ItemWithMaterial.cpp.
References m_materialIdentifier.
Referenced by materialItem(), MaterialInplaceForm::selectMaterial(), setMaterial(), and SampleEditorController::setMaterialValue().
MaterialItem * ItemWithMaterial::materialItem | ( | ) | const |
Returns the material item this item links to.
Definition at line 59 of file ItemWithMaterial.cpp.
References m_materialItems, MaterialItems::materialFromIdentifier(), and materialIdentifier().
Referenced by ParticleItem::createParticle(), MaterialInplaceForm::createWidgets(), materialColor(), materialName(), MaterialInplaceForm::selectMaterial(), and setMaterial().
QString ItemWithMaterial::materialName | ( | ) | const |
Definition at line 48 of file ItemWithMaterial.cpp.
References materialItem(), and MaterialItem::matItemName().
Referenced by LayerForm::updateTitle().
void ItemWithMaterial::setMaterial | ( | const MaterialItem * | materialItem | ) |
Set the material this item shall use. Stores the identifier, not the pointer!
Definition at line 20 of file ItemWithMaterial.cpp.
References MaterialItem::identifier(), m_materialIdentifier, and materialItem().
Referenced by SampleEditorController::addLayerFromUndo(), GUI::Transform::FromCore::itemizeSample(), and SampleEditorController::selectMaterial().
void ItemWithMaterial::setMaterial | ( | const QString & | materialIdentifier | ) |
Set the material this item shall use. Stores the given identifier, not a pointer to the material!
Definition at line 25 of file ItemWithMaterial.cpp.
References m_materialIdentifier, and materialIdentifier().
void ItemWithMaterial::setMaterialUndefined | ( | ) |
Set "no material defined".
Definition at line 37 of file ItemWithMaterial.cpp.
References m_materialIdentifier.
|
protected |
Definition at line 51 of file ItemWithMaterial.h.
Referenced by materialIdentifier(), LayerItem::serialize(), ParticleItem::serialize(), setMaterial(), and setMaterialUndefined().
|
protected |
Definition at line 50 of file ItemWithMaterial.h.
Referenced by ItemWithMaterial(), LayerItem::addLayout(), materialItem(), and LayerItem::serialize().