24 bool isInterference2D(
const QString&
name)
26 if (
name ==
"Interference2DLattice" ||
name ==
"Interference2DParaCrystal"
27 ||
name ==
"InterferenceFinite2DLattice" ||
name ==
"InterferenceHardDisk")
38 const QString density_tooltip =
39 "Number of particles per square nanometer (particle surface density).\n "
40 "Should be defined for disordered and 1d-ordered particle collections.";
41 const QString weight_tooltip =
42 "Weight of this particle layout.\n"
43 "Should be used when multiple layouts define different domains in the sample.";
60 QStringList() <<
"Particle"
61 <<
"ParticleCoreShell"
62 <<
"ParticleComposition"
64 <<
"ParticleDistribution");
67 QStringList() <<
"Interference1DLattice"
68 <<
"Interference2DLattice"
69 <<
"Interference2DParaCrystal"
70 <<
"InterferenceFinite2DLattice"
71 <<
"InterferenceHardDisk"
72 <<
"InterferenceRadialParaCrystal");
80 if (isLattice2D(
item) || (
item && isLattice2D(
item->parent())))
93 if (isInterference2D(interferenceItem->modelType()))
103 auto& latticeItem = interferenceItem->groupItem<
Lattice2DItem>(
108 }
catch (
const std::exception&) {
Defines class ComboProperty.
Defines InterferenceFunctionItems's classes.
Defines classes Lattice2DItems.
Defines class ParticleLayoutItem.
static const QString P_LATTICE_TYPE
static const QString P_DENSITY
double unitCellArea() const
void setOnAnyChildChange(std::function< void(SessionItem *)> f, const void *caller=0)
Calls back on any change in children (number of children or their properties), reports childItem.
void setOnChildrenChange(std::function< void(SessionItem *)> f, const void *caller=0)
Calls back when number of children has changed, reports newChild.
static const QString T_PARTICLES
static const QString T_INTERFERENCE
static const QString P_TOTAL_DENSITY
void updateDensityValue()
Updates the value of TotalSurfaceDensity on lattice type change.
void updateDensityAppearance()
Disables/enables total density property, depending on type of interference function.
static const QString P_WEIGHT
SessionItem * addProperty(const QString &name, const QVariant &variant)
Add new property item and register new tag.
SessionItem & setDecimals(int n)
bool registerTag(const QString &name, int min=0, int max=-1, QStringList modelTypes={})
Add new tag to this item with given name, min, max and types.
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
void setDefaultTag(const QString &tag)
Set default tag.
T * item(const QString &tag) const
void setItemValue(const QString &tag, const QVariant &variant)
Directly set value of item under given tag.
SessionItem & setToolTip(const QString &tooltip)
void setEnabled(bool enabled)
SessionItem * getItem(const QString &tag="", int row=0) const
Returns item in given row of given tag.
QString const & name(EShape k)