21 const variant<QString, Unit>& unit,
const QString& persistentTag)
24 m_uid = QUuid::createUuid().toString();
33 if (QXmlStreamWriter* w = s.
xmlWriter()) {
38 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
39 r->readNextStartElement();
Defines class VectorProperty.
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.
void init(const QString &_label, const QString &_tooltip, const R3 *vec, const variant< QString, Unit > &_unit)
function< QString()> uid
unique id describing this value. Used e.g. for undo/redo
Holds a 3D vector of type R3 as well as additional info like label, tooltip.
QString persistentTag() const
void setUid(const QString &uid)
void init(const QString &label, const QString &tooltip, const variant< QString, Unit > &unit, const QString &persistentTag)
VectorDescriptor m_descriptor
void readAttribute(QXmlStreamReader *reader, const QString &attributeName, double *d)
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)