Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsvgcsshandler_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSVGCSSHANDLER_P_H
5#define QSVGCSSHANDLER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtSvg/private/qtsvgglobal_p.h>
19#include <QtSvg/private/qsvgcssanimation_p.h>
20#include <QtCore/qstringview.h>
21#include <QtGui/private/qcssparser_p.h>
22#include <QtCore/qxmlstream.h>
23
24QT_BEGIN_NAMESPACE
25
26class QSvgStyleSelector;
27class QSvgNode;
29public:
32
33 QSvgCssAnimation *createAnimation(QStringView name);
34 void collectAnimations(const QCss::StyleSheet &sheet);
35
36 void parseStyleSheet(const QStringView str);
37 void parseCSStoXMLAttrs(const QList<QCss::Declaration> &declarations, QXmlStreamAttributes &attributes) const;
38 void parseCSStoXMLAttrs(const QString &css, QXmlStreamAttributes &attributes) const;
39
40 void styleLookup(QSvgNode *node, QXmlStreamAttributes &attributes) const;
41
42private:
43 QHash<QString, QCss::AnimationRule> m_animations;
44 QSvgStyleSelector *m_selector = nullptr;
45};
46
47
48QT_END_NAMESPACE
49
50#endif // QSVGCSSHANDLER_P_H
void collectAnimations(const QCss::StyleSheet &sheet)
void styleLookup(QSvgNode *node, QXmlStreamAttributes &attributes) const
void parseCSStoXMLAttrs(const QList< QCss::Declaration > &declarations, QXmlStreamAttributes &attributes) const
void parseStyleSheet(const QStringView str)
QSvgCssAnimation * createAnimation(QStringView name)
bool fillTransformProperty(const QList< CssKeyFrameValue > &keyFrames, QSvgAnimatedPropertyTransform *prop)
bool fillOpacityProperty(const QList< CssKeyFrameValue > &keyFrames, QSvgAnimatedPropertyFloat *prop)
qreal qsvg_parseAngle(QStringView str, bool *ok=nullptr)
bool fillColorProperty(const QList< CssKeyFrameValue > &keyFrames, QSvgAnimatedPropertyColor *prop)
bool validateTransform(QList< QList< QSvgAnimatedPropertyTransform::TransformComponent > > &keyFrameComponents)