15 #ifndef BORNAGAIN_GUI_MODEL_DESCRIPTOR_AXISPROPERTY_H
16 #define BORNAGAIN_GUI_MODEL_DESCRIPTOR_AXISPROPERTY_H
18 #include "Base/Axis/FixedBinAxis.h"
44 void initNbins(
const QString& label,
const QString& tooltip, uint n = 100,
45 const variant<QString, Unit>& unit =
"nbins");
47 void initMin(
const QString& label,
const QString& tooltip,
double value,
48 const variant<QString, Unit>& unit,
49 const RealLimits& limits = RealLimits::nonnegative(), uint decimals = 3);
50 void initMax(
const QString& label,
const QString& tooltip,
double value,
51 const variant<QString, Unit>& unit,
52 const RealLimits& limits = RealLimits::nonnegative(), uint decimals = 3);
57 std::unique_ptr<FixedBinAxis>
createAxis(
double scaleFactor)
const;
63 #define AXIS_PROPERTY(nameLower) \
65 AxisProperty m_##nameLower; \
68 AxisProperty& nameLower() const { return *const_cast<AxisProperty*>(&m_##nameLower); }
Defines class DoubleProperty.
Defines class UIntProperty.
Holds values which can be used to describe a FixedBinAxis.
void rwAxisProperty(Streamer &s, const QString &tag)
DOUBLE_PROPERTY(min, Min)
void serialize(Streamer &s)
UINT_PROPERTY(nbins, Nbins)
void initNbins(const QString &label, const QString &tooltip, uint n=100, const variant< QString, Unit > &unit="nbins")
DOUBLE_PROPERTY(max, Max)
void initMin(const QString &label, const QString &tooltip, double value, const variant< QString, Unit > &unit, const RealLimits &limits=RealLimits::nonnegative(), uint decimals=3)
std::unique_ptr< FixedBinAxis > createAxis(double scaleFactor) const
Creates an axis with empty title.
void initMax(const QString &label, const QString &tooltip, double value, const variant< QString, Unit > &unit, const RealLimits &limits=RealLimits::nonnegative(), uint decimals=3)
Supports serialization to or deserialization from QXmlStream.