28 QVector<ItemWithMaterial*> result;
30 QVector<ItemWithParticles*> itemsWithParticles{layout->
particles()};
31 while (!itemsWithParticles.empty()) {
32 auto* item = itemsWithParticles.takeFirst();
37 itemsWithParticles << p->particles();
39 itemsWithParticles << p->basisParticle();
59 RealLimits::lowerLimited(0.0),
"thickness");
62 "Number of horizontal slices.\n"
63 "Used for Average Layer Material calculations \n"
64 "when corresponding simulation option is set.",
82 QVector<ItemWithMaterial*> result;
83 result.push_back(
this);
85 result.append(layoutItemsWithMaterial(layout));
91 QVector<ItemWithParticles*> result;
105 d.
label =
"Top roughness";
106 d.
tooltip =
"Roughness of top interface";
107 d.
options = QStringList{
"No",
"Basic"};
Defines class MesoCrystalItem.
Defines class MultiLayerItem.
Defines class ParticleCompositionItem.
Defines class ParticleCoreShellItem.
Defines class ParticleItem.
Defines class ParticleLayoutItem.
Describes properties of a double value which are necessary to allow GUI representation,...
void init(const QString &label, const QString &tooltip, double value, const variant< QString, Unit > &unit, const QString &persistentTag)
QString m_materialIdentifier
const MaterialItems * m_materialItems
LayerItem(const MaterialItems *materials)
void setIsTopLayer(bool b)
void setLayerName(const QString &name)
UIntDescriptor numSlices() const
ParticleLayoutItem * addLayout()
void setColor(const QColor &color)
std::unique_ptr< LayerBasicRoughnessItem > m_topRoughness
void setIsBottomLayer(bool b)
DoubleProperty m_thickness
QVector< ItemWithParticles * > itemsWithParticles() const
bool isBottomLayer() const
QVector< ParticleLayoutItem * > layouts() const
QVector< ParticleLayoutItem * > m_layouts
DoubleDescriptor thickness() const
void removeLayout(ParticleLayoutItem *layout)
QVector< ItemWithMaterial * > itemsWithMaterial()
void serialize(Streamer &s)
QString layerName() const
SelectionDescriptor< LayerBasicRoughnessItem * > roughness()
QVector< ItemWithParticles * > containedItemsWithParticles() const
Return full hierarchical contained items with particles.
QVector< ItemWithParticles * > particles() const
The particles this layout contains.
Describes a selection (various possibilities and the current one).
function< int()> currentIndexGetter
Function to get currently selected option.
QString label
A label text (short, no trailing colon)
function< T()> currentItem
Function to get currently selected item.
function< void(int)> currentIndexSetter
Function to set currently selected option.
QStringList options
List of options, usually presented as combo entries.
QString tooltip
Tooltip text.
Supports serialization to or deserialization from QXmlStream.
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
Describes properties of a uint value which are necessary to allow GUI representation,...
void init(const QString &label, const QString &tooltip, uint value, const variant< QString, Unit > &unit, const QString &persistentTag)
QString const & name(EShape k)
void rwVector(Streamer &s, const QString &tag, QVector< T > &vec, Args... argsForConstructor)
Serializes a list of items of known and fixed type. Passes optional arguments to the constructor.
void rwProperty(Streamer &s, DoubleProperty &d)
void rwValue(Streamer &s, const QString &tag, bool &val)
void rwOptional(Streamer &s, const QString &tag, std::unique_ptr< ItemClass > &up, ArgsForConstructor... argsForConstructor)
Serializes an optional item of known type. Passes optional arguments to the constructor.