34 constexpr int typeNameCount =
sizeof(
nodeTypeStrings) /
sizeof(
const char *);
35 if (node->
type() < typeNameCount)
63 const char *indent() { m_indent.
fill(
' ', m_indentLevel * 2);
return m_indent.
constData();}
64 void handleBaseNode(
const QSvgNode *node);
66 int m_indentLevel = 0;
71void SvgDebugVisitor::handleBaseNode(
const QSvgNode *node)
73 debug << indent() <<
typeName(node) <<
"node, ID:" << node->
nodeId();
104 handleBaseNode(node);
110 handleBaseNode(node);
116 handleBaseNode(node);
122 handleBaseNode(node);
128 handleBaseNode(node);
134 handleBaseNode(node);
140 handleBaseNode(node);
146 handleBaseNode(node);
148 for (
const auto *tspan : node->
tspans()) {
152 text += tspan->text();
159 handleBaseNode(node);
165 handleBaseNode(node);
174 debug <<
"END SVG" << nodeCounter <<
"nodes";
QByteArray & fill(char c, qsizetype size=-1)
Sets every byte in the byte array to ch.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
qsizetype size() const noexcept
int elementCount() const
Returns the number of path elements in the painter path.
\macro QT_RESTRICTED_CAST_FROM_ASCII
const QImage & image() const
virtual Type type() const =0
const QPainterPath & path() const
const QPolygonF & polygon() const
const QPolygonF & polygon() const
const QList< QSvgTspan * > tspans() const
void traverse(const QSvgStructureNode *node)
bool visitStructureNodeStart(const QSvgStructureNode *node) override
void visitLineNode(const QSvgLine *node) override
void visitAnimationNode(const QSvgAnimation *node) override
void visitStructureNodeEnd(const QSvgStructureNode *) override
void visitPathNode(const QSvgPath *node) override
void visitEllipseNode(const QSvgEllipse *node) override
void visitRectNode(const QSvgRect *node) override
void write(const QSvgTinyDocument *doc)
void visitVideoNode(const QSvgVideo *node) override
void visitTextNode(const QSvgText *node) override
SvgDebugVisitor(QDebug &stream)
void visitPolygonNode(const QSvgPolygon *node) override
void visitImageNode(const QSvgImage *node) override
void visitPolylineNode(const QSvgPolyline *node) override
void visitNode(const QSvgNode *) override
void visitUseNode(const QSvgUse *node) override
Combined button and popup list for selecting options.
QTextStream & endl(QTextStream &stream)
Writes '\n' to the stream and flushes the stream.
#define QStringLiteral(str)
static QT_BEGIN_NAMESPACE const char * nodeTypeStrings[]
QDebug operator<<(QDebug debug, const QSvgTinyDocument &doc)