15 #ifndef BORNAGAIN_GUI_MODEL_SAMPLE_MATERIALITEM_H
16 #define BORNAGAIN_GUI_MODEL_SAMPLE_MATERIALITEM_H
20 #include <heinz/Complex.h>
21 #include <heinz/Vectors3D.h>
28 class QXmlStreamReader;
29 class QXmlStreamWriter;
119 std::variant<Refractive, complex_t>
m_data;
@ other
The unit has no enum value defined in here (e.g. when defined as an explicit string)
Describes properties of a double value which are necessary to allow GUI representation,...
QString uidForDescriptor(const QString &lastPart) const
Returns a unique identifier for descriptors.
bool hasRefractiveIndex() const
void serialize(Streamer &s)
void createNewIdentifier()
void setScatteringLengthDensity(complex_t sld)
Turns material into SLD based material.
void readContentFrom(QXmlStreamReader *reader)
bool operator!=(const MaterialItem &other) const
QString matItemName() const
void setIdentifier(const QString &id)
std::variant< Refractive, complex_t > m_data
void setMagnetization(const R3 &magnetization)
void updateFrom(const MaterialItem &other)
Updates content from the other material.
bool operator==(const MaterialItem &other) const
Compares all contents. The inactive contents (e.g. SLD in case of refractive) are not taken into acco...
QString identifier() const
void setRefractiveIndex(double delta, double beta)
Turns material into refractive index material.
std::unique_ptr< Material > createMaterial() const
void setMatItemName(const QString &name)
VectorDescriptor magnetizationVector()
void setColor(const QColor &color)
void writeContentTo(QXmlStreamWriter *writer) const
Supports serialization to or deserialization from QXmlStream.
Describes properties of a 3D vector, consisting of three double values.
QString const & name(EShape k)
Refractive(double d, double b)
bool operator==(const Refractive &o) const
bool operator!=(const Refractive &o) const