19 #include <QMutexLocker> 20 #include <QTextStream> 26 QString extraAttributes)
const 34 toXml(out, indent, extraAttributes);
44 .replace(
"&",
"&")
47 .replace(
"\"",
""")
48 .replace(
"'",
"'");
59 if (ri < 16) r =
"0" + r;
62 if (gi < 16) g =
"0" + g;
65 if (bi < 16) b =
"0" + b;
67 return "#" + r + g + b;
74 QMutexLocker locker(&
mutex);
76 static std::map<const void *, int> idMap;
79 if (idMap.find(
object) == idMap.end()) {
80 idMap[object] = maxId++;
virtual void toXml(QTextStream &stream, QString indent="", QString extraAttributes="") const =0
Stream this exportable object out to XML on a text stream.
static int getObjectExportId(const void *)
static QString encodeEntities(QString)
virtual QString toXmlString(QString indent="", QString extraAttributes="") const
Convert this exportable object to XML in a string.
static QString encodeColour(int r, int g, int b)