21 if (QXmlStreamWriter* w = s.
xmlWriter()) {
22 w->writeStartElement(tag);
25 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
26 r->readNextStartElement();
36 if (QXmlStreamWriter* w = s.
xmlWriter()) {
37 w->writeStartElement(tag);
40 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
41 r->readNextStartElement();
51 if (QXmlStreamWriter* w = s.
xmlWriter()) {
52 w->writeStartElement(tag);
55 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
56 r->readNextStartElement();
66 if (QXmlStreamWriter* w = s.
xmlWriter()) {
67 w->writeStartElement(tag);
70 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
71 r->readNextStartElement();
81 if (QXmlStreamWriter* w = s.
xmlWriter()) {
82 w->writeStartElement(tag);
83 w->writeAttribute(
XML::Tags::Value, col.isValid() ? col.name(QColor::HexArgb) :
"");
85 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
86 r->readNextStartElement();
89 col = QColor(colName);
97 if (QXmlStreamWriter* w = s.
xmlWriter()) {
98 w->writeStartElement(tag);
99 w->writeCharacters(val.toBase64());
100 w->writeEndElement();
101 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
102 r->readNextStartElement();
104 QString valueAsBase64 = r->readElementText(QXmlStreamReader::SkipChildElements);
105 val = QByteArray::fromBase64(valueAsBase64.toLatin1());
113 if (QXmlStreamWriter* w = s.
xmlWriter()) {
114 w->writeStartElement(tag);
116 w->writeEndElement();
117 }
else if (QXmlStreamReader* r = s.
xmlReader()) {
Supports serialization to or deserialization from QXmlStream.
void gotoEndElementOfTag(const QString &tag)
void assertCurrentTag(const QString &expectedTag) const
void gotoStartElementOfTag(const QString &tag)
QXmlStreamWriter * xmlWriter()
Returns stream writer or nullptr.
QXmlStreamReader * xmlReader()
Returns stream reader or nullptr.
void readAttribute(QXmlStreamReader *reader, const QString &attributeName, double *d)
void writeAttribute(QXmlStreamWriter *writer, const QString &attributeName, const QVariant &variant)
Write the variant's value as an attribute.
void rwValue(Streamer &s, const QString &tag, bool &val)