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 QSVGSTYLESELECTOR_P_H
5#define QSVGSTYLESELECTOR_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/qtsvgglobal.h>
19#include <QtGui/private/qcssparser_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QSvgNode;
24class QSvgStructureNode;
25class QSvgStyleSelector : public QCss::StyleSelector
26{
27public:
28 QSvgStyleSelector();
29 virtual ~QSvgStyleSelector();
30
31 QString nodeToName(QSvgNode *node) const;
32
33 QSvgNode *svgNode(NodePtr node) const;
34 QSvgStructureNode *nodeToStructure(QSvgNode *n) const;
35
36 QSvgStructureNode *svgStructure(NodePtr node) const;
37
38 bool nodeNameEquals(NodePtr node, const QString& nodeName) const override;
39 QString attributeValue(NodePtr node, const QCss::AttributeSelector &asel) const override;
40 bool hasAttributes(NodePtr node) const override;
41
42 QStringList nodeIds(NodePtr node) const override;
43
44 QStringList nodeNames(NodePtr node) const override;
45
46 bool isNullNode(NodePtr node) const override;
47
48 NodePtr parentNode(NodePtr node) const override;
49 NodePtr previousSiblingNode(NodePtr node) const override;
50 NodePtr duplicateNode(NodePtr node) const override;
51 void freeNode(NodePtr node) const override;
52};
53
54QT_END_NAMESPACE
55
56#endif //QSVGSTYLESELECTOR_P_H
57

source code of qtsvg/src/svg/css/qsvgstyleselector_p.h