21 void setupDistributionMean(
SessionItem* distribution);
22 void setAxisPresentationDefaults(
SessionItem* axis_item,
const QString& type);
47 auto axis_item = group_item->getChildOfType(
"PointwiseAxis");
61 setAxisPresentationDefaults(group_item->currentItem(), group_item->currentType());
63 group_item->setCurrentType(
"BasicAxis");
64 setAxisPresentationDefaults(group_item->currentItem(), group_item->currentType());
66 group_item->setToolTip(
"Axis type selected");
67 group_item->setDisplayName(
"Axis type");
68 group_item->setEnabled(
false);
69 group_item->mapper()->setOnValueChange(
71 if (group_item->currentItem()->modelType() ==
"PointwiseAxis")
72 group_item->setEnabled(
true);
78 void setupDistributionMean(
SessionItem* distribution)
90 void setAxisPresentationDefaults(
SessionItem* item,
const QString& type)
96 axis_item->setTitle(
"alpha_i");
103 if (type ==
"BasicAxis") {
104 axis_item->setLowerBound(0.0);
105 axis_item->setUpperBound(3.0);
106 axis_item->setBinCount(500);
107 }
else if (type ==
"PointwiseAxis") {
#define ASSERT(condition)
Defines pointwise axis item.
Declares the class SpecularBeamInclinationItem.
Defines some unit conversion factors and other constants in namespace Units.
static const QString P_NBINS
static const QString P_MAX_DEG
static const QString P_TITLE
static const QString P_MIN_DEG
The BeamDistributionItem handles wavelength, inclination and azimuthal parameter distribution for Bea...
void initDistributionItem(bool show_mean)
Propagates the value and limits stored in DistributionNone type into alls distributions.
static const QString P_DISTRIBUTION
void register_distribution_group(const QString &group_type)
SessionItem * setCurrentType(const QString &modelType)
static const QString P_FILE_NAME
static RealLimits limited(double left_bound_value, double right_bound_value)
Creates an object bounded from the left and right.
SessionItem & setDecimals(int n)
SessionItem * getGroupItem(const QString &groupName) const
Access subitem of group item.
bool setValue(QVariant value)
Set value, ensure that variant types match.
SessionItem * addGroupProperty(const QString &groupTag, const QString &groupType)
Creates new group item and register new tag, returns GroupItem.
SessionItem * getItem(const QString &tag="", int row=0) const
Returns item in given row of given tag.
SessionItem & setLimits(const RealLimits &value)
static const QString P_ALPHA_AXIS
double scaleFactor() const override
Scales the values provided by distribution (to perform deg->rad conversion in the case of AngleDistri...
SpecularBeamInclinationItem()
void updateFileName(const QString &filename)
~SpecularBeamInclinationItem() override
static const bool m_show_mean
static const QString P_MEAN
std::string filename(const std::string &path)
Returns path without directory part ("Foo/Bar/Doz.int.gz" -> "Doz.int.gz")
static constexpr double deg