51 QSvgHandler(QIODevice *device, QtSvg::Options options = {},
52 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
53 QSvgHandler(
const QByteArray &data, QtSvg::Options options = {},
54 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
55 QSvgHandler(QXmlStreamReader *
const data, QtSvg::Options options = {},
56 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
59 QIODevice *device()
const;
60 QSvgDocument *document()
const;
62 [[nodiscard]] std::unique_ptr<QSvgDocument> takeDocument();
64 inline bool ok()
const {
65 return document() != 0 && !xml->hasError();
68 inline QString errorString()
const {
return xml->errorString(); }
69 inline int lineNumber()
const {
return xml->lineNumber(); }
71 void setDefaultCoordinateSystem(QSvgUtils::LengthType type);
72 QSvgUtils::LengthType defaultCoordinateSystem()
const;
74 void pushColor(
const QColor &color);
77 QColor currentColor()
const;
79 void pushUnresolvedStyle(QSvgStyleProperty *prop);
81#ifndef QT_NO_CSSPARSER
82 void setInStyle(
bool b);
85 QSvgCssHandler &cssHandler();
88 void setAnimPeriod(
int start,
int end);
89 int animationDuration()
const;
91 inline QPen defaultPen()
const
92 {
return m_defaultPen; }
94 QtSvg::Options options()
const;
95 QtSvg::AnimatorType animatorType()
const;
96 bool trustedSourceMode()
const;
99 bool startElement(
const QStringView localName,
const QXmlStreamAttributes &attributes);
100 bool endElement(
const QStringView localName);
101 bool characters(
const QStringView str);
102 bool processingInstruction(
const QStringView target,
const QStringView data);
107 std::unique_ptr<QSvgDocument> m_doc;
108 QStack<QSvgNode *> m_nodes;
113 QList<QSvgNode *> m_toBeResolved;
114 QList<QSvgStyleProperty *> m_unresolvedStyles;
123 QStack<CurrentNode> m_skipNodes;
126
127
128
129 QStack<QSvgText::WhitespaceMode> m_whitespaceMode;
131 QSvgStyleProperty *m_style{
nullptr};
132 QSvgPaintServerSharedPtr m_paintServer;
134 QSvgUtils::LengthType m_defaultCoords;
136 QStack<QColor> m_colorStack;
137 QStack<
int> m_colorTagCount;
141 QXmlStreamReader *
const xml;
142#ifndef QT_NO_CSSPARSER
144 QSvgCssHandler m_cssHandler;
147 void resolvePaintServers();
152
153
154
155 const bool m_ownsReader;
157 const QtSvg::Options m_options;
158 const QtSvg::AnimatorType m_animatorType;