30 if (
item->modelType() ==
"GroupProperty" &&
item->parent() ==
this)
36 std::unique_ptr<ParameterDistribution>
39 std::unique_ptr<ParameterDistribution> P_par_distr{};
46 double sigma_factor(0);
58 P_par_distr = std::make_unique<ParameterDistribution>(
59 parameter_name, *P_distribution, nbr_samples, sigma_factor,
limits);
73 if (
item->modelType() ==
"DistributionNone") {
74 distributionNone =
item;
79 if (!distributionNone)
83 const QString editor_type =
90 if (
item == distributionNone)
97 ->setEditorType(editor_type)
135 ASSERT(group_type ==
"Distribution extended group"
136 || group_type ==
"Symmetric distribution group");
143 return distItem->createDistribution(
scaleFactor());
#define ASSERT(condition)
Defines class BeamDistributionItem.
Defines classes representing one-dimensional distributions.
Defines class ParameterDistribution.
Defines interface IParameterTranslator and subclasses.
Defines RealLimitsItems's classes.
Defines some unit conversion factors and other constants in namespace Units.
void initDistributionItem(bool show_mean)
Propagates the value and limits stored in DistributionNone type into alls distributions.
std::unique_ptr< ParameterDistribution > getParameterDistributionForName(const std::string ¶meter_name) const
returns parameter distribution to add into the ISimulation
static const QString P_DISTRIBUTION
virtual std::unique_ptr< IDistribution1D > createDistribution1D() const
void resetToValue(double value)
BeamDistributionItem(const QString &name, bool show_mean)
virtual double scaleFactor() const
Scales the values provided by distribution (to perform deg->rad conversion in the case of AngleDistri...
void register_distribution_group(const QString &group_type)
virtual double meanValue() const
Returns mean value of the distribution.
void init_parameters(double value, const RealLimits &limits=RealLimits::limitless())
Provides initialization of the distribution with some reasonable parameters around given value.
static const QString P_LIMITS
virtual void showMean(bool)=0
static const QString P_NUMBER_OF_SAMPLES
static const QString P_SIGMA_FACTOR
static const QString T_ITEMS
void setOnChildPropertyChange(std::function< void(SessionItem *, QString)> f, const void *caller=0)
Calls back on child property change, report childItem and property name.
virtual RealLimits createRealLimits(double scale_factor=1.0) const =0
Limits for a real fit parameter.
bool isTag(const QString &name) const
Returns true if tag is available.
T & groupItem(const QString &groupName) const
SessionItem * getGroupItem(const QString &groupName) const
Access subitem of group item.
QVariant value() const
Get value.
void setVisible(bool enabled)
Flags accessors.
QString editorType() const
QVariant getItemValue(const QString &tag) const
Directly access value of item under given tag.
SessionItem * addGroupProperty(const QString &groupTag, const QString &groupType)
Creates new group item and register new tag, returns GroupItem.
ModelMapper * mapper()
Returns the current model mapper of this item. Creates new one if necessary.
void addTranslator(const IPathTranslator &translator)
T * item(const QString &tag) const
void setItemValue(const QString &tag, const QVariant &variant)
Directly set value of item under given tag.
SessionItem * setGroupProperty(const QString &groupTag, const QString &modelType) const
Set the current type of group item.
RealLimits limits() const
SessionItem * getItem(const QString &tag="", int row=0) const
Returns item in given row of given tag.
static const QString P_MEAN
QString const & name(EShape k)