52 QSvgHandler(QIODevice *device, QtSvg::Options options = {},
53 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
54 QSvgHandler(
const QByteArray &data, QtSvg::Options options = {},
55 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
56 QSvgHandler(QXmlStreamReader *
const data, QtSvg::Options options = {},
57 QtSvg::AnimatorType type = QtSvg::AnimatorType::Automatic);
60 QIODevice *device()
const;
61 QSvgDocument *document()
const;
63 [[nodiscard]] std::unique_ptr<QSvgDocument> takeDocument();
65 inline bool ok()
const {
66 return document() != 0 && !xml->hasError();
69 inline QString errorString()
const {
return xml->errorString(); }
70 inline int lineNumber()
const {
return xml->lineNumber(); }
72 void setDefaultCoordinateSystem(QGuiSvg::LengthType type);
73 QGuiSvg::LengthType defaultCoordinateSystem()
const;
75 void pushColor(
const QColor &color);
78 QColor currentColor()
const;
80 void pushUnresolvedStyle(QSvgStyleProperty *prop);
82 void setCurrentSvgFontFamily(QStringView family);
84#ifndef QT_NO_CSSPARSER
85 void setInStyle(
bool b);
88 QSvgCssHandler &cssHandler();
91 void setAnimPeriod(
int start,
int end);
92 int animationDuration()
const;
94 inline QPen defaultPen()
const
95 {
return m_defaultPen; }
97 QtSvg::Options options()
const;
98 QtSvg::AnimatorType animatorType()
const;
99 bool trustedSourceMode()
const;
102 bool startElement(
const QStringView localName,
const QXmlStreamAttributes &attributes);
103 bool endElement(
const QStringView localName);
104 bool characters(
const QStringView str);
105 bool processingInstruction(
const QStringView target,
const QStringView data);
110 std::unique_ptr<QSvgDocument> m_doc;
111 QStack<QSvgNode *> m_nodes;
116 QList<QSvgNode *> m_toBeResolved;
117 QList<QSvgStyleProperty *> m_unresolvedStyles;
126 QStack<CurrentNode> m_skipNodes;
129
130
131
132 QStack<QSvgText::WhitespaceMode> m_whitespaceMode;
141 return !font || fontFamily.isEmpty();
151 SvgFontData m_currentSvgFontData;
152 QSvgPaintServerSharedPtr m_paintServer;
154 QGuiSvg::LengthType m_defaultCoords;
156 QStack<QColor> m_colorStack;
157 QStack<
int> m_colorTagCount;
161 QXmlStreamReader *
const xml;
162#ifndef QT_NO_CSSPARSER
164 QSvgCssHandler m_cssHandler;
167 void resolvePaintServers();
172
173
174
175 const bool m_ownsReader;
177 const QtSvg::Options m_options;
178 const QtSvg::AnimatorType m_animatorType;