16#include "kritastore_export.h"
30 explicit KoXmlWriter(QIODevice* dev,
int indentLevel = 0);
43 void startDocument(
const char* rootElemName,
const char* publicId = 0,
const char* systemId = 0);
55 void startElement(
const char* tagName,
bool indentInside =
true);
62 addAttribute(attrName,
value.toUtf8());
68 addAttribute(attrName, QByteArray::number(
value));
74 addAttribute(attrName, QByteArray::number(
value));
81 addAttribute(attrName,
value ?
"true" :
"false");
88 void addAttribute(
const char* attrName,
double value);
95 void addAttribute(
const char* attrName,
float value);
98 void addAttribute(
const char* attrName,
const QByteArray&
value);
103 void addAttribute(
const char* attrName,
const char*
value);
116 addTextNode(str.toUtf8());
120 void addTextNode(
const QByteArray& cstr);
129 void addTextNode(
const char* cstr);
138 void addCompleteElement(QIODevice* dev);
148 void addManifestEntry(
const QString& fullPath,
const QString& mediaType);
152 Tag(
const char *t = 0,
bool ind =
true)
154 , lastChildIsText(false)
155 , openingTagClosed(false)
158 tagName =
new char[qstrlen(t) + 1];
168 tagName =
new char[qstrlen(original.
tagName) + 1];
169 qstrcpy(tagName, original.
tagName);
187 void writeCString(
const char* cstr);
189 void writeChar(
char c);
198 char *escapeForXML(
const char*
source,
int length)
const;
199 bool prepareForChild(
bool indentInside =
true);
200 void prepareForTextNode();
qreal length(const QPointF &vec)
float value(const T *src, size_t ch)
KisMagneticGraph::vertex_descriptor source(typename KisMagneticGraph::edge_descriptor e, KisMagneticGraph g)
KoXmlWriter(const KoXmlWriter &)
KoXmlWriter & operator=(const KoXmlWriter &)
void addTextNode(const QString &str)
void closeStartElement(Tag &tag)
void addAttribute(const char *attrName, bool value)
void addAttribute(const char *attrName, const QString &value)
void addAttribute(const char *attrName, uint value)
void addAttribute(const char *attrName, int value)
bool indentInside
whether to indent the contents of this tag
bool openingTagClosed
true once the '>' in <tag a="b"> is written out
bool lastChildIsText
last child is a text node
bool hasChildren
element or text children
Tag(const char *t=0, bool ind=true)