Skip to content
Snippets Groups Projects

Init axes properties only in constructor

Merged Mikhail Svechnikov requested to merge m.0 into main
All threads resolved!
6 files
+ 12
43
Compare changes
  • Side-by-side
  • Inline
Files
6
@@ -27,26 +27,11 @@ const QString ExpandGroupbox("ExpandGroupbox"); // obsolete since v22.0
} // namespace
AxisProperty::AxisProperty() = default;
AxisProperty::AxisProperty(const QString& name, const QString& unit)
{
initMin(name + "_min (" + unit + ")", name + "_min (" + unit + ")", -1.,
RealLimits::limitless(), 3);
initMax(name + "_max (" + unit + ")", name + "_max (" + unit + ")", +1.,
RealLimits::limitless(), 3);
}
void AxisProperty::initMin(const QString& label, const QString& tooltip, double value,
const RealLimits& limits, uint decimals)
{
m_min.init(label, tooltip, value, decimals, limits, "min");
}
void AxisProperty::initMax(const QString& label, const QString& tooltip, double value,
const RealLimits& limits, uint decimals)
AxisProperty::AxisProperty(const QString& name, const QString& unit, double _min, double _max,
const RealLimits& limit)
{
m_max.init(label, tooltip, value, decimals, limits, "max");
m_min.init("Min (" + unit + ")", "Lower edge of first " + name + "-bin", _min, 3, limit, "min");
m_max.init("Max (" + unit + ")", "Upper edge of last " + name + "-bin", _max, 3, limit, "max");
}
void AxisProperty::writeTo(QXmlStreamWriter* w) const
Loading