15 #ifndef BORNAGAIN_GUI_MODEL_DESCRIPTOR_UINTPROPERTY_H
16 #define BORNAGAIN_GUI_MODEL_DESCRIPTOR_UINTPROPERTY_H
18 #include "Fit/Param/RealLimits.h"
41 void init(
const QString& label,
const QString& tooltip, uint value,
42 const variant<QString, Unit>& unit,
const QString&
persistentTag);
43 void init(
const QString& label,
const QString& tooltip, uint value,
44 const variant<QString, Unit>& unit,
const RealLimits& limits,
70 #define UINT_PROPERTY(nameLower, nameUpper) \
72 UIntProperty m_##nameLower; \
75 UIntDescriptor nameLower() const { return m_##nameLower; } \
76 void set##nameUpper(int v) { m_##nameLower.set(v); } \
77 void set##nameUpper(uint v) { m_##nameLower.set(v); } \
78 void set##nameUpper(size_t v) { m_##nameLower.set((int)v); }
Defines class UIntDescriptor.
Base class for a GUI data item.
Supports serialization to or deserialization from QXmlStream.
Describes properties of a uint value which are necessary to allow GUI representation,...
Class for representing a uint value, its attributes and its accessors.
void setUid(const QString &uid)
QString persistentTag() const
UIntDescriptor descriptor() const
UIntDescriptor m_descriptor
void init(const QString &label, const QString &tooltip, uint value, const variant< QString, Unit > &unit, const QString &persistentTag)
Functions to serialize various data types.
void rwProperty(Streamer &s, DoubleProperty &d)