21 const variant<QString, Unit>& unit,
const QString& persistentTag)
27 const variant<QString, Unit>& unit,
const RealLimits& limits,
28 const QString& persistentTag)
32 m_uid = QUuid::createUuid().toString();
46 if (QXmlStreamWriter* w = s.
xmlWriter()) {
51 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
52 r->readNextStartElement();
Defines class UIntProperty.
Supports serialization to or deserialization from QXmlStream.
void gotoEndElementOfTag(const QString &tag)
void assertCurrentTag(const QString &expectedTag) const
QXmlStreamWriter * xmlWriter()
Returns stream writer or nullptr.
QXmlStreamReader * xmlReader()
Returns stream reader or nullptr.
QString label
A label text (short, no trailing colon)
function< void(uint)> set
function to set the value
variant< QString, Unit > unit
Unit of the value (internal unit only!)
QString tooltip
Tooltip text.
RealLimits limits
Limits of the value.
function< QString()> path
Path describing this value. Used e.g. for undo/redo.
function< uint()> get
function to get the current value
Class for representing a uint value, its attributes and its accessors.
void setUid(const QString &uid)
QString persistentTag() const
UIntDescriptor m_descriptor
void init(const QString &label, const QString &tooltip, uint value, const variant< QString, Unit > &unit, const QString &persistentTag)
void writeUid(QXmlStreamWriter *writer, const QString &id)
void writeAttribute(QXmlStreamWriter *writer, const QString &attributeName, const QVariant &variant)
Write the variant's value as an attribute.
void rwProperty(Streamer &s, DoubleProperty &d)