| 1 | // Copyright (C) 2016 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 QQUICKPATH_P_H |
| 5 | #define QQUICKPATH_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 <private/qtquickglobal_p.h> |
| 19 | |
| 20 | QT_REQUIRE_CONFIG(quick_path); |
| 21 | |
| 22 | #include "qquickpath_p.h" |
| 23 | |
| 24 | #include <qqml.h> |
| 25 | #include <QtCore/QStringList> |
| 26 | |
| 27 | #include <private/qobject_p.h> |
| 28 | |
| 29 | QT_BEGIN_NAMESPACE |
| 30 | |
| 31 | class Q_QUICK_EXPORT QQuickPathPrivate : public QObjectPrivate |
| 32 | { |
| 33 | Q_DECLARE_PUBLIC(QQuickPath) |
| 34 | |
| 35 | public: |
| 36 | static QQuickPathPrivate* get(QQuickPath *path) { return path->d_func(); } |
| 37 | static const QQuickPathPrivate* get(const QQuickPath *path) { return path->d_func(); } |
| 38 | |
| 39 | QQuickPathPrivate() |
| 40 | : componentComplete(true), isShapePath(false), simplify(false) |
| 41 | , processPending(false), asynchronous(false), useCustomPath(false) |
| 42 | {} |
| 43 | |
| 44 | QPainterPath _path; |
| 45 | QList<QQuickPathElement*> _pathElements; |
| 46 | mutable QVector<QPointF> _pointCache; |
| 47 | QList<QQuickPath::AttributePoint> _attributePoints; |
| 48 | QStringList _attributes; |
| 49 | QList<QQuickCurve*> _pathCurves; |
| 50 | QList<QQuickPathText*> _pathTexts; |
| 51 | mutable QQuickCachedBezier prevBez; |
| 52 | QQmlNullableValue<qreal> startX; |
| 53 | QQmlNullableValue<qreal> startY; |
| 54 | qreal pathLength = 0; |
| 55 | QSizeF scale = QSizeF(1, 1); |
| 56 | bool closed = false; |
| 57 | bool componentComplete : 1; |
| 58 | bool isShapePath : 1; |
| 59 | bool simplify : 1; |
| 60 | bool processPending : 1; |
| 61 | bool asynchronous : 1; |
| 62 | bool useCustomPath : 1; |
| 63 | }; |
| 64 | |
| 65 | QT_END_NAMESPACE |
| 66 | |
| 67 | #endif |
| 68 |
