22 #include "Sample/Particle/Particle.h"
23 #include "Sample/Scattering/Rotations.h"
27 const QString abundance_tooltip =
"Proportion of this type of particles normalized to the \n"
28 "total number of particles in the layout";
30 const QString position_tooltip =
"Relative position of the particle's reference point \n"
31 "in the coordinate system of the parent (nm)";
49 Serialize::rwSelected<RotationItemCatalog>(s,
m_rotation);
50 Serialize::rwSelected<FormFactorItemCatalog>(s,
m_formFactor);
59 particle->setParticlePosition(
position());
61 particle->setRotation(*r);
Defines class MaterialItem.
Defines class ParticleCoreShellItem.
Defines class ParticleItem.
Defines class RotationItemCatalog.
QString m_materialIdentifier
MaterialItem * materialItem() const
Returns the material item this item links to.
VectorProperty m_position
SelectionProperty< RotationItem * > m_rotation
std::unique_ptr< IRotation > createRotation() const
nullptr only if "no rotation". Can contain identity!
DoubleDescriptor abundance() const
DoubleProperty m_abundance
std::unique_ptr< Material > createMaterial() const
SelectionProperty< FormFactorItem * > m_formFactor
std::unique_ptr< Particle > createParticle() const
void serialize(Streamer &s) override
ParticleItem(const MaterialItems *materials)
QVector< ItemWithParticles * > containedItemsWithParticles() const override
Return full hierarchical contained items with particles.
FormFactorItem * formfactor_at_bottom() const
void setFormFactor(FormFactorItem *p)
void set(T t, bool callInitializer=false)
Directly set the new item.
T get() const
Direct access to the stored pointer.
void init(const QString &label, const QString &tooltip, const QString &persistentTag, ArgsForCreation... argsForCreation)
Initialize by means of a catalog class and optional creation arguments.
Supports serialization to or deserialization from QXmlStream.
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
void rwProperty(Streamer &s, DoubleProperty &d)
void rwValue(Streamer &s, const QString &tag, bool &val)