46 QSvgHandler(QIODevice *device, QtSvg::Options options = {},
47 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
48 QSvgHandler(
const QByteArray &data, QtSvg::Options options = {},
49 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
50 QSvgHandler(QXmlStreamReader *
const data, QtSvg::Options options = {},
51 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
54 QIODevice *device()
const;
55 QSvgDocument *document()
const;
57 inline bool ok()
const {
58 return document() != 0 && !xml->hasError();
61 inline QString errorString()
const {
return xml->errorString(); }
62 inline int lineNumber()
const {
return xml->lineNumber(); }
64 void setDefaultCoordinateSystem(QSvgUtils::LengthType type);
65 QSvgUtils::LengthType defaultCoordinateSystem()
const;
67 void pushColor(
const QColor &color);
70 QColor currentColor()
const;
72#ifndef QT_NO_CSSPARSER
73 void setInStyle(
bool b);
76 QSvgCssHandler &cssHandler();
79 void setAnimPeriod(
int start,
int end);
80 int animationDuration()
const;
82 inline QPen defaultPen()
const
83 {
return m_defaultPen; }
85 QtSvg::Options options()
const;
86 QtSvg::AnimatorType animatorType()
const;
87 bool trustedSourceMode()
const;
90 bool startElement(
const QStringView localName,
const QXmlStreamAttributes &attributes);
91 bool endElement(
const QStringView localName);
92 bool characters(
const QStringView str);
93 bool processingInstruction(
const QStringView target,
const QStringView data);
99 QStack<QSvgNode *> m_nodes;
104 QList<QSvgNode *> m_toBeResolved;
113 QStack<CurrentNode> m_skipNodes;
116
117
118
119 QStack<QSvgText::WhitespaceMode> m_whitespaceMode;
121 QSvgRefCounter<QSvgStyleProperty> m_style;
123 QSvgUtils::LengthType m_defaultCoords;
125 QStack<QColor> m_colorStack;
126 QStack<
int> m_colorTagCount;
130 QXmlStreamReader *
const xml;
131#ifndef QT_NO_CSSPARSER
133 QSvgCssHandler m_cssHandler;
136 void resolvePaintServers(QSvgNode *node,
int nestedDepth = 0);
141
142
143
144 const bool m_ownsReader;
146 const QtSvg::Options m_options;
147 const QtSvg::AnimatorType m_animatorType;