Skip to content
Snippets Groups Projects

Reduce SessionItem signaling

Merged m.puchner requested to merge ReduceSessionItemSignalingAndMore into develop
1 file
+ 6
15
Compare changes
  • Side-by-side
  • Inline
@@ -21,24 +21,13 @@
#include "GUI/Model/Sample/ParticleItem.h"
#include "GUI/Model/Types/DoubleDescriptor.h"
namespace {
const QString density_tooltip =
"Number of particles per square nanometer (particle surface density).\n "
"Should be defined for disordered and 1d-ordered particle collections.";
const QString weight_tooltip =
"Weight of this particle layout.\n"
"Should be used when multiple layouts define different domains in the sample.";
} // namespace
ParticleLayoutItem::ParticleLayoutItem() : SessionItem(M_TYPE)
{
setToolTip("A layout of particles");
addProperty(P_TOTAL_DENSITY, 0.01)->setToolTip(density_tooltip);
addProperty(P_TOTAL_DENSITY, 0.01);
getItem(P_TOTAL_DENSITY)->setDecimals(10);
addProperty(P_WEIGHT, 1.0)->setToolTip(weight_tooltip);
addProperty(P_WEIGHT, 1.0);
registerTag(T_PARTICLES, 0, -1,
{ParticleItem::M_TYPE, ParticleCoreShellItem::M_TYPE,
@@ -85,10 +74,12 @@ double ParticleLayoutItem::totalDensity() const
}
}
DoubleDescriptor ParticleLayoutItem::weight() const
{
return DoubleDescriptor(getItem(P_WEIGHT), Unit::unitless);
DoubleDescriptor d(getItem(P_WEIGHT), Unit::unitless);
d.tooltip = "Weight of this particle layout.\n"
"Should be used when multiple layouts define different domains in the sample.";
return d;
}
QVector<ItemWithParticles*> ParticleLayoutItem::particles() const
Loading