Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickitemgenerator_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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 QQUICKITEMGENERATOR_P_H
5#define QQUICKITEMGENERATOR_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 "qquickgenerator_p.h"
19#include <QStack>
20
22
23class Q_QUICKVECTORIMAGEGENERATOR_EXPORT QQuickItemGenerator : public QQuickGenerator
24{
25public:
26 QQuickItemGenerator(const QString fileName, QQuickVectorImageGenerator::GeneratorFlags flags, QQuickItem *parentItem);
28
29protected:
30 void generateNodeBase(const NodeInfo &info) override;
31 bool generateDefsNode(const NodeInfo &info) override;
32 void generateImageNode(const ImageNodeInfo &info) override;
33 void generatePath(const PathNodeInfo &info) override;
34 void generateNode(const NodeInfo &info) override;
35 void generateTextNode(const TextNodeInfo &info) override;
36 void generateUseNode(const UseNodeInfo &info) override;
37 bool generateStructureNode(const StructureNodeInfo &info) override;
38 bool generateRootNode(const StructureNodeInfo &info) override;
39 void outputShapePath(const PathNodeInfo &info, const QPainterPath *path, const QQuadPath *quadPath, QQuickVectorImageGenerator::PathSelector pathSelector, const QRectF &boundingRect) override;
40
41private:
42 void generateGradient(const QGradient *grad, QQuickShapePath *shapePath, const QRectF &boundingRect);
43 QQuickItem *currentItem();
44 void addCurrentItem(QQuickItem *item, const NodeInfo &info);
45
46 bool m_inShapeItem = false;
47 QQuickShape *m_parentShapeItem = nullptr;
48
49 QStack<QQuickItem *> m_items;
50
51 QQuickItem *m_parentItem = nullptr;
52};
53
55
56#endif // QQUICKITEMGENERATOR_P_H
\inmodule QtGui
Definition qbrush.h:135
\inmodule QtGui
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\inmodule QtCore\reentrant
Definition qrect.h:484
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLbitfield flags
GLsizei const GLchar *const * path
static const QRectF boundingRect(const QPointF *points, int pointCount)
QGraphicsItem * item
QHostInfo info
[0]