codekingpro commited on
Commit
ebcd6d6
·
verified ·
1 Parent(s): ac2237a

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickitem_p.h +118 -0
  2. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickview_p.h +53 -0
  3. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qqmldesignermetaobject_p.h +74 -0
  4. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquadpath_p.h +341 -0
  5. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickabstractpaletteprovider_p.h +31 -0
  6. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessibleattached_p.h +250 -0
  7. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessiblefactory_p.h +29 -0
  8. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p.h +183 -0
  9. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p_p.h +188 -0
  10. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p.h +88 -0
  11. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p_p.h +61 -0
  12. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p.h +165 -0
  13. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p_p.h +65 -0
  14. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p.h +455 -0
  15. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p_p.h +304 -0
  16. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimationcontroller_p.h +63 -0
  17. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p.h +177 -0
  18. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p_p.h +74 -0
  19. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorcontroller_p.h +76 -0
  20. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorjob_p.h +290 -0
  21. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickapplication_p.h +77 -0
  22. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickbehavior_p.h +73 -0
  23. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p.h +81 -0
  24. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p_p.h +76 -0
  25. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvascontext_p.h +62 -0
  26. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvasitem_p.h +188 -0
  27. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickclipnode_p.h +49 -0
  28. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcolorgroup_p.h +208 -0
  29. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2d_p.h +244 -0
  30. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dcommandbuffer_p.h +260 -0
  31. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtexture_p.h +165 -0
  32. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtile_p.h +63 -0
  33. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p.h +64 -0
  34. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p_p.h +204 -0
  35. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomobjectdata_p.h +70 -0
  36. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomparserobject_p.h +43 -0
  37. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupport_p.h +134 -0
  38. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportitems_p.h +48 -0
  39. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportmetainfo_p.h +35 -0
  40. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportproperties_p.h +67 -0
  41. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportpropertychanges_p.h +40 -0
  42. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportstates_p.h +46 -0
  43. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p.h +299 -0
  44. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p_p.h +99 -0
  45. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdragaxis_p.h +81 -0
  46. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdraghandler_p.h +94 -0
  47. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdroparea_p.h +164 -0
  48. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickevents_p_p.h +262 -0
  49. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p.h +290 -0
  50. qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p_p.h +287 -0
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickitem_p.h ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QACCESSIBLEQUICKITEM_H
5
+ #define QACCESSIBLEQUICKITEM_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 <QtQuick/QQuickItem>
19
+ #include <QtQuick/QQuickView>
20
+ #include <QtGui/qaccessibleobject.h>
21
+ #include <QtQuick/private/qtquickglobal_p.h>
22
+
23
+ QT_BEGIN_NAMESPACE
24
+
25
+ #if QT_CONFIG(accessibility)
26
+
27
+ class QTextDocument;
28
+
29
+ class Q_QUICK_EXPORT QAccessibleQuickItem : public QAccessibleObject, public QAccessibleActionInterface, public QAccessibleValueInterface, public QAccessibleTextInterface
30
+ {
31
+ public:
32
+ QAccessibleQuickItem(QQuickItem *item);
33
+
34
+ QWindow *window() const override;
35
+
36
+ QRect rect() const override;
37
+ QRect viewRect() const;
38
+
39
+ bool clipsChildren() const;
40
+ QAccessibleInterface *childAt(int x, int y) const override;
41
+
42
+ QAccessibleInterface *parent() const override;
43
+ QAccessibleInterface *child(int index) const override;
44
+ int childCount() const override;
45
+ int indexOfChild(const QAccessibleInterface *iface) const override;
46
+ QList<QQuickItem *> childItems() const;
47
+
48
+ QAccessible::State state() const override;
49
+ QAccessible::Role role() const override;
50
+ QString text(QAccessible::Text) const override;
51
+ void setText(QAccessible::Text, const QString &text) override;
52
+
53
+ bool isAccessible() const;
54
+
55
+ // Action Interface
56
+ QStringList actionNames() const override;
57
+ void doAction(const QString &actionName) override;
58
+ QStringList keyBindingsForAction(const QString &actionName) const override;
59
+
60
+ // Value Interface
61
+ QVariant currentValue() const override;
62
+ void setCurrentValue(const QVariant &value) override;
63
+ QVariant maximumValue() const override;
64
+ QVariant minimumValue() const override;
65
+ QVariant minimumStepSize() const override;
66
+
67
+
68
+ // Text Interface
69
+ void selection(int selectionIndex, int *startOffset, int *endOffset) const override;
70
+ int selectionCount() const override;
71
+ void addSelection(int startOffset, int endOffset) override;
72
+ void removeSelection(int selectionIndex) override;
73
+ void setSelection(int selectionIndex, int startOffset, int endOffset) override;
74
+
75
+ // cursor
76
+ int cursorPosition() const override;
77
+ void setCursorPosition(int position) override;
78
+
79
+ // text
80
+ QString text(int startOffset, int endOffset) const override;
81
+ QString textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType,
82
+ int *startOffset, int *endOffset) const override;
83
+ QString textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType,
84
+ int *startOffset, int *endOffset) const override;
85
+ QString textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType,
86
+ int *startOffset, int *endOffset) const override;
87
+ int characterCount() const override;
88
+
89
+ // character <-> geometry
90
+ QRect characterRect(int /* offset */) const override { return QRect(); }
91
+ int offsetAtPoint(const QPoint & /* point */) const override { return -1; }
92
+
93
+ void scrollToSubstring(int /* startIndex */, int /* endIndex */) override {}
94
+ QString attributes(int /* offset */, int *startOffset, int *endOffset) const override
95
+ { *startOffset = 0; *endOffset = 0; return QString(); }
96
+
97
+ QTextDocument *textDocument() const;
98
+
99
+ protected:
100
+ QQuickItem *item() const { return static_cast<QQuickItem*>(object()); }
101
+ void *interface_cast(QAccessible::InterfaceType t) override;
102
+
103
+ private:
104
+ // for Text nodes:
105
+ QTextDocument *m_doc;
106
+ typedef QHash<int, QAccessible::Id> ChildCache;
107
+ mutable ChildCache m_childToId;
108
+
109
+ };
110
+
111
+ QRect itemScreenRect(QQuickItem *item);
112
+ QList<QQuickItem *> accessibleUnignoredChildren(QQuickItem *item, bool paintOrder = false);
113
+
114
+ #endif // accessibility
115
+
116
+ QT_END_NAMESPACE
117
+
118
+ #endif // QACCESSIBLEQUICKITEM_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickview_p.h ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2021 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 QAccessibleQuickView_H
5
+ #define QAccessibleQuickView_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 <QtGui/qaccessibleobject.h>
19
+ #include <QtQuick/qquickwindow.h>
20
+ #include <QtCore/private/qglobal_p.h>
21
+
22
+ QT_BEGIN_NAMESPACE
23
+
24
+ #if QT_CONFIG(accessibility)
25
+
26
+ class Q_QUICK_EXPORT QAccessibleQuickWindow : public QAccessibleObject
27
+ {
28
+ public:
29
+ QAccessibleQuickWindow(QQuickWindow *object);
30
+
31
+ QAccessibleInterface *parent() const override;
32
+ QAccessibleInterface *child(int index) const override;
33
+ QAccessibleInterface *focusChild() const override;
34
+
35
+ QAccessible::Role role() const override;
36
+ QAccessible::State state() const override;
37
+ QRect rect() const override;
38
+
39
+ int childCount() const override;
40
+ int indexOfChild(const QAccessibleInterface *iface) const override;
41
+ QString text(QAccessible::Text text) const override;
42
+ QAccessibleInterface *childAt(int x, int y) const override;
43
+
44
+ private:
45
+ QQuickWindow *window() const override { return static_cast<QQuickWindow*>(object()); }
46
+ QList<QQuickItem *> rootItems() const;
47
+ };
48
+
49
+ #endif // accessibility
50
+
51
+ QT_END_NAMESPACE
52
+
53
+ #endif // QAccessibleQuickView_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qqmldesignermetaobject_p.h ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 NODEINSTANCEMETAOBJECT_H
5
+ #define NODEINSTANCEMETAOBJECT_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 "qquickdesignersupport_p.h"
19
+
20
+ #include <QQmlContext>
21
+ #include <QScopedPointer>
22
+ #include <private/qqmlopenmetaobject_p.h>
23
+ #include <private/qqmlvmemetaobject_p.h>
24
+
25
+ #include <QtCore/qpointer.h>
26
+
27
+ #include <memory>
28
+
29
+ QT_BEGIN_NAMESPACE
30
+
31
+ struct MetaPropertyData;
32
+
33
+ class QQmlDesignerMetaObject : public QQmlOpenMetaObject
34
+ {
35
+ public:
36
+ ~QQmlDesignerMetaObject();
37
+
38
+ static void registerNotifyPropertyChangeCallBack(void (*callback)(QObject*, const QQuickDesignerSupport::PropertyName &propertyName));
39
+
40
+ protected:
41
+ static QQmlDesignerMetaObject* getNodeInstanceMetaObject(QObject *object, QQmlEngine *engine);
42
+
43
+ void createNewDynamicProperty(const QString &name);
44
+ int createProperty(const char *name, const char *passAlong) override;
45
+ int openMetaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
46
+ int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) override;
47
+ void notifyPropertyChange(int id);
48
+ void setValue(int id, const QVariant &value);
49
+ QVariant propertyWriteValue(int, const QVariant &) override;
50
+
51
+ QObject *myObject() const { return object(); }
52
+
53
+ QDynamicMetaObjectData *dynamicMetaObjectParent() const;
54
+
55
+ int propertyOffset() const;
56
+
57
+ int count() const;
58
+ QByteArray name(int) const;
59
+
60
+ private:
61
+ QQmlDesignerMetaObject(QObject *object, QQmlEngine *engine);
62
+ void init(QObject *);
63
+
64
+ QQmlPropertyCache::Ptr cache() const;
65
+
66
+ QPointer<QQmlContext> m_context;
67
+ QScopedPointer<MetaPropertyData> m_data;
68
+
69
+ friend class QQuickDesignerSupportProperties;
70
+ };
71
+
72
+ QT_END_NAMESPACE
73
+
74
+ #endif // NODEINSTANCEMETAOBJECT_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquadpath_p.h ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2022 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 QQUADPATH_P_H
5
+ #define QQUADPATH_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 for the convenience
12
+ // of a number of Qt sources files. This header file may change from
13
+ // version to version without notice, or even be removed.
14
+ //
15
+ // We mean it.
16
+ //
17
+
18
+ #include <QtCore/qrect.h>
19
+ #include <QtCore/qlist.h>
20
+ #include <QtCore/qdebug.h>
21
+ #include <QtGui/qvector2d.h>
22
+ #include <QtGui/qpainterpath.h>
23
+ #include <QtQuick/qtquickexports.h>
24
+
25
+ QT_BEGIN_NAMESPACE
26
+
27
+ class Q_QUICK_EXPORT QQuadPath
28
+ {
29
+ public:
30
+ // This is a copy of the flags in QQuickShapePath ### TODO: use a common definition
31
+ enum PathHint : quint8 {
32
+ PathLinear = 0x1,
33
+ PathQuadratic = 0x2,
34
+ PathConvex = 0x4,
35
+ PathFillOnRight = 0x8,
36
+ PathSolid = 0x10,
37
+ PathNonIntersecting = 0x20,
38
+ PathNonOverlappingControlPointTriangles = 0x40
39
+ };
40
+ Q_DECLARE_FLAGS(PathHints, PathHint)
41
+
42
+ class Q_QUICK_EXPORT Element
43
+ {
44
+ public:
45
+ Element ()
46
+ : m_isSubpathStart(false), m_isSubpathEnd(false), m_isLine(false)
47
+ {
48
+ }
49
+
50
+ Element (QVector2D s, QVector2D c, QVector2D e)
51
+ : sp(s), cp(c), ep(e), m_isSubpathStart(false), m_isSubpathEnd(false), m_isLine(false)
52
+ {
53
+ }
54
+
55
+ bool isSubpathStart() const
56
+ {
57
+ return m_isSubpathStart;
58
+ }
59
+
60
+ bool isSubpathEnd() const
61
+ {
62
+ return m_isSubpathEnd;
63
+ }
64
+
65
+ bool isLine() const
66
+ {
67
+ return m_isLine;
68
+ }
69
+
70
+ bool isConvex() const
71
+ {
72
+ return m_curvatureFlags & Convex;
73
+ }
74
+
75
+ QVector2D startPoint() const
76
+ {
77
+ return sp;
78
+ }
79
+
80
+ QVector2D controlPoint() const
81
+ {
82
+ return cp;
83
+ }
84
+
85
+ QVector2D endPoint() const
86
+ {
87
+ return ep;
88
+ }
89
+
90
+ QVector2D midPoint() const
91
+ {
92
+ return isLine() ? 0.5f * (sp + ep) : (0.25f * sp) + (0.5f * cp) + (0.25 * ep);
93
+ }
94
+
95
+ /* For a curve, returns the control point. For a line, returns an arbitrary point on the
96
+ * inside side of the line (assuming the curvature has been set for the path). The point
97
+ * doesn't need to actually be inside the shape: it just makes for easier calculations
98
+ * later when it is at the same side as the fill. */
99
+ QVector2D referencePoint() const
100
+ {
101
+ if (isLine()) {
102
+ QVector2D normal(sp.y() - ep.y(), ep.x() - sp.x());
103
+ return m_curvatureFlags & Element::FillOnRight ? sp + normal : sp - normal;
104
+ } else {
105
+ return cp;
106
+ }
107
+ }
108
+
109
+ Element segmentFromTo(float t0, float t1) const;
110
+
111
+ Element reversed() const;
112
+
113
+ int childCount() const { return m_numChildren; }
114
+
115
+ int indexOfChild(int childNumber) const
116
+ {
117
+ Q_ASSERT(childNumber >= 0 && childNumber < childCount());
118
+ return -(m_firstChildIndex + 1 + childNumber);
119
+ }
120
+
121
+ QVector2D pointAtFraction(float t) const;
122
+
123
+ QVector2D tangentAtFraction(float t) const
124
+ {
125
+ return isLine() ? (ep - sp) : ((1 - t) * 2 * (cp - sp)) + (t * 2 * (ep - cp));
126
+ }
127
+
128
+ QVector2D normalAtFraction(float t) const
129
+ {
130
+ const QVector2D tan = tangentAtFraction(t);
131
+ return QVector2D(-tan.y(), tan.x());
132
+ }
133
+
134
+ float extent() const;
135
+
136
+ void setAsConvex(bool isConvex)
137
+ {
138
+ if (isConvex)
139
+ m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags | Element::Convex);
140
+ else
141
+ m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags & ~Element::Convex);
142
+ }
143
+
144
+ void setFillOnRight(bool isFillOnRight)
145
+ {
146
+ if (isFillOnRight)
147
+ m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags | Element::FillOnRight);
148
+ else
149
+ m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags & ~Element::FillOnRight);
150
+ }
151
+
152
+ bool isFillOnRight() const { return m_curvatureFlags & FillOnRight; }
153
+
154
+ bool isControlPointOnLeft() const
155
+ {
156
+ return isPointOnLeft(cp, sp, ep);
157
+ }
158
+
159
+ enum CurvatureFlags : quint8 {
160
+ CurvatureUndetermined = 0,
161
+ FillOnRight = 1,
162
+ Convex = 2
163
+ };
164
+
165
+ enum FillSide : quint8 {
166
+ FillSideUndetermined = 0,
167
+ FillSideRight = 1,
168
+ FillSideLeft = 2,
169
+ FillSideBoth = 3
170
+ };
171
+
172
+ private:
173
+ int intersectionsAtY(float y, float *fractions, bool swapXY = false) const;
174
+
175
+ QVector2D sp;
176
+ QVector2D cp;
177
+ QVector2D ep;
178
+ int m_firstChildIndex = 0;
179
+ quint8 m_numChildren = 0;
180
+ CurvatureFlags m_curvatureFlags = CurvatureUndetermined;
181
+ quint8 m_isSubpathStart : 1;
182
+ quint8 m_isSubpathEnd : 1;
183
+ quint8 m_isLine : 1;
184
+ friend class QQuadPath;
185
+ friend Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath::Element &);
186
+ };
187
+
188
+ void moveTo(const QVector2D &to)
189
+ {
190
+ m_subPathToStart = true;
191
+ m_currentPoint = to;
192
+ }
193
+
194
+ void lineTo(const QVector2D &to)
195
+ {
196
+ addElement({}, to, true);
197
+ }
198
+
199
+ void quadTo(const QVector2D &control, const QVector2D &to)
200
+ {
201
+ addElement(control, to);
202
+ }
203
+
204
+ Element &elementAt(int i)
205
+ {
206
+ return i < 0 ? m_childElements[-(i + 1)] : m_elements[i];
207
+ }
208
+
209
+ const Element &elementAt(int i) const
210
+ {
211
+ return i < 0 ? m_childElements[-(i + 1)] : m_elements[i];
212
+ }
213
+
214
+ int indexOfChildAt(int i, int childNumber) const
215
+ {
216
+ return elementAt(i).indexOfChild(childNumber);
217
+ }
218
+
219
+ QRectF controlPointRect() const;
220
+
221
+ Qt::FillRule fillRule() const { return m_windingFill ? Qt::WindingFill : Qt::OddEvenFill; }
222
+ void setFillRule(Qt::FillRule rule) { m_windingFill = (rule == Qt::WindingFill); }
223
+
224
+ void reserve(int size) { m_elements.reserve(size); }
225
+ int elementCount() const { return m_elements.size(); }
226
+ bool isEmpty() const { return m_elements.size() == 0; }
227
+ int elementCountRecursive() const;
228
+
229
+ static QQuadPath fromPainterPath(const QPainterPath &path, PathHints hints = {});
230
+ QPainterPath toPainterPath() const;
231
+ QString asSvgString() const;
232
+
233
+ QQuadPath subPathsClosed(bool *didClose = nullptr) const;
234
+ void addCurvatureData();
235
+ QQuadPath flattened() const;
236
+ QQuadPath dashed(qreal lineWidth, const QList<qreal> &dashPattern, qreal dashOffset = 0) const;
237
+ void splitElementAt(int index);
238
+ bool contains(const QVector2D &point) const;
239
+ bool contains(const QVector2D &point, int fromIndex, int toIndex) const;
240
+ Element::FillSide fillSideOf(int elementIdx, float elementT) const;
241
+
242
+ template<typename Func>
243
+ void iterateChildrenOf(Element &e, Func &&lambda)
244
+ {
245
+ const int lastChildIndex = e.m_firstChildIndex + e.childCount() - 1;
246
+ for (int i = e.m_firstChildIndex; i <= lastChildIndex; i++) {
247
+ Element &c = m_childElements[i];
248
+ if (c.childCount() > 0)
249
+ iterateChildrenOf(c, lambda);
250
+ else
251
+ lambda(c, -(i + 1));
252
+ }
253
+ }
254
+
255
+ template<typename Func>
256
+ void iterateChildrenOf(const Element &e, Func &&lambda) const
257
+ {
258
+ const int lastChildIndex = e.m_firstChildIndex + e.childCount() - 1;
259
+ for (int i = e.m_firstChildIndex; i <= lastChildIndex; i++) {
260
+ const Element &c = m_childElements[i];
261
+ if (c.childCount() > 0)
262
+ iterateChildrenOf(c, lambda);
263
+ else
264
+ lambda(c, -(i + 1));
265
+ }
266
+ }
267
+
268
+ template<typename Func>
269
+ void iterateElements(Func &&lambda)
270
+ {
271
+ for (int i = 0; i < m_elements.size(); i++) {
272
+ Element &e = m_elements[i];
273
+ if (e.childCount() > 0)
274
+ iterateChildrenOf(e, lambda);
275
+ else
276
+ lambda(e, i);
277
+ }
278
+ }
279
+
280
+ template<typename Func>
281
+ void iterateElements(Func &&lambda) const
282
+ {
283
+ for (int i = 0; i < m_elements.size(); i++) {
284
+ const Element &e = m_elements[i];
285
+ if (e.childCount() > 0)
286
+ iterateChildrenOf(e, lambda);
287
+ else
288
+ lambda(e, i);
289
+ }
290
+ }
291
+
292
+ static QVector2D closestPointOnLine(const QVector2D &p, const QVector2D &sp, const QVector2D &ep);
293
+ static bool isPointOnLeft(const QVector2D &p, const QVector2D &sp, const QVector2D &ep);
294
+ static bool isPointOnLine(const QVector2D &p, const QVector2D &sp, const QVector2D &ep);
295
+ static bool isPointNearLine(const QVector2D &p, const QVector2D &sp, const QVector2D &ep);
296
+
297
+ bool testHint(PathHint hint) const
298
+ {
299
+ return m_hints.testFlag(hint);
300
+ }
301
+
302
+ void setHint(PathHint hint, bool on = true)
303
+ {
304
+ m_hints.setFlag(hint, on);
305
+ }
306
+
307
+ PathHints pathHints() const
308
+ {
309
+ return m_hints;
310
+ }
311
+
312
+ void setPathHints(PathHints newHints)
313
+ {
314
+ m_hints = newHints;
315
+ }
316
+
317
+ private:
318
+ void addElement(const QVector2D &control, const QVector2D &to, bool isLine = false);
319
+ void addElement(const Element &e);
320
+ Element::CurvatureFlags coordinateOrderOfElement(const Element &element) const;
321
+
322
+ friend Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath &);
323
+
324
+ QList<Element> m_elements;
325
+ QList<Element> m_childElements;
326
+ QVector2D m_currentPoint;
327
+ bool m_subPathToStart = true;
328
+ bool m_windingFill = false;
329
+ PathHints m_hints;
330
+
331
+ friend class QSGCurveProcessor;
332
+ };
333
+
334
+ Q_DECLARE_OPERATORS_FOR_FLAGS(QQuadPath::PathHints);
335
+
336
+ Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath::Element &);
337
+ Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath &);
338
+
339
+ QT_END_NAMESPACE
340
+
341
+ #endif
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickabstractpaletteprovider_p.h ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2020 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
+ #ifndef QQUICKABSTRACTPALETTEPROVIDER_P_H
4
+ #define QQUICKABSTRACTPALETTEPROVIDER_P_H
5
+
6
+ //
7
+ // W A R N I N G
8
+ // -------------
9
+ //
10
+ // This file is not part of the Qt API. It exists purely as an
11
+ // implementation detail. This header file may change from version to
12
+ // version without notice, or even be removed.
13
+ //
14
+ // We mean it.
15
+ //
16
+
17
+ #include <QtQuick/private/qtquickglobal_p.h>
18
+
19
+ QT_BEGIN_NAMESPACE
20
+
21
+ class QQuickAbstractPaletteProvider
22
+ {
23
+ public:
24
+ virtual ~QQuickAbstractPaletteProvider() = default;
25
+ virtual QPalette defaultPalette() const = 0;
26
+ virtual QPalette parentPalette(const QPalette &fallbackPalette) const { return fallbackPalette; }
27
+ };
28
+
29
+ QT_END_NAMESPACE
30
+
31
+ #endif // QQUICKABSTRACTPALETTEPROVIDER_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessibleattached_p.h ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKACCESSIBLEATTACHED_H
5
+ #define QQUICKACCESSIBLEATTACHED_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 <QtQuick/qquickitem.h>
19
+
20
+ #include <QtCore/qobject.h>
21
+ #include <QtCore/qstring.h>
22
+
23
+ #if QT_CONFIG(accessibility)
24
+
25
+ #include <QtGui/qaccessible.h>
26
+ #include <private/qtquickglobal_p.h>
27
+
28
+ QT_BEGIN_NAMESPACE
29
+
30
+
31
+ #define STATE_PROPERTY(P) \
32
+ Q_PROPERTY(bool P READ P WRITE set_ ## P NOTIFY P ## Changed FINAL) \
33
+ bool P() const { return m_proxying && !m_stateExplicitlySet.P ? m_proxying->P() : m_state.P ; } \
34
+ void set_ ## P(bool arg) \
35
+ { \
36
+ if (m_proxying) \
37
+ m_proxying->set_##P(arg);\
38
+ m_stateExplicitlySet.P = true; \
39
+ if (m_state.P == arg) \
40
+ return; \
41
+ m_state.P = arg; \
42
+ Q_EMIT P ## Changed(arg); \
43
+ QAccessible::State changedState; \
44
+ changedState.P = true; \
45
+ QAccessibleStateChangeEvent ev(parent(), changedState); \
46
+ QAccessible::updateAccessibility(&ev); \
47
+ } \
48
+ Q_SIGNAL void P ## Changed(bool arg);
49
+
50
+ class Q_QUICK_EXPORT QQuickAccessibleAttached : public QObject
51
+ {
52
+ Q_OBJECT
53
+ Q_PROPERTY(QAccessible::Role role READ role WRITE setRole NOTIFY roleChanged FINAL)
54
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged FINAL)
55
+ Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged FINAL)
56
+ Q_PROPERTY(QString id READ id WRITE setId NOTIFY idChanged REVISION(6, 8) FINAL)
57
+ Q_PROPERTY(bool ignored READ ignored WRITE setIgnored NOTIFY ignoredChanged FINAL)
58
+
59
+ QML_NAMED_ELEMENT(Accessible)
60
+ QML_ADDED_IN_VERSION(2, 0)
61
+ QML_UNCREATABLE("Accessible is only available via attached properties.")
62
+ QML_ATTACHED(QQuickAccessibleAttached)
63
+ QML_EXTENDED_NAMESPACE(QAccessible)
64
+
65
+ public:
66
+ STATE_PROPERTY(checkable)
67
+ STATE_PROPERTY(checked)
68
+ STATE_PROPERTY(editable)
69
+ STATE_PROPERTY(focusable)
70
+ STATE_PROPERTY(focused)
71
+ STATE_PROPERTY(multiLine)
72
+ STATE_PROPERTY(readOnly)
73
+ STATE_PROPERTY(selected)
74
+ STATE_PROPERTY(selectable)
75
+ STATE_PROPERTY(pressed)
76
+ STATE_PROPERTY(checkStateMixed)
77
+ STATE_PROPERTY(defaultButton)
78
+ STATE_PROPERTY(passwordEdit)
79
+ STATE_PROPERTY(selectableText)
80
+ STATE_PROPERTY(searchEdit)
81
+
82
+ QQuickAccessibleAttached(QObject *parent);
83
+ ~QQuickAccessibleAttached();
84
+
85
+ QAccessible::Role role() const { return m_role; }
86
+ void setRole(QAccessible::Role role);
87
+ QString name() const {
88
+ if (m_state.passwordEdit)
89
+ return QString();
90
+ if (!m_nameExplicitlySet && m_proxying && m_proxying->wasNameExplicitlySet())
91
+ return m_proxying->name();
92
+ return m_name;
93
+ }
94
+
95
+ bool wasNameExplicitlySet() const;
96
+ void setName(const QString &name) {
97
+ m_nameExplicitlySet = true;
98
+ if (name != m_name) {
99
+ m_name = name;
100
+ Q_EMIT nameChanged();
101
+ QAccessibleEvent ev(parent(), QAccessible::NameChanged);
102
+ QAccessible::updateAccessibility(&ev);
103
+ }
104
+ }
105
+ void setNameImplicitly(const QString &name);
106
+
107
+ QString description() const {
108
+ return !m_descriptionExplicitlySet && m_proxying ? m_proxying->description() : m_description;
109
+ }
110
+ void setDescription(const QString &description)
111
+ {
112
+ if (!m_descriptionExplicitlySet && m_proxying) {
113
+ disconnect(m_proxying, &QQuickAccessibleAttached::descriptionChanged, this, &QQuickAccessibleAttached::descriptionChanged);
114
+ }
115
+ m_descriptionExplicitlySet = true;
116
+ if (m_description != description) {
117
+ m_description = description;
118
+ Q_EMIT descriptionChanged();
119
+ QAccessibleEvent ev(parent(), QAccessible::DescriptionChanged);
120
+ QAccessible::updateAccessibility(&ev);
121
+ }
122
+ }
123
+
124
+ QString id() const { return m_id; }
125
+ void setId(const QString &id)
126
+ {
127
+ if (m_id != id) {
128
+ m_id = id;
129
+ Q_EMIT idChanged();
130
+ QAccessibleEvent ev(parent(), QAccessible::IdentifierChanged);
131
+ QAccessible::updateAccessibility(&ev);
132
+ }
133
+ }
134
+
135
+ // Factory function
136
+ static QQuickAccessibleAttached *qmlAttachedProperties(QObject *obj);
137
+
138
+ static QQuickAccessibleAttached *attachedProperties(const QObject *obj)
139
+ {
140
+ return qobject_cast<QQuickAccessibleAttached*>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(obj, false));
141
+ }
142
+
143
+ // Property getter
144
+ static QVariant property(const QObject *object, const char *propertyName)
145
+ {
146
+ if (QObject *attachedObject = QQuickAccessibleAttached::attachedProperties(object))
147
+ return attachedObject->property(propertyName);
148
+ return QVariant();
149
+ }
150
+
151
+ static bool setProperty(QObject *object, const char *propertyName, const QVariant &value)
152
+ {
153
+ QObject *obj = qmlAttachedPropertiesObject<QQuickAccessibleAttached>(object, true);
154
+ if (!obj) {
155
+ qWarning("cannot set property Accessible.%s of QObject %s", propertyName, object->metaObject()->className());
156
+ return false;
157
+ }
158
+ return obj->setProperty(propertyName, value);
159
+ }
160
+
161
+ static QObject *findAccessible(QObject *object, QAccessible::Role role = QAccessible::NoRole)
162
+ {
163
+ while (object) {
164
+ QQuickAccessibleAttached *att = QQuickAccessibleAttached::attachedProperties(object);
165
+ if (att && (role == QAccessible::NoRole || att->role() == role)) {
166
+ break;
167
+ }
168
+ if (auto action = object->property("action").value<QObject *>(); action) {
169
+ QQuickAccessibleAttached *att = QQuickAccessibleAttached::attachedProperties(action);
170
+ if (att && (role == QAccessible::NoRole || att->role() == role)) {
171
+ object = action;
172
+ break;
173
+ }
174
+ }
175
+ object = object->parent();
176
+ }
177
+ return object;
178
+ }
179
+
180
+ QAccessible::State state() const { return m_state; }
181
+ bool ignored() const;
182
+ bool doAction(const QString &actionName);
183
+ void availableActions(QStringList *actions) const;
184
+
185
+ Q_REVISION(6, 2) Q_INVOKABLE static QString stripHtml(const QString &html);
186
+ void setProxying(QQuickAccessibleAttached *proxying);
187
+
188
+ Q_REVISION(6, 8) Q_INVOKABLE void announce(const QString &message, QAccessible::AnnouncementPoliteness politeness = QAccessible::AnnouncementPoliteness::Polite);
189
+
190
+ public Q_SLOTS:
191
+ void valueChanged() {
192
+ QAccessibleValueChangeEvent ev(parent(), parent()->property("value"));
193
+ QAccessible::updateAccessibility(&ev);
194
+ }
195
+ void cursorPositionChanged() {
196
+ QAccessibleTextCursorEvent ev(parent(), parent()->property("cursorPosition").toInt());
197
+ QAccessible::updateAccessibility(&ev);
198
+ }
199
+
200
+ void setIgnored(bool ignored);
201
+
202
+ Q_SIGNALS:
203
+ void roleChanged();
204
+ void nameChanged();
205
+ void descriptionChanged();
206
+ void idChanged();
207
+ void ignoredChanged();
208
+ void pressAction();
209
+ void toggleAction();
210
+ void increaseAction();
211
+ void decreaseAction();
212
+ void scrollUpAction();
213
+ void scrollDownAction();
214
+ void scrollLeftAction();
215
+ void scrollRightAction();
216
+ void previousPageAction();
217
+ void nextPageAction();
218
+
219
+ private:
220
+ QAccessible::Role m_role;
221
+ QAccessible::State m_state;
222
+ QAccessible::State m_stateExplicitlySet;
223
+ QString m_name;
224
+ bool m_nameExplicitlySet = false;
225
+ QString m_description;
226
+ bool m_descriptionExplicitlySet = false;
227
+ QQuickAccessibleAttached* m_proxying = nullptr;
228
+ QString m_id;
229
+
230
+ static QMetaMethod sigPress;
231
+ static QMetaMethod sigToggle;
232
+ static QMetaMethod sigIncrease;
233
+ static QMetaMethod sigDecrease;
234
+ static QMetaMethod sigScrollUp;
235
+ static QMetaMethod sigScrollDown;
236
+ static QMetaMethod sigScrollLeft;
237
+ static QMetaMethod sigScrollRight;
238
+ static QMetaMethod sigPreviousPage;
239
+ static QMetaMethod sigNextPage;
240
+
241
+ public:
242
+ using QObject::property;
243
+ };
244
+
245
+
246
+ QT_END_NAMESPACE
247
+
248
+ #endif // accessibility
249
+
250
+ #endif
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessiblefactory_p.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKACCESSIBLEFACTORY_H
5
+ #define QQUICKACCESSIBLEFACTORY_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 <QtGui/qaccessible.h>
19
+ #include <QtCore/private/qglobal_p.h>
20
+
21
+ QT_BEGIN_NAMESPACE
22
+ #if QT_CONFIG(accessibility)
23
+
24
+ QAccessibleInterface *qQuickAccessibleFactory(const QString &classname, QObject *object);
25
+
26
+ #endif
27
+ QT_END_NAMESPACE
28
+
29
+ #endif
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p.h ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANCHORS_P_H
5
+ #define QQUICKANCHORS_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 <qqml.h>
19
+
20
+ #include <QtCore/QObject>
21
+
22
+ #include <private/qtquickglobal_p.h>
23
+
24
+ QT_BEGIN_NAMESPACE
25
+
26
+ class QQuickItem;
27
+ class QQuickAnchorsPrivate;
28
+ class QQuickAnchorLine;
29
+ class Q_QUICK_EXPORT QQuickAnchors : public QObject
30
+ {
31
+ Q_OBJECT
32
+
33
+ Q_PROPERTY(QQuickAnchorLine left READ left WRITE setLeft RESET resetLeft NOTIFY leftChanged FINAL)
34
+ Q_PROPERTY(QQuickAnchorLine right READ right WRITE setRight RESET resetRight NOTIFY rightChanged FINAL)
35
+ Q_PROPERTY(QQuickAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter NOTIFY horizontalCenterChanged FINAL)
36
+ Q_PROPERTY(QQuickAnchorLine top READ top WRITE setTop RESET resetTop NOTIFY topChanged FINAL)
37
+ Q_PROPERTY(QQuickAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom NOTIFY bottomChanged FINAL)
38
+ Q_PROPERTY(QQuickAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter NOTIFY verticalCenterChanged FINAL)
39
+ Q_PROPERTY(QQuickAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline NOTIFY baselineChanged FINAL)
40
+ Q_PROPERTY(qreal margins READ margins WRITE setMargins NOTIFY marginsChanged FINAL)
41
+ Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin RESET resetLeftMargin NOTIFY leftMarginChanged FINAL)
42
+ Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin RESET resetRightMargin NOTIFY rightMarginChanged FINAL)
43
+ Q_PROPERTY(qreal horizontalCenterOffset READ horizontalCenterOffset WRITE setHorizontalCenterOffset NOTIFY horizontalCenterOffsetChanged FINAL)
44
+ Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin RESET resetTopMargin NOTIFY topMarginChanged FINAL)
45
+ Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin RESET resetBottomMargin NOTIFY bottomMarginChanged FINAL)
46
+ Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged FINAL)
47
+ Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged FINAL)
48
+ Q_PROPERTY(QQuickItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged FINAL)
49
+ Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged FINAL)
50
+ Q_PROPERTY(bool alignWhenCentered READ alignWhenCentered WRITE setAlignWhenCentered NOTIFY centerAlignedChanged FINAL)
51
+ QML_ANONYMOUS
52
+ QML_ADDED_IN_VERSION(2, 0)
53
+
54
+ public:
55
+ QQuickAnchors(QQuickItem *item, QObject *parent=nullptr);
56
+ ~QQuickAnchors() override;
57
+
58
+ enum Anchor
59
+ #if defined(Q_CC_CLANG) || !defined(Q_CC_GNU) // meaning: clang and msvc, but NOT gcc proper (because, you know, Q_CC_CLANG implies Q_CC_GNU)
60
+ // Not specifying the enum base type will have MSVC 'interpret' it as signed instead of an unsigned bit-field.
61
+ // However, specifying the enum base type breaks many GCCs, which complain that it can't store all values in a 7 bit bitfield.
62
+ : uint
63
+ #endif
64
+ {
65
+ InvalidAnchor = 0x0,
66
+ LeftAnchor = 0x01,
67
+ RightAnchor = 0x02,
68
+ TopAnchor = 0x04,
69
+ BottomAnchor = 0x08,
70
+ HCenterAnchor = 0x10,
71
+ VCenterAnchor = 0x20,
72
+ BaselineAnchor = 0x40,
73
+ Horizontal_Mask = LeftAnchor | RightAnchor | HCenterAnchor,
74
+ Vertical_Mask = TopAnchor | BottomAnchor | VCenterAnchor | BaselineAnchor
75
+ };
76
+ Q_DECLARE_FLAGS(Anchors, Anchor)
77
+ Q_FLAG(Anchors)
78
+
79
+ QQuickAnchorLine left() const;
80
+ void setLeft(const QQuickAnchorLine &edge);
81
+ void resetLeft();
82
+
83
+ QQuickAnchorLine right() const;
84
+ void setRight(const QQuickAnchorLine &edge);
85
+ void resetRight();
86
+
87
+ QQuickAnchorLine horizontalCenter() const;
88
+ void setHorizontalCenter(const QQuickAnchorLine &edge);
89
+ void resetHorizontalCenter();
90
+
91
+ QQuickAnchorLine top() const;
92
+ void setTop(const QQuickAnchorLine &edge);
93
+ void resetTop();
94
+
95
+ QQuickAnchorLine bottom() const;
96
+ void setBottom(const QQuickAnchorLine &edge);
97
+ void resetBottom();
98
+
99
+ QQuickAnchorLine verticalCenter() const;
100
+ void setVerticalCenter(const QQuickAnchorLine &edge);
101
+ void resetVerticalCenter();
102
+
103
+ QQuickAnchorLine baseline() const;
104
+ void setBaseline(const QQuickAnchorLine &edge);
105
+ void resetBaseline();
106
+
107
+ qreal leftMargin() const;
108
+ void setLeftMargin(qreal);
109
+ void resetLeftMargin();
110
+
111
+ qreal rightMargin() const;
112
+ void setRightMargin(qreal);
113
+ void resetRightMargin();
114
+
115
+ qreal horizontalCenterOffset() const;
116
+ void setHorizontalCenterOffset(qreal);
117
+
118
+ qreal topMargin() const;
119
+ void setTopMargin(qreal);
120
+ void resetTopMargin();
121
+
122
+ qreal bottomMargin() const;
123
+ void setBottomMargin(qreal);
124
+ void resetBottomMargin();
125
+
126
+ qreal margins() const;
127
+ void setMargins(qreal);
128
+
129
+ qreal verticalCenterOffset() const;
130
+ void setVerticalCenterOffset(qreal);
131
+
132
+ qreal baselineOffset() const;
133
+ void setBaselineOffset(qreal);
134
+
135
+ QQuickItem *fill() const;
136
+ void setFill(QQuickItem *);
137
+ void resetFill();
138
+
139
+ QQuickItem *centerIn() const;
140
+ void setCenterIn(QQuickItem *);
141
+ void resetCenterIn();
142
+
143
+ Anchors usedAnchors() const;
144
+ Qt::Orientations activeDirections() const;
145
+
146
+ bool mirrored();
147
+
148
+ bool alignWhenCentered() const;
149
+ void setAlignWhenCentered(bool);
150
+
151
+ void classBegin();
152
+ void componentComplete();
153
+
154
+ Q_SIGNALS:
155
+ void leftChanged();
156
+ void rightChanged();
157
+ void topChanged();
158
+ void bottomChanged();
159
+ void verticalCenterChanged();
160
+ void horizontalCenterChanged();
161
+ void baselineChanged();
162
+ void fillChanged();
163
+ void centerInChanged();
164
+ void leftMarginChanged();
165
+ void rightMarginChanged();
166
+ void topMarginChanged();
167
+ void bottomMarginChanged();
168
+ void marginsChanged();
169
+ void verticalCenterOffsetChanged();
170
+ void horizontalCenterOffsetChanged();
171
+ void baselineOffsetChanged();
172
+ void centerAlignedChanged();
173
+
174
+ private:
175
+ friend class QQuickItemPrivate;
176
+ Q_DISABLE_COPY(QQuickAnchors)
177
+ Q_DECLARE_PRIVATE(QQuickAnchors)
178
+ };
179
+ Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickAnchors::Anchors)
180
+
181
+ QT_END_NAMESPACE
182
+
183
+ #endif // QQUICKANCHORS_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p_p.h ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANCHORS_P_P_H
5
+ #define QQUICKANCHORS_P_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 "qquickanchors_p.h"
19
+ #include "qquickitemchangelistener_p.h"
20
+ #include <private/qobject_p.h>
21
+
22
+ QT_BEGIN_NAMESPACE
23
+
24
+ class Q_QUICK_EXPORT QQuickAnchorLine
25
+ {
26
+ Q_GADGET
27
+ QML_ANONYMOUS
28
+ QML_ADDED_IN_VERSION(2, 0)
29
+ public:
30
+ QQuickAnchorLine() {}
31
+ QQuickAnchorLine(QQuickItem *i, QQuickAnchors::Anchor l) : item(i), anchorLine(l) {}
32
+ QQuickAnchorLine(QQuickItem *i, uint l)
33
+ : item(i)
34
+ , anchorLine(static_cast<QQuickAnchors::Anchor>(l))
35
+ { Q_ASSERT(l < ((QQuickAnchors::BaselineAnchor << 1) - 1)); }
36
+
37
+ QQuickItem *item = nullptr;
38
+ QQuickAnchors::Anchor anchorLine = QQuickAnchors::InvalidAnchor;
39
+ };
40
+
41
+ inline bool operator==(const QQuickAnchorLine& a, const QQuickAnchorLine& b)
42
+ {
43
+ return a.item == b.item && a.anchorLine == b.anchorLine;
44
+ }
45
+
46
+ class QQuickAnchorsPrivate : public QObjectPrivate, public QQuickItemChangeListener
47
+ {
48
+ Q_DECLARE_PUBLIC(QQuickAnchors)
49
+ public:
50
+ QQuickAnchorsPrivate(QQuickItem *i)
51
+ : leftMargin(0)
52
+ , rightMargin(0)
53
+ , topMargin(0)
54
+ , bottomMargin(0)
55
+ , margins(0)
56
+ , vCenterOffset(0)
57
+ , hCenterOffset(0)
58
+ , baselineOffset(0)
59
+ , item(i)
60
+ , fill(nullptr)
61
+ , centerIn(nullptr)
62
+ , leftAnchorItem(nullptr)
63
+ , rightAnchorItem(nullptr)
64
+ , topAnchorItem(nullptr)
65
+ , bottomAnchorItem(nullptr)
66
+ , vCenterAnchorItem(nullptr)
67
+ , hCenterAnchorItem(nullptr)
68
+ , baselineAnchorItem(nullptr)
69
+ , leftAnchorLine(QQuickAnchors::InvalidAnchor)
70
+ , leftMarginExplicit(false)
71
+ , rightAnchorLine(QQuickAnchors::InvalidAnchor)
72
+ , rightMarginExplicit(false)
73
+ , topAnchorLine(QQuickAnchors::InvalidAnchor)
74
+ , topMarginExplicit(false)
75
+ , bottomAnchorLine(QQuickAnchors::InvalidAnchor)
76
+ , bottomMarginExplicit(false)
77
+ , vCenterAnchorLine(QQuickAnchors::InvalidAnchor)
78
+ , updatingMe(false)
79
+ , hCenterAnchorLine(QQuickAnchors::InvalidAnchor)
80
+ , inDestructor(false)
81
+ , baselineAnchorLine(QQuickAnchors::InvalidAnchor)
82
+ , centerAligned(true)
83
+ , usedAnchors(QQuickAnchors::InvalidAnchor)
84
+ , componentComplete(true)
85
+ , updatingFill(0)
86
+ , updatingCenterIn(0)
87
+ , updatingHorizontalAnchor(0)
88
+ , updatingVerticalAnchor(0)
89
+ {
90
+ }
91
+
92
+ void clearItem(QQuickItem *);
93
+
94
+ QQuickGeometryChange calculateDependency(QQuickItem *) const;
95
+ void addDepend(QQuickItem *);
96
+ void remDepend(QQuickItem *);
97
+ bool isItemComplete() const;
98
+
99
+ void setItemHeight(qreal);
100
+ void setItemWidth(qreal);
101
+ void setItemX(qreal);
102
+ void setItemY(qreal);
103
+ void setItemPos(const QPointF &);
104
+ void setItemSize(const QSizeF &);
105
+
106
+ void update();
107
+ void updateOnComplete();
108
+ void updateMe();
109
+
110
+ // QQuickItemGeometryListener interface
111
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
112
+ QQuickAnchorsPrivate *anchorPrivate() override { return this; }
113
+
114
+ bool checkHValid() const;
115
+ bool checkVValid() const;
116
+ bool checkHAnchorValid(QQuickAnchorLine anchor) const;
117
+ bool checkVAnchorValid(QQuickAnchorLine anchor) const;
118
+ bool calcStretch(QQuickItem *edge1Item, QQuickAnchors::Anchor edge1Line,
119
+ QQuickItem *edge2Item, QQuickAnchors::Anchor edge2Line,
120
+ qreal offset1, qreal offset2, QQuickAnchors::Anchor line, qreal &stretch) const;
121
+
122
+ bool isMirrored() const;
123
+ void updateHorizontalAnchors();
124
+ void updateVerticalAnchors();
125
+ void fillChanged();
126
+ void centerInChanged();
127
+
128
+ qreal leftMargin;
129
+ qreal rightMargin;
130
+ qreal topMargin;
131
+ qreal bottomMargin;
132
+ qreal margins;
133
+ qreal vCenterOffset;
134
+ qreal hCenterOffset;
135
+ qreal baselineOffset;
136
+
137
+ QQuickItem *item;
138
+
139
+ QQuickItem *fill;
140
+ QQuickItem *centerIn;
141
+
142
+ QQuickItem *leftAnchorItem;
143
+ QQuickItem *rightAnchorItem;
144
+ QQuickItem *topAnchorItem;
145
+ QQuickItem *bottomAnchorItem;
146
+ QQuickItem *vCenterAnchorItem;
147
+ QQuickItem *hCenterAnchorItem;
148
+ QQuickItem *baselineAnchorItem;
149
+
150
+ // The bit fields below are carefully laid out in chunks of 1 byte, so the compiler doesn't
151
+ // need to generate 2 loads (and combining shifts/ors) to create a single field.
152
+
153
+ QQuickAnchors::Anchor leftAnchorLine : 7;
154
+ uint leftMarginExplicit : 1;
155
+ QQuickAnchors::Anchor rightAnchorLine : 7;
156
+ uint rightMarginExplicit : 1;
157
+ QQuickAnchors::Anchor topAnchorLine : 7;
158
+ uint topMarginExplicit : 1;
159
+ QQuickAnchors::Anchor bottomAnchorLine : 7;
160
+ uint bottomMarginExplicit : 1;
161
+
162
+ QQuickAnchors::Anchor vCenterAnchorLine : 7;
163
+ uint updatingMe : 1;
164
+ QQuickAnchors::Anchor hCenterAnchorLine : 7;
165
+ uint inDestructor : 1;
166
+ QQuickAnchors::Anchor baselineAnchorLine : 7;
167
+ uint centerAligned : 1;
168
+ uint usedAnchors : 7; // QQuickAnchors::Anchors
169
+ uint componentComplete : 1;
170
+
171
+ // Instead of using a mostly empty bit field, we can stretch the following fields up to be full
172
+ // bytes. The advantage is that incrementing/decrementing does not need any combining ands/ors.
173
+ qint8 updatingFill;
174
+ qint8 updatingCenterIn;
175
+ qint8 updatingHorizontalAnchor;
176
+ qint8 updatingVerticalAnchor;
177
+
178
+
179
+ static inline QQuickAnchorsPrivate *get(QQuickAnchors *o) {
180
+ return static_cast<QQuickAnchorsPrivate *>(QObjectPrivate::get(o));
181
+ }
182
+ };
183
+
184
+ QT_END_NAMESPACE
185
+
186
+ Q_DECLARE_METATYPE(QQuickAnchorLine)
187
+
188
+ #endif
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p.h ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATEDIMAGE_P_H
5
+ #define QQUICKANIMATEDIMAGE_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_animatedimage);
21
+
22
+ #include "qquickimage_p.h"
23
+
24
+ QT_BEGIN_NAMESPACE
25
+
26
+ class QMovie;
27
+ class QQuickAnimatedImagePrivate;
28
+
29
+ class Q_QUICK_EXPORT QQuickAnimatedImage : public QQuickImage
30
+ {
31
+ Q_OBJECT
32
+
33
+ Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged)
34
+ Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
35
+ Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY frameChanged)
36
+ Q_PROPERTY(int frameCount READ frameCount NOTIFY frameCountChanged)
37
+ Q_PROPERTY(qreal speed READ speed WRITE setSpeed NOTIFY speedChanged REVISION(2, 11))
38
+
39
+ QML_NAMED_ELEMENT(AnimatedImage)
40
+ QML_ADDED_IN_VERSION(2, 0)
41
+
42
+ public:
43
+ QQuickAnimatedImage(QQuickItem *parent=nullptr);
44
+ ~QQuickAnimatedImage();
45
+
46
+ bool isPlaying() const;
47
+ void setPlaying(bool play);
48
+
49
+ bool isPaused() const;
50
+ void setPaused(bool pause);
51
+
52
+ int currentFrame() const override;
53
+ void setCurrentFrame(int frame) override;
54
+
55
+ int frameCount() const override;
56
+
57
+ qreal speed() const;
58
+ void setSpeed(qreal speed);
59
+
60
+ // Extends QQuickImage's src property
61
+ void setSource(const QUrl&) override;
62
+
63
+ Q_SIGNALS:
64
+ void playingChanged();
65
+ void pausedChanged();
66
+ void frameChanged();
67
+ void currentFrameChanged();
68
+ void frameCountChanged();
69
+ Q_REVISION(2, 11) void speedChanged();
70
+
71
+ private Q_SLOTS:
72
+ void movieUpdate();
73
+ void movieRequestFinished();
74
+ void playingStatusChanged();
75
+ void onCacheChanged();
76
+
77
+ protected:
78
+ void load() override;
79
+ void componentComplete() override;
80
+
81
+ private:
82
+ Q_DISABLE_COPY(QQuickAnimatedImage)
83
+ Q_DECLARE_PRIVATE(QQuickAnimatedImage)
84
+ };
85
+
86
+ QT_END_NAMESPACE
87
+
88
+ #endif // QQUICKANIMATEDIMAGE_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p_p.h ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATEDIMAGE_P_P_H
5
+ #define QQUICKANIMATEDIMAGE_P_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 <QtQuick/qtquickglobal.h>
19
+
20
+ QT_REQUIRE_CONFIG(quick_animatedimage);
21
+
22
+ #include "qquickimage_p_p.h"
23
+
24
+ QT_BEGIN_NAMESPACE
25
+
26
+ class QMovie;
27
+ #if QT_CONFIG(qml_network)
28
+ class QNetworkReply;
29
+ #endif
30
+
31
+ class QQuickAnimatedImagePrivate : public QQuickImagePrivate
32
+ {
33
+ Q_DECLARE_PUBLIC(QQuickAnimatedImage)
34
+
35
+ public:
36
+ QQuickAnimatedImagePrivate()
37
+ : playing(true), paused(false), oldPlaying(false)
38
+ {
39
+ }
40
+
41
+ QQuickPixmap *infoForCurrentFrame(QQmlEngine *engine);
42
+ void setMovie(QMovie *movie);
43
+ void clearCache();
44
+
45
+ qreal speed = 1;
46
+ QMovie *movie = nullptr;
47
+ int presetCurrentFrame = 0;
48
+ QMap<int, QQuickPixmap *> frameMap;
49
+
50
+ #if QT_CONFIG(qml_network)
51
+ QNetworkReply *reply = nullptr;
52
+ #endif
53
+
54
+ bool playing : 1;
55
+ bool paused : 1;
56
+ bool oldPlaying : 1;
57
+ };
58
+
59
+ QT_END_NAMESPACE
60
+
61
+ #endif // QQUICKANIMATEDIMAGE_P_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p.h ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATEDSPRITE_P_H
5
+ #define QQUICKANIMATEDSPRITE_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_sprite);
21
+
22
+ #include <QtQuick/QQuickItem>
23
+ #include <private/qquicksprite_p.h>
24
+ #include <QtCore/qelapsedtimer.h>
25
+
26
+ QT_BEGIN_NAMESPACE
27
+
28
+ class QSGContext;
29
+ class QQuickSprite;
30
+ class QQuickSpriteEngine;
31
+ class QSGGeometryNode;
32
+ class QQuickAnimatedSpritePrivate;
33
+ class QSGSpriteNode;
34
+ class Q_QUICK_EXPORT QQuickAnimatedSprite : public QQuickItem
35
+ {
36
+ Q_OBJECT
37
+ Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged)
38
+ Q_PROPERTY(bool interpolate READ interpolate WRITE setInterpolate NOTIFY interpolateChanged)
39
+ //###try to share similar spriteEngines for less overhead?
40
+ //These properties come out of QQuickSprite, since an AnimatedSprite is a renderer for a single sprite
41
+ Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
42
+ Q_PROPERTY(bool reverse READ reverse WRITE setReverse NOTIFY reverseChanged)
43
+ Q_PROPERTY(bool frameSync READ frameSync WRITE setFrameSync NOTIFY frameSyncChanged)
44
+ Q_PROPERTY(int frameCount READ frameCount WRITE setFrameCount NOTIFY frameCountChanged)
45
+ //If frame height or width is not specified, it is assumed to be a single long row of square frames.
46
+ //Otherwise, it can be multiple contiguous rows, when one row runs out the next will be used.
47
+ Q_PROPERTY(int frameHeight READ frameHeight WRITE setFrameHeight NOTIFY frameHeightChanged)
48
+ Q_PROPERTY(int frameWidth READ frameWidth WRITE setFrameWidth NOTIFY frameWidthChanged)
49
+ Q_PROPERTY(int frameX READ frameX WRITE setFrameX NOTIFY frameXChanged)
50
+ Q_PROPERTY(int frameY READ frameY WRITE setFrameY NOTIFY frameYChanged)
51
+ //Precedence order: frameRate, frameDuration
52
+ Q_PROPERTY(qreal frameRate READ frameRate WRITE setFrameRate NOTIFY frameRateChanged RESET resetFrameRate)
53
+ Q_PROPERTY(int frameDuration READ frameDuration WRITE setFrameDuration NOTIFY frameDurationChanged RESET resetFrameDuration)
54
+ //Extra Simple Sprite Stuff
55
+ Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopsChanged)
56
+ Q_PROPERTY(bool paused READ paused WRITE setPaused NOTIFY pausedChanged)
57
+ Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY currentFrameChanged)
58
+ Q_PROPERTY(FinishBehavior finishBehavior READ finishBehavior WRITE setFinishBehavior NOTIFY finishBehaviorChanged REVISION(2, 15))
59
+ QML_NAMED_ELEMENT(AnimatedSprite)
60
+ QML_ADDED_IN_VERSION(2, 0)
61
+
62
+ public:
63
+ explicit QQuickAnimatedSprite(QQuickItem *parent = nullptr);
64
+ enum LoopParameters {
65
+ Infinite = -1
66
+ };
67
+ Q_ENUM(LoopParameters)
68
+
69
+ enum FinishBehavior {
70
+ FinishAtInitialFrame,
71
+ FinishAtFinalFrame
72
+ };
73
+ Q_ENUM(FinishBehavior)
74
+
75
+ bool running() const;
76
+ bool interpolate() const;
77
+ QUrl source() const;
78
+ bool reverse() const;
79
+ bool frameSync() const;
80
+ int frameCount() const;
81
+ int frameHeight() const;
82
+ int frameWidth() const;
83
+ int frameX() const;
84
+ int frameY() const;
85
+ qreal frameRate() const;
86
+ int frameDuration() const;
87
+ int loops() const;
88
+ bool paused() const;
89
+ int currentFrame() const;
90
+ FinishBehavior finishBehavior() const;
91
+ void setFinishBehavior(FinishBehavior arg);
92
+
93
+ Q_SIGNALS:
94
+
95
+ void pausedChanged(bool arg);
96
+ void runningChanged(bool arg);
97
+ void interpolateChanged(bool arg);
98
+
99
+ void sourceChanged(const QUrl &arg);
100
+ void reverseChanged(bool arg);
101
+ void frameSyncChanged(bool arg);
102
+ void frameCountChanged(int arg);
103
+ void frameHeightChanged(int arg);
104
+ void frameWidthChanged(int arg);
105
+ void frameXChanged(int arg);
106
+ void frameYChanged(int arg);
107
+ void frameRateChanged(qreal arg);
108
+ void frameDurationChanged(int arg);
109
+ void loopsChanged(int arg);
110
+ void currentFrameChanged(int arg);
111
+ Q_REVISION(2, 15) void finishBehaviorChanged(FinishBehavior arg);
112
+
113
+ Q_REVISION(2, 12) void finished();
114
+
115
+ public Q_SLOTS:
116
+ void start();
117
+ void stop();
118
+ void restart() {stop(); start();}
119
+ void advance(int frames=1);
120
+ void pause();
121
+ void resume();
122
+
123
+ void setRunning(bool arg);
124
+ void setPaused(bool arg);
125
+ void setInterpolate(bool arg);
126
+ void setSource(const QUrl &arg);
127
+ void setReverse(bool arg);
128
+ void setFrameSync(bool arg);
129
+ void setFrameCount(int arg);
130
+ void setFrameHeight(int arg);
131
+ void setFrameWidth(int arg);
132
+ void setFrameX(int arg);
133
+ void setFrameY(int arg);
134
+ void setFrameRate(qreal arg);
135
+ void setFrameDuration(int arg);
136
+ void resetFrameRate();
137
+ void resetFrameDuration();
138
+ void setLoops(int arg);
139
+ void setCurrentFrame(int arg);
140
+
141
+ private Q_SLOTS:
142
+ void createEngine();
143
+
144
+ protected Q_SLOTS:
145
+ void reset();
146
+
147
+ protected:
148
+ void componentComplete() override;
149
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
150
+ void itemChange(ItemChange, const ItemChangeData &) override;
151
+
152
+ private:
153
+ void maybeUpdate();
154
+ bool isCurrentFrameChangedConnected();
155
+ void prepareNextFrame(QSGSpriteNode *node);
156
+ void reloadImage();
157
+ QSGSpriteNode* initNode();
158
+
159
+ private:
160
+ Q_DECLARE_PRIVATE(QQuickAnimatedSprite)
161
+ };
162
+
163
+ QT_END_NAMESPACE
164
+
165
+ #endif // QQUICKANIMATEDSPRITE_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p_p.h ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATEDSPRITE_P_P_H
5
+ #define QQUICKANIMATEDSPRITE_P_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 <QtQuick/qtquickglobal.h>
19
+
20
+ QT_REQUIRE_CONFIG(quick_sprite);
21
+
22
+ #include "qquickitem_p.h"
23
+ #include "qquicksprite_p.h"
24
+ #include "qquickanimatedsprite_p.h"
25
+
26
+ QT_BEGIN_NAMESPACE
27
+
28
+ class QQuickAnimatedSpritePrivate : public QQuickItemPrivate
29
+ {
30
+ Q_DECLARE_PUBLIC(QQuickAnimatedSprite)
31
+
32
+ public:
33
+ QQuickAnimatedSpritePrivate()
34
+ : m_sprite(nullptr)
35
+ , m_spriteEngine(nullptr)
36
+ , m_curFrame(0)
37
+ , m_pleaseReset(false)
38
+ , m_running(true)
39
+ , m_paused(false)
40
+ , m_interpolate(true)
41
+ , m_loops(-1)
42
+ , m_curLoop(0)
43
+ , m_pauseOffset(0)
44
+ , m_finishBehavior(QQuickAnimatedSprite::FinishAtInitialFrame)
45
+ {
46
+ }
47
+
48
+ QQuickSprite* m_sprite;
49
+ QQuickSpriteEngine* m_spriteEngine;
50
+ QElapsedTimer m_timestamp;
51
+ int m_curFrame;
52
+ bool m_pleaseReset;
53
+ bool m_running;
54
+ bool m_paused;
55
+ bool m_interpolate;
56
+ QSize m_sheetSize;
57
+ int m_loops;
58
+ int m_curLoop;
59
+ int m_pauseOffset;
60
+ QQuickAnimatedSprite::FinishBehavior m_finishBehavior;
61
+ };
62
+
63
+ QT_END_NAMESPACE
64
+
65
+ #endif // QQUICKANIMATEDSPRITE_P_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p.h ADDED
@@ -0,0 +1,455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATION_H
5
+ #define QQUICKANIMATION_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 "qquickstate_p.h"
19
+ #include <QtGui/qvector3d.h>
20
+
21
+ #include <qqmlpropertyvaluesource.h>
22
+ #include <qqml.h>
23
+ #include <qqmlscriptstring.h>
24
+
25
+ #include <QtCore/qvariant.h>
26
+ #include <QtCore/qeasingcurve.h>
27
+ #include "private/qabstractanimationjob_p.h"
28
+ #include <QtGui/qcolor.h>
29
+
30
+ QT_BEGIN_NAMESPACE
31
+
32
+ class QQuickAbstractAnimationPrivate;
33
+ class QQuickAnimationGroup;
34
+ class Q_QUICK_EXPORT QQuickAbstractAnimation : public QObject, public QQmlPropertyValueSource, public QQmlParserStatus
35
+ {
36
+ Q_OBJECT
37
+ Q_DECLARE_PRIVATE(QQuickAbstractAnimation)
38
+
39
+ Q_INTERFACES(QQmlParserStatus)
40
+ Q_INTERFACES(QQmlPropertyValueSource)
41
+ Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
42
+ Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged)
43
+ Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged)
44
+ Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopCountChanged)
45
+ Q_CLASSINFO("DefaultMethod", "start()")
46
+
47
+ QML_NAMED_ELEMENT(Animation)
48
+ QML_ADDED_IN_VERSION(2, 0)
49
+ QML_UNCREATABLE("Animation is an abstract class")
50
+
51
+ public:
52
+ enum ThreadingModel {
53
+ GuiThread,
54
+ RenderThread,
55
+ AnyThread
56
+ };
57
+
58
+ QQuickAbstractAnimation(QObject *parent=nullptr);
59
+ ~QQuickAbstractAnimation() override;
60
+
61
+ enum Loops { Infinite = -2 };
62
+ Q_ENUM(Loops)
63
+
64
+ bool isRunning() const;
65
+ void setRunning(bool);
66
+ bool isPaused() const;
67
+ void setPaused(bool);
68
+ bool alwaysRunToEnd() const;
69
+ void setAlwaysRunToEnd(bool);
70
+
71
+ int loops() const;
72
+ void setLoops(int);
73
+ int duration() const;
74
+
75
+ int currentTime();
76
+ void setCurrentTime(int);
77
+
78
+ QQuickAnimationGroup *group() const;
79
+ void setGroup(QQuickAnimationGroup *, int index = -1);
80
+
81
+ void setDefaultTarget(const QQmlProperty &);
82
+ void setDisableUserControl();
83
+ void setEnableUserControl();
84
+ bool userControlDisabled() const;
85
+ void classBegin() override;
86
+ void componentComplete() override;
87
+
88
+ virtual ThreadingModel threadingModel() const;
89
+
90
+ Q_SIGNALS:
91
+ void started();
92
+ void stopped();
93
+ void runningChanged(bool);
94
+ void pausedChanged(bool);
95
+ void alwaysRunToEndChanged(bool);
96
+ void loopCountChanged(int);
97
+ Q_REVISION(2, 12) void finished();
98
+
99
+ public Q_SLOTS:
100
+ void restart();
101
+ void start();
102
+ void pause();
103
+ void resume();
104
+ void stop();
105
+ void complete();
106
+
107
+ protected:
108
+ QQuickAbstractAnimation(QQuickAbstractAnimationPrivate &dd, QObject *parent);
109
+ QAbstractAnimationJob* initInstance(QAbstractAnimationJob *animation);
110
+
111
+ public:
112
+ enum TransitionDirection { Forward, Backward };
113
+ virtual QAbstractAnimationJob* transition(QQuickStateActions &actions,
114
+ QQmlProperties &modified,
115
+ TransitionDirection direction,
116
+ QObject *defaultTarget = nullptr);
117
+ QAbstractAnimationJob* qtAnimation();
118
+
119
+ private:
120
+ void setTarget(const QQmlProperty &) override;
121
+ void notifyRunningChanged(bool running);
122
+ friend class QQuickBehavior;
123
+ friend class QQuickBehaviorPrivate;
124
+ friend class QQuickAnimationGroup;
125
+ };
126
+
127
+ class QQuickPauseAnimationPrivate;
128
+ class Q_QUICK_EXPORT QQuickPauseAnimation : public QQuickAbstractAnimation
129
+ {
130
+ Q_OBJECT
131
+ Q_DECLARE_PRIVATE(QQuickPauseAnimation)
132
+
133
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
134
+ QML_NAMED_ELEMENT(PauseAnimation)
135
+ QML_ADDED_IN_VERSION(2, 0)
136
+
137
+ public:
138
+ QQuickPauseAnimation(QObject *parent=nullptr);
139
+ ~QQuickPauseAnimation() override;
140
+
141
+ int duration() const;
142
+ void setDuration(int);
143
+
144
+ Q_SIGNALS:
145
+ void durationChanged(int);
146
+
147
+ protected:
148
+ QAbstractAnimationJob* transition(QQuickStateActions &actions,
149
+ QQmlProperties &modified,
150
+ TransitionDirection direction,
151
+ QObject *defaultTarget = nullptr) override;
152
+ };
153
+
154
+ class QQuickScriptActionPrivate;
155
+ class Q_QUICK_EXPORT QQuickScriptAction : public QQuickAbstractAnimation
156
+ {
157
+ Q_OBJECT
158
+ Q_DECLARE_PRIVATE(QQuickScriptAction)
159
+
160
+ Q_PROPERTY(QQmlScriptString script READ script WRITE setScript)
161
+ Q_PROPERTY(QString scriptName READ stateChangeScriptName WRITE setStateChangeScriptName)
162
+ QML_NAMED_ELEMENT(ScriptAction)
163
+ QML_ADDED_IN_VERSION(2, 0)
164
+
165
+ public:
166
+ QQuickScriptAction(QObject *parent=nullptr);
167
+ ~QQuickScriptAction() override;
168
+
169
+ QQmlScriptString script() const;
170
+ void setScript(const QQmlScriptString &);
171
+
172
+ QString stateChangeScriptName() const;
173
+ void setStateChangeScriptName(const QString &);
174
+
175
+ protected:
176
+ QAbstractAnimationJob* transition(QQuickStateActions &actions,
177
+ QQmlProperties &modified,
178
+ TransitionDirection direction,
179
+ QObject *defaultTarget = nullptr) override;
180
+ };
181
+
182
+ class QQuickPropertyActionPrivate;
183
+ class Q_QUICK_EXPORT QQuickPropertyAction : public QQuickAbstractAnimation
184
+ {
185
+ Q_OBJECT
186
+ Q_DECLARE_PRIVATE(QQuickPropertyAction)
187
+
188
+ Q_PROPERTY(QObject *target READ target WRITE setTargetObject NOTIFY targetChanged)
189
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)
190
+ Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
191
+ Q_PROPERTY(QQmlListProperty<QObject> targets READ targets)
192
+ Q_PROPERTY(QQmlListProperty<QObject> exclude READ exclude)
193
+ Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
194
+ QML_NAMED_ELEMENT(PropertyAction)
195
+ QML_ADDED_IN_VERSION(2, 0)
196
+
197
+ public:
198
+ QQuickPropertyAction(QObject *parent=nullptr);
199
+ ~QQuickPropertyAction() override;
200
+
201
+ QObject *target() const;
202
+ void setTargetObject(QObject *);
203
+
204
+ QString property() const;
205
+ void setProperty(const QString &);
206
+
207
+ QString properties() const;
208
+ void setProperties(const QString &);
209
+
210
+ QQmlListProperty<QObject> targets();
211
+ QQmlListProperty<QObject> exclude();
212
+
213
+ QVariant value() const;
214
+ void setValue(const QVariant &);
215
+
216
+ Q_SIGNALS:
217
+ void valueChanged(const QVariant &);
218
+ void propertiesChanged(const QString &);
219
+ void targetChanged();
220
+ void propertyChanged();
221
+
222
+ protected:
223
+ QAbstractAnimationJob* transition(QQuickStateActions &actions,
224
+ QQmlProperties &modified,
225
+ TransitionDirection direction,
226
+ QObject *defaultTarget = nullptr) override;
227
+ };
228
+
229
+ class QQuickPropertyAnimationPrivate;
230
+ class Q_QUICK_EXPORT QQuickPropertyAnimation : public QQuickAbstractAnimation
231
+ {
232
+ Q_OBJECT
233
+ Q_DECLARE_PRIVATE(QQuickPropertyAnimation)
234
+
235
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
236
+ Q_PROPERTY(QVariant from READ from WRITE setFrom NOTIFY fromChanged)
237
+ Q_PROPERTY(QVariant to READ to WRITE setTo NOTIFY toChanged)
238
+ Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged)
239
+ Q_PROPERTY(QObject *target READ target WRITE setTargetObject NOTIFY targetChanged)
240
+ Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged)
241
+ Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
242
+ Q_PROPERTY(QQmlListProperty<QObject> targets READ targets)
243
+ Q_PROPERTY(QQmlListProperty<QObject> exclude READ exclude)
244
+ QML_NAMED_ELEMENT(PropertyAnimation)
245
+ QML_ADDED_IN_VERSION(2, 0)
246
+
247
+ public:
248
+ QQuickPropertyAnimation(QObject *parent=nullptr);
249
+ ~QQuickPropertyAnimation() override;
250
+
251
+ virtual int duration() const;
252
+ virtual void setDuration(int);
253
+
254
+ QVariant from() const;
255
+ void setFrom(const QVariant &);
256
+
257
+ QVariant to() const;
258
+ void setTo(const QVariant &);
259
+
260
+ QEasingCurve easing() const;
261
+ void setEasing(const QEasingCurve &);
262
+
263
+ QObject *target() const;
264
+ void setTargetObject(QObject *);
265
+
266
+ QString property() const;
267
+ void setProperty(const QString &);
268
+
269
+ QString properties() const;
270
+ void setProperties(const QString &);
271
+
272
+ QQmlListProperty<QObject> targets();
273
+ QQmlListProperty<QObject> exclude();
274
+
275
+ protected:
276
+ QQuickStateActions createTransitionActions(QQuickStateActions &actions,
277
+ QQmlProperties &modified,
278
+ QObject *defaultTarget = nullptr);
279
+
280
+ QQuickPropertyAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent);
281
+ QAbstractAnimationJob* transition(QQuickStateActions &actions,
282
+ QQmlProperties &modified,
283
+ TransitionDirection direction,
284
+ QObject *defaultTarget = nullptr) override;
285
+ Q_SIGNALS:
286
+ void durationChanged(int);
287
+ void fromChanged();
288
+ void toChanged();
289
+ void easingChanged(const QEasingCurve &);
290
+ void propertiesChanged(const QString &);
291
+ void targetChanged();
292
+ void propertyChanged();
293
+ };
294
+
295
+ class Q_QUICK_EXPORT QQuickColorAnimation : public QQuickPropertyAnimation
296
+ {
297
+ Q_OBJECT
298
+ Q_DECLARE_PRIVATE(QQuickPropertyAnimation)
299
+ Q_PROPERTY(QColor from READ from WRITE setFrom)
300
+ Q_PROPERTY(QColor to READ to WRITE setTo)
301
+ QML_NAMED_ELEMENT(ColorAnimation)
302
+ QML_ADDED_IN_VERSION(2, 0)
303
+
304
+ public:
305
+ QQuickColorAnimation(QObject *parent=nullptr);
306
+ ~QQuickColorAnimation() override;
307
+
308
+ QColor from() const;
309
+ void setFrom(const QColor &);
310
+
311
+ QColor to() const;
312
+ void setTo(const QColor &);
313
+ };
314
+
315
+ class Q_QUICK_EXPORT QQuickNumberAnimation : public QQuickPropertyAnimation
316
+ {
317
+ Q_OBJECT
318
+ Q_DECLARE_PRIVATE(QQuickPropertyAnimation)
319
+
320
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
321
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
322
+ QML_NAMED_ELEMENT(NumberAnimation)
323
+ QML_ADDED_IN_VERSION(2, 0)
324
+
325
+ public:
326
+ QQuickNumberAnimation(QObject *parent=nullptr);
327
+ ~QQuickNumberAnimation() override;
328
+
329
+ qreal from() const;
330
+ void setFrom(qreal);
331
+
332
+ qreal to() const;
333
+ void setTo(qreal);
334
+
335
+ protected:
336
+ QQuickNumberAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent);
337
+
338
+ private:
339
+ void init();
340
+ };
341
+
342
+ class Q_QUICK_EXPORT QQuickVector3dAnimation : public QQuickPropertyAnimation
343
+ {
344
+ Q_OBJECT
345
+ Q_DECLARE_PRIVATE(QQuickPropertyAnimation)
346
+
347
+ Q_PROPERTY(QVector3D from READ from WRITE setFrom NOTIFY fromChanged)
348
+ Q_PROPERTY(QVector3D to READ to WRITE setTo NOTIFY toChanged)
349
+ QML_NAMED_ELEMENT(Vector3dAnimation)
350
+ QML_ADDED_IN_VERSION(2, 0)
351
+
352
+ public:
353
+ QQuickVector3dAnimation(QObject *parent=nullptr);
354
+ ~QQuickVector3dAnimation() override;
355
+
356
+ QVector3D from() const;
357
+ void setFrom(QVector3D);
358
+
359
+ QVector3D to() const;
360
+ void setTo(QVector3D);
361
+ };
362
+
363
+ class QQuickRotationAnimationPrivate;
364
+ class Q_QUICK_EXPORT QQuickRotationAnimation : public QQuickPropertyAnimation
365
+ {
366
+ Q_OBJECT
367
+ Q_DECLARE_PRIVATE(QQuickRotationAnimation)
368
+
369
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
370
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
371
+ Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged)
372
+ QML_NAMED_ELEMENT(RotationAnimation)
373
+ QML_ADDED_IN_VERSION(2, 0)
374
+
375
+ public:
376
+ QQuickRotationAnimation(QObject *parent=nullptr);
377
+ ~QQuickRotationAnimation() override;
378
+
379
+ qreal from() const;
380
+ void setFrom(qreal);
381
+
382
+ qreal to() const;
383
+ void setTo(qreal);
384
+
385
+ enum RotationDirection { Numerical, Shortest, Clockwise, Counterclockwise };
386
+ Q_ENUM(RotationDirection)
387
+ RotationDirection direction() const;
388
+ void setDirection(RotationDirection direction);
389
+
390
+ Q_SIGNALS:
391
+ void directionChanged();
392
+ };
393
+
394
+ class QQuickAnimationGroupPrivate;
395
+ class Q_QUICK_EXPORT QQuickAnimationGroup : public QQuickAbstractAnimation
396
+ {
397
+ Q_OBJECT
398
+ Q_DECLARE_PRIVATE(QQuickAnimationGroup)
399
+
400
+ Q_CLASSINFO("DefaultProperty", "animations")
401
+ Q_PROPERTY(QQmlListProperty<QQuickAbstractAnimation> animations READ animations)
402
+
403
+ public:
404
+ QQuickAnimationGroup(QObject *parent);
405
+ ~QQuickAnimationGroup() override;
406
+
407
+ QQmlListProperty<QQuickAbstractAnimation> animations();
408
+ friend class QQuickAbstractAnimation;
409
+
410
+ protected:
411
+ QQuickAnimationGroup(QQuickAnimationGroupPrivate &dd, QObject *parent);
412
+ };
413
+
414
+ class Q_QUICK_EXPORT QQuickSequentialAnimation : public QQuickAnimationGroup
415
+ {
416
+ Q_OBJECT
417
+ Q_DECLARE_PRIVATE(QQuickAnimationGroup)
418
+ QML_NAMED_ELEMENT(SequentialAnimation)
419
+ QML_ADDED_IN_VERSION(2, 0)
420
+
421
+ public:
422
+ QQuickSequentialAnimation(QObject *parent=nullptr);
423
+ ~QQuickSequentialAnimation() override;
424
+
425
+ protected:
426
+ ThreadingModel threadingModel() const override;
427
+ QAbstractAnimationJob* transition(QQuickStateActions &actions,
428
+ QQmlProperties &modified,
429
+ TransitionDirection direction,
430
+ QObject *defaultTarget = nullptr) override;
431
+ };
432
+
433
+ class Q_QUICK_EXPORT QQuickParallelAnimation : public QQuickAnimationGroup
434
+ {
435
+ Q_OBJECT
436
+ Q_DECLARE_PRIVATE(QQuickAnimationGroup)
437
+ QML_NAMED_ELEMENT(ParallelAnimation)
438
+ QML_ADDED_IN_VERSION(2, 0)
439
+
440
+ public:
441
+ QQuickParallelAnimation(QObject *parent=nullptr);
442
+ ~QQuickParallelAnimation() override;
443
+
444
+ protected:
445
+ ThreadingModel threadingModel() const override;
446
+ QAbstractAnimationJob* transition(QQuickStateActions &actions,
447
+ QQmlProperties &modified,
448
+ TransitionDirection direction,
449
+ QObject *defaultTarget = nullptr) override;
450
+ };
451
+
452
+
453
+ QT_END_NAMESPACE
454
+
455
+ #endif // QQUICKANIMATION_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p_p.h ADDED
@@ -0,0 +1,304 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATION2_P_H
5
+ #define QQUICKANIMATION2_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 "qquickanimation_p.h"
19
+
20
+ #include <private/qqmlnullablevalue_p.h>
21
+
22
+ #include <qqml.h>
23
+ #include <qqmlcontext.h>
24
+
25
+ #include <private/qvariantanimation_p.h>
26
+ #include "private/qpauseanimationjob_p.h"
27
+ #include <QDebug>
28
+
29
+ #include <private/qobject_p.h>
30
+ #include "private/qanimationgroupjob_p.h"
31
+ #include <QDebug>
32
+
33
+ #include <private/qobject_p.h>
34
+ #include <QtCore/qpointer.h>
35
+
36
+ QT_BEGIN_NAMESPACE
37
+
38
+ //interface for classes that provide animation actions for QActionAnimation
39
+ class QAbstractAnimationAction
40
+ {
41
+ public:
42
+ virtual ~QAbstractAnimationAction() {}
43
+ virtual void doAction() = 0;
44
+ virtual void debugAction(QDebug, int) const {}
45
+ };
46
+
47
+ //templated animation action
48
+ //allows us to specify an action that calls a function of a class.
49
+ //(so that class doesn't have to inherit QQuickAbstractAnimationAction)
50
+ template<class T, void (T::*method)(), void (T::*debugMethod)(QDebug, int) const>
51
+ class QAnimationActionProxy : public QAbstractAnimationAction
52
+ {
53
+ public:
54
+ QAnimationActionProxy(T *instance) : m_instance(instance) {}
55
+ void doAction() override { (m_instance->*method)(); }
56
+ void debugAction(QDebug d, int indentLevel) const override { (m_instance->*debugMethod)(d, indentLevel); }
57
+ private:
58
+ T *m_instance;
59
+ };
60
+
61
+ //performs an action of type QAbstractAnimationAction
62
+ class Q_AUTOTEST_EXPORT QActionAnimation : public QAbstractAnimationJob
63
+ {
64
+ Q_DISABLE_COPY(QActionAnimation)
65
+ public:
66
+ QActionAnimation();
67
+
68
+ QActionAnimation(QAbstractAnimationAction *action);
69
+ ~QActionAnimation() override;
70
+
71
+ int duration() const override;
72
+ void setAnimAction(QAbstractAnimationAction *action);
73
+
74
+ protected:
75
+ void updateCurrentTime(int) override;
76
+ void updateState(State newState, State oldState) override;
77
+ void debugAnimation(QDebug d) const override;
78
+
79
+ private:
80
+ QAbstractAnimationAction *animAction;
81
+ };
82
+
83
+ class QQuickBulkValueUpdater
84
+ {
85
+ public:
86
+ virtual ~QQuickBulkValueUpdater() {}
87
+ virtual void setValue(qreal value) = 0;
88
+ virtual void debugUpdater(QDebug, int) const {}
89
+ };
90
+
91
+ //animates QQuickBulkValueUpdater (assumes start and end values will be reals or compatible)
92
+ class Q_QUICK_AUTOTEST_EXPORT QQuickBulkValueAnimator : public QAbstractAnimationJob
93
+ {
94
+ Q_DISABLE_COPY(QQuickBulkValueAnimator)
95
+ public:
96
+ QQuickBulkValueAnimator();
97
+ ~QQuickBulkValueAnimator() override;
98
+
99
+ void setAnimValue(QQuickBulkValueUpdater *value);
100
+ QQuickBulkValueUpdater *getAnimValue() const { return animValue; }
101
+
102
+ void setFromIsSourcedValue(bool *value) { fromIsSourced = value; }
103
+
104
+ int duration() const override { return m_duration; }
105
+ void setDuration(int msecs) { m_duration = msecs; }
106
+
107
+ QEasingCurve easingCurve() const { return easing; }
108
+ void setEasingCurve(const QEasingCurve &curve) { easing = curve; }
109
+
110
+ protected:
111
+ void updateCurrentTime(int currentTime) override;
112
+ void topLevelAnimationLoopChanged() override;
113
+ void debugAnimation(QDebug d) const override;
114
+
115
+ private:
116
+ QQuickBulkValueUpdater *animValue;
117
+ bool *fromIsSourced;
118
+ int m_duration;
119
+ QEasingCurve easing;
120
+ };
121
+
122
+ //an animation that just gives a tick
123
+ template<class T, void (T::*method)(int)>
124
+ class QTickAnimationProxy : public QAbstractAnimationJob
125
+ {
126
+ Q_DISABLE_COPY(QTickAnimationProxy)
127
+ public:
128
+ QTickAnimationProxy(T *instance) : QAbstractAnimationJob(), m_instance(instance) {}
129
+ int duration() const override { return -1; }
130
+ protected:
131
+ void updateCurrentTime(int msec) override { (m_instance->*method)(msec); }
132
+
133
+ private:
134
+ T *m_instance;
135
+ };
136
+
137
+ class Q_QUICK_EXPORT QQuickAbstractAnimationPrivate : public QObjectPrivate, public QAnimationJobChangeListener
138
+ {
139
+ Q_DECLARE_PUBLIC(QQuickAbstractAnimation)
140
+ public:
141
+ QQuickAbstractAnimationPrivate()
142
+ : running(false), paused(false), alwaysRunToEnd(false),
143
+ /*connectedTimeLine(false), */componentComplete(true),
144
+ avoidPropertyValueSourceStart(false), disableUserControl(false),
145
+ needsDeferredSetRunning(false), loopCount(1), group(nullptr), animationInstance(nullptr) {}
146
+
147
+ bool running:1;
148
+ bool paused:1;
149
+ bool alwaysRunToEnd:1;
150
+ //bool connectedTimeLine:1;
151
+ bool componentComplete:1;
152
+ bool avoidPropertyValueSourceStart:1;
153
+ bool disableUserControl:1;
154
+ bool needsDeferredSetRunning:1;
155
+
156
+ int loopCount;
157
+
158
+ void commence();
159
+ void animationFinished(QAbstractAnimationJob *) override;
160
+
161
+ QQmlProperty defaultProperty;
162
+
163
+ QQuickAnimationGroup *group;
164
+ QAbstractAnimationJob* animationInstance;
165
+
166
+ static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = nullptr);
167
+ void animationGroupDirty();
168
+ };
169
+
170
+ class QQuickPauseAnimationPrivate : public QQuickAbstractAnimationPrivate
171
+ {
172
+ Q_DECLARE_PUBLIC(QQuickPauseAnimation)
173
+ public:
174
+ QQuickPauseAnimationPrivate()
175
+ : QQuickAbstractAnimationPrivate(), duration(250) {}
176
+
177
+ int duration;
178
+ };
179
+
180
+ class QQuickScriptActionPrivate : public QQuickAbstractAnimationPrivate
181
+ {
182
+ Q_DECLARE_PUBLIC(QQuickScriptAction)
183
+ public:
184
+ QQuickScriptActionPrivate();
185
+
186
+ QQmlScriptString script;
187
+ QString name;
188
+ QQmlScriptString runScriptScript;
189
+ bool hasRunScriptScript;
190
+ bool reversing;
191
+
192
+ void execute();
193
+ QAbstractAnimationAction* createAction();
194
+ void debugAction(QDebug d, int indentLevel) const;
195
+ typedef QAnimationActionProxy<QQuickScriptActionPrivate,
196
+ &QQuickScriptActionPrivate::execute,
197
+ &QQuickScriptActionPrivate::debugAction> Proxy;
198
+ };
199
+
200
+ class QQuickPropertyActionPrivate : public QQuickAbstractAnimationPrivate
201
+ {
202
+ Q_DECLARE_PUBLIC(QQuickPropertyAction)
203
+ public:
204
+ QQuickPropertyActionPrivate()
205
+ : QQuickAbstractAnimationPrivate(), target(nullptr) {}
206
+
207
+ QObject *target;
208
+ QString propertyName;
209
+ QString properties;
210
+ QList<QObject *> targets;
211
+ QList<QObject *> exclude;
212
+
213
+ QQmlNullableValue<QVariant> value;
214
+ };
215
+
216
+ class QQuickAnimationGroupPrivate : public QQuickAbstractAnimationPrivate
217
+ {
218
+ Q_DECLARE_PUBLIC(QQuickAnimationGroup)
219
+ public:
220
+ QQuickAnimationGroupPrivate()
221
+ : QQuickAbstractAnimationPrivate(), animationDirty(false) {}
222
+
223
+ static void append_animation(QQmlListProperty<QQuickAbstractAnimation> *list, QQuickAbstractAnimation *role);
224
+ static QQuickAbstractAnimation *at_animation(QQmlListProperty<QQuickAbstractAnimation> *list, qsizetype index);
225
+ static qsizetype count_animation(QQmlListProperty<QQuickAbstractAnimation> *list);
226
+ static void clear_animation(QQmlListProperty<QQuickAbstractAnimation> *list);
227
+ static void replace_animation(QQmlListProperty<QQuickAbstractAnimation> *list, qsizetype index,
228
+ QQuickAbstractAnimation *role);
229
+ static void removeLast_animation(QQmlListProperty<QQuickAbstractAnimation> *list);
230
+ QList<QQuickAbstractAnimation *> animations;
231
+
232
+ void restartFromCurrentLoop();
233
+ void animationCurrentLoopChanged(QAbstractAnimationJob *job) override;
234
+ bool animationDirty: 1;
235
+ };
236
+
237
+ class Q_QUICK_EXPORT QQuickPropertyAnimationPrivate : public QQuickAbstractAnimationPrivate
238
+ {
239
+ Q_DECLARE_PUBLIC(QQuickPropertyAnimation)
240
+ public:
241
+ QQuickPropertyAnimationPrivate()
242
+ : QQuickAbstractAnimationPrivate(), target(nullptr), fromIsDefined(false), toIsDefined(false), ourPropertiesDirty(false),
243
+ defaultToInterpolatorType(0), interpolatorType(0), interpolator(nullptr), duration(250), actions(nullptr) {}
244
+
245
+ void animationCurrentLoopChanged(QAbstractAnimationJob *job) override;
246
+
247
+ QVariant from;
248
+ QVariant to;
249
+
250
+ QObject *target;
251
+ QString propertyName;
252
+ QString properties;
253
+ QList<QPointer<QObject>> targets;
254
+ QList<QObject *> exclude;
255
+ QString defaultProperties;
256
+
257
+ bool fromIsDefined:1;
258
+ bool toIsDefined:1;
259
+ bool ourPropertiesDirty : 1;
260
+ bool defaultToInterpolatorType:1;
261
+ int interpolatorType;
262
+ QVariantAnimation::Interpolator interpolator;
263
+ int duration;
264
+ QEasingCurve easing;
265
+
266
+ // for animations that don't use the QQuickBulkValueAnimator
267
+ QQuickStateActions *actions;
268
+
269
+ static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress);
270
+ static void convertVariant(QVariant &variant, QMetaType type);
271
+ };
272
+
273
+ class QQuickRotationAnimationPrivate : public QQuickPropertyAnimationPrivate
274
+ {
275
+ Q_DECLARE_PUBLIC(QQuickRotationAnimation)
276
+ public:
277
+ QQuickRotationAnimationPrivate() : direction(QQuickRotationAnimation::Numerical) {}
278
+
279
+ QQuickRotationAnimation::RotationDirection direction;
280
+ };
281
+
282
+ class Q_AUTOTEST_EXPORT QQuickAnimationPropertyUpdater : public QQuickBulkValueUpdater
283
+ {
284
+ public:
285
+ QQuickAnimationPropertyUpdater() : interpolatorType(0), interpolator(nullptr), prevInterpolatorType(0), reverse(false), fromIsSourced(false), fromIsDefined(false), wasDeleted(nullptr) {}
286
+ ~QQuickAnimationPropertyUpdater() override;
287
+
288
+ void setValue(qreal v) override;
289
+
290
+ void debugUpdater(QDebug d, int indentLevel) const override;
291
+
292
+ QQuickStateActions actions;
293
+ int interpolatorType; //for Number/ColorAnimation
294
+ QVariantAnimation::Interpolator interpolator;
295
+ int prevInterpolatorType; //for generic
296
+ bool reverse;
297
+ bool fromIsSourced;
298
+ bool fromIsDefined;
299
+ bool *wasDeleted;
300
+ };
301
+
302
+ QT_END_NAMESPACE
303
+
304
+ #endif // QQUICKANIMATION2_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimationcontroller_p.h ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATIONCONTROLLER_H
5
+ #define QQUICKANIMATIONCONTROLLER_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 <qqml.h>
19
+ #include <private/qqmlfinalizer_p.h>
20
+ #include "qquickanimation_p.h"
21
+
22
+ QT_BEGIN_NAMESPACE
23
+
24
+ class QQuickAnimationControllerPrivate;
25
+ class Q_QUICK_EXPORT QQuickAnimationController : public QObject, public QQmlFinalizerHook
26
+ {
27
+ Q_OBJECT
28
+ Q_DISABLE_COPY_MOVE(QQuickAnimationController)
29
+ Q_INTERFACES(QQmlFinalizerHook)
30
+
31
+ Q_DECLARE_PRIVATE(QQuickAnimationController)
32
+ Q_CLASSINFO("DefaultProperty", "animation")
33
+ QML_NAMED_ELEMENT(AnimationController)
34
+ QML_ADDED_IN_VERSION(2, 0)
35
+
36
+ Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged)
37
+ Q_PROPERTY(QQuickAbstractAnimation *animation READ animation WRITE setAnimation NOTIFY animationChanged)
38
+
39
+ public:
40
+ QQuickAnimationController(QObject *parent=nullptr);
41
+ ~QQuickAnimationController();
42
+
43
+ qreal progress() const;
44
+ void setProgress(qreal progress);
45
+
46
+ QQuickAbstractAnimation *animation() const;
47
+ void setAnimation(QQuickAbstractAnimation *animation);
48
+
49
+ void componentFinalized() override;
50
+ Q_SIGNALS:
51
+ void progressChanged();
52
+ void animationChanged();
53
+ public Q_SLOTS:
54
+ void reload();
55
+ void completeToBeginning();
56
+ void completeToEnd();
57
+ private Q_SLOTS:
58
+ void updateProgress();
59
+ };
60
+
61
+ QT_END_NAMESPACE
62
+
63
+ #endif // QQUICKANIMATIONCONTROLLER_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p.h ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATOR_P_H
5
+ #define QQUICKANIMATOR_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 "qquickanimation_p.h"
19
+
20
+ QT_BEGIN_NAMESPACE
21
+
22
+ class QQuickItem;
23
+
24
+ class QQuickAnimatorJob;
25
+ class QQuickAnimatorPrivate;
26
+ class Q_QUICK_EXPORT QQuickAnimator : public QQuickAbstractAnimation
27
+ {
28
+ Q_OBJECT
29
+ Q_DECLARE_PRIVATE(QQuickAnimator)
30
+ Q_PROPERTY(QQuickItem *target READ targetItem WRITE setTargetItem NOTIFY targetItemChanged)
31
+ Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged)
32
+ Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged)
33
+ Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged)
34
+ Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged)
35
+
36
+ QML_NAMED_ELEMENT(Animator)
37
+ QML_ADDED_IN_VERSION(2, 2)
38
+ QML_UNCREATABLE("Animator is an abstract class")
39
+
40
+ public:
41
+ QQuickItem *targetItem() const;
42
+ void setTargetItem(QQuickItem *target);
43
+
44
+ int duration() const;
45
+ void setDuration(int duration);
46
+
47
+ QEasingCurve easing() const;
48
+ void setEasing(const QEasingCurve & easing);
49
+
50
+ qreal to() const;
51
+ void setTo(qreal to);
52
+
53
+ qreal from() const;
54
+ void setFrom(qreal from);
55
+
56
+ protected:
57
+ ThreadingModel threadingModel() const override { return RenderThread; }
58
+ virtual QQuickAnimatorJob *createJob() const = 0;
59
+ virtual QString propertyName() const = 0;
60
+ QAbstractAnimationJob *transition(QQuickStateActions &actions,
61
+ QQmlProperties &modified,
62
+ TransitionDirection,
63
+ QObject *) override;
64
+
65
+ QQuickAnimator(QQuickAnimatorPrivate &dd, QObject *parent = nullptr);
66
+ QQuickAnimator(QObject *parent = nullptr);
67
+
68
+ Q_SIGNALS:
69
+ void targetItemChanged(QQuickItem *);
70
+ void durationChanged(int duration);
71
+ void easingChanged(const QEasingCurve &curve);
72
+ void toChanged(qreal to);
73
+ void fromChanged(qreal from);
74
+ };
75
+
76
+ class Q_QUICK_EXPORT QQuickScaleAnimator : public QQuickAnimator
77
+ {
78
+ Q_OBJECT
79
+ QML_NAMED_ELEMENT(ScaleAnimator)
80
+ QML_ADDED_IN_VERSION(2, 2)
81
+ public:
82
+ QQuickScaleAnimator(QObject *parent = nullptr);
83
+ protected:
84
+ QQuickAnimatorJob *createJob() const override;
85
+ QString propertyName() const override { return QStringLiteral("scale"); }
86
+ };
87
+
88
+ class Q_QUICK_EXPORT QQuickXAnimator : public QQuickAnimator
89
+ {
90
+ Q_OBJECT
91
+ QML_NAMED_ELEMENT(XAnimator)
92
+ QML_ADDED_IN_VERSION(2, 2)
93
+ public:
94
+ QQuickXAnimator(QObject *parent = nullptr);
95
+ protected:
96
+ QQuickAnimatorJob *createJob() const override;
97
+ QString propertyName() const override { return QStringLiteral("x"); }
98
+ };
99
+
100
+ class Q_QUICK_EXPORT QQuickYAnimator : public QQuickAnimator
101
+ {
102
+ Q_OBJECT
103
+ QML_NAMED_ELEMENT(YAnimator)
104
+ QML_ADDED_IN_VERSION(2, 2)
105
+ public:
106
+ QQuickYAnimator(QObject *parent = nullptr);
107
+ protected:
108
+ QQuickAnimatorJob *createJob() const override;
109
+ QString propertyName() const override { return QStringLiteral("y"); }
110
+ };
111
+
112
+ class Q_QUICK_EXPORT QQuickOpacityAnimator : public QQuickAnimator
113
+ {
114
+ Q_OBJECT
115
+ QML_NAMED_ELEMENT(OpacityAnimator)
116
+ QML_ADDED_IN_VERSION(2, 2)
117
+ public:
118
+ QQuickOpacityAnimator(QObject *parent = nullptr);
119
+ protected:
120
+ QQuickAnimatorJob *createJob() const override;
121
+ QString propertyName() const override { return QStringLiteral("opacity"); }
122
+ };
123
+
124
+ class QQuickRotationAnimatorPrivate;
125
+ class Q_QUICK_EXPORT QQuickRotationAnimator : public QQuickAnimator
126
+ {
127
+ Q_OBJECT
128
+ Q_DECLARE_PRIVATE(QQuickRotationAnimator)
129
+ Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged)
130
+ QML_NAMED_ELEMENT(RotationAnimator)
131
+ QML_ADDED_IN_VERSION(2, 2)
132
+
133
+ public:
134
+ enum RotationDirection { Numerical, Shortest, Clockwise, Counterclockwise };
135
+ Q_ENUM(RotationDirection)
136
+
137
+ QQuickRotationAnimator(QObject *parent = nullptr);
138
+
139
+ void setDirection(RotationDirection dir);
140
+ RotationDirection direction() const;
141
+
142
+ Q_SIGNALS:
143
+ void directionChanged(RotationDirection dir);
144
+
145
+ protected:
146
+ QQuickAnimatorJob *createJob() const override;
147
+ QString propertyName() const override { return QStringLiteral("rotation"); }
148
+ };
149
+
150
+ #if QT_CONFIG(quick_shadereffect)
151
+ class QQuickUniformAnimatorPrivate;
152
+ class Q_QUICK_EXPORT QQuickUniformAnimator : public QQuickAnimator
153
+ {
154
+ Q_OBJECT
155
+ Q_DECLARE_PRIVATE(QQuickUniformAnimator)
156
+ Q_PROPERTY(QString uniform READ uniform WRITE setUniform NOTIFY uniformChanged)
157
+ QML_NAMED_ELEMENT(UniformAnimator)
158
+ QML_ADDED_IN_VERSION(2, 2)
159
+
160
+ public:
161
+ QQuickUniformAnimator(QObject *parent = nullptr);
162
+
163
+ QString uniform() const;
164
+ void setUniform(const QString &);
165
+
166
+ Q_SIGNALS:
167
+ void uniformChanged(const QString &);
168
+
169
+ protected:
170
+ QQuickAnimatorJob *createJob() const override;
171
+ QString propertyName() const override;
172
+ };
173
+ #endif
174
+
175
+ QT_END_NAMESPACE
176
+
177
+ #endif // QQUICKANIMATOR_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p_p.h ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKANIMATOR_P_P_H
5
+ #define QQUICKANIMATOR_P_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 "qquickanimator_p.h"
19
+ #include "qquickanimation_p_p.h"
20
+ #include <QtQuick/qquickitem.h>
21
+
22
+ #include <QtCore/qpointer.h>
23
+
24
+ QT_BEGIN_NAMESPACE
25
+
26
+ class QQuickAnimatorJob;
27
+
28
+ class QQuickAnimatorPrivate : public QQuickAbstractAnimationPrivate
29
+ {
30
+ Q_DECLARE_PUBLIC(QQuickAnimator)
31
+ public:
32
+ QQuickAnimatorPrivate()
33
+ : target(0)
34
+ , duration(250)
35
+ , from(0)
36
+ , to(0)
37
+ , fromIsDefined(false)
38
+ , toIsDefined(false)
39
+ {
40
+ }
41
+
42
+ QPointer<QQuickItem> target;
43
+ int duration;
44
+ QEasingCurve easing;
45
+ qreal from;
46
+ qreal to;
47
+
48
+ uint fromIsDefined : 1;
49
+ uint toIsDefined : 1;
50
+
51
+ void apply(QQuickAnimatorJob *job, const QString &propertyName, QQuickStateActions &actions, QQmlProperties &modified, QObject *defaultTarget);
52
+ };
53
+
54
+ class QQuickRotationAnimatorPrivate : public QQuickAnimatorPrivate
55
+ {
56
+ public:
57
+ QQuickRotationAnimatorPrivate()
58
+ : direction(QQuickRotationAnimator::Numerical)
59
+ {
60
+ }
61
+ QQuickRotationAnimator::RotationDirection direction;
62
+ };
63
+
64
+ #if QT_CONFIG(quick_shadereffect)
65
+ class QQuickUniformAnimatorPrivate : public QQuickAnimatorPrivate
66
+ {
67
+ public:
68
+ QString uniform;
69
+ };
70
+ #endif
71
+
72
+ QT_END_NAMESPACE
73
+
74
+ #endif // QQUICKANIMATOR_P_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorcontroller_p.h ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2016 The Qt Company Ltd.
2
+ // Copyright (C) 2016 Gunnar Sletta <gunnar@sletta.org>
3
+ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
+
5
+ #ifndef QQUICKANIMATORCONTROLLER_P_H
6
+ #define QQUICKANIMATORCONTROLLER_P_H
7
+
8
+ //
9
+ // W A R N I N G
10
+ // -------------
11
+ //
12
+ // This file is not part of the Qt API. It exists purely as an
13
+ // implementation detail. This header file may change from version to
14
+ // version without notice, or even be removed.
15
+ //
16
+ // We mean it.
17
+ //
18
+
19
+ #include "qquickanimatorjob_p.h"
20
+ #include <QtQuick/qsgnode.h>
21
+ #include <QtQuick/qquickitem.h>
22
+
23
+ #include <QtCore/qmutex.h>
24
+ #include <QtCore/qthread.h>
25
+
26
+ QT_BEGIN_NAMESPACE
27
+
28
+ class Q_AUTOTEST_EXPORT QQuickAnimatorController : public QObject, public QAnimationJobChangeListener
29
+ {
30
+ Q_OBJECT
31
+
32
+ public:
33
+ QQuickAnimatorController(QQuickWindow *window);
34
+ ~QQuickAnimatorController();
35
+
36
+ void advance();
37
+ void beforeNodeSync();
38
+ void afterNodeSync();
39
+
40
+ void animationFinished(QAbstractAnimationJob *job) override;
41
+ void animationStateChanged(QAbstractAnimationJob *job, QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override;
42
+
43
+ void requestSync();
44
+
45
+ // These are called from the GUI thread (the proxy)
46
+ void start(const QSharedPointer<QAbstractAnimationJob> &job);
47
+ void cancel(const QSharedPointer<QAbstractAnimationJob> &job);
48
+ bool isPendingStart(const QSharedPointer<QAbstractAnimationJob> &job) const { return m_rootsPendingStart.contains(job); }
49
+
50
+ void lock() { m_mutex.lock(); }
51
+ void unlock() { m_mutex.unlock(); }
52
+
53
+ void windowNodesDestroyed();
54
+
55
+ QQuickWindow *window() const { return m_window; }
56
+
57
+ private:
58
+ friend class tst_Animators;
59
+
60
+ void start_helper(QAbstractAnimationJob *job);
61
+ void cancel_helper(QAbstractAnimationJob *job);
62
+
63
+ QSet<QQuickAnimatorJob * > m_runningAnimators;
64
+ QHash<QAbstractAnimationJob *, QSharedPointer<QAbstractAnimationJob> > m_animationRoots;
65
+ QSet<QSharedPointer<QAbstractAnimationJob> > m_rootsPendingStop;
66
+ QSet<QSharedPointer<QAbstractAnimationJob> > m_rootsPendingStart;
67
+
68
+ QQuickWindow *m_window;
69
+ QMutex m_mutex;
70
+ };
71
+
72
+
73
+
74
+ QT_END_NAMESPACE
75
+
76
+ #endif // QQUICKANIMATORCONTROLLER_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorjob_p.h ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2016 The Qt Company Ltd.
2
+ // Copyright (C) 2016 Gunnar Sletta <gunnar@sletta.org>
3
+ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
+
5
+ #ifndef QQUICKANIMATORJOB_P_H
6
+ #define QQUICKANIMATORJOB_P_H
7
+
8
+ //
9
+ // W A R N I N G
10
+ // -------------
11
+ //
12
+ // This file is not part of the Qt API. It exists purely as an
13
+ // implementation detail. This header file may change from version to
14
+ // version without notice, or even be removed.
15
+ //
16
+ // We mean it.
17
+ //
18
+
19
+ #include <private/qabstractanimationjob_p.h>
20
+ #include <private/qquickanimator_p.h>
21
+ #include <private/qtquickglobal_p.h>
22
+
23
+ #include <QtQuick/qquickitem.h>
24
+
25
+ #include <QtCore/qeasingcurve.h>
26
+ #include <QtCore/qpointer.h>
27
+
28
+ QT_BEGIN_NAMESPACE
29
+
30
+ class QQuickAnimator;
31
+ class QQuickWindow;
32
+ class QQuickItem;
33
+ class QQuickAbstractAnimation;
34
+
35
+ class QQuickAnimatorController;
36
+
37
+ class QSGOpacityNode;
38
+
39
+ class Q_QUICK_EXPORT QQuickAnimatorProxyJob : public QObject, public QAbstractAnimationJob
40
+ {
41
+ Q_OBJECT
42
+
43
+ public:
44
+ QQuickAnimatorProxyJob(QAbstractAnimationJob *job, QQuickAbstractAnimation *animation);
45
+ ~QQuickAnimatorProxyJob();
46
+
47
+ int duration() const override { return m_duration; }
48
+
49
+ const QSharedPointer<QAbstractAnimationJob> &job() const { return m_job; }
50
+
51
+ protected:
52
+ void updateCurrentTime(int) override;
53
+ void updateLoopCount(int) override;
54
+ void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override;
55
+ void debugAnimation(QDebug d) const override;
56
+
57
+ public Q_SLOTS:
58
+ void windowChanged(QQuickWindow *window);
59
+ void sceneGraphInitialized();
60
+
61
+ private:
62
+ void syncBackCurrentValues();
63
+ void readyToAnimate();
64
+ void setWindow(QQuickWindow *window);
65
+ static QObject *findAnimationContext(QQuickAbstractAnimation *);
66
+
67
+ QPointer<QQuickAnimatorController> m_controller;
68
+ QSharedPointer<QAbstractAnimationJob> m_job;
69
+ int m_duration;
70
+
71
+ enum InternalState {
72
+ State_Starting, // Used when it should be running, but no we're still missing the controller.
73
+ State_Running,
74
+ State_Paused,
75
+ State_Stopped
76
+ };
77
+
78
+ InternalState m_internalState;
79
+ };
80
+
81
+ class Q_QUICK_EXPORT QQuickAnimatorJob : public QAbstractAnimationJob
82
+ {
83
+ public:
84
+ virtual void setTarget(QQuickItem *target);
85
+ QQuickItem *target() const { return m_target; }
86
+
87
+ void setFrom(qreal from) {
88
+ m_from = from;
89
+ boundValue();
90
+ }
91
+ qreal from() const { return m_from; }
92
+
93
+ void setTo(qreal to) {
94
+ m_to = to;
95
+ boundValue();
96
+ }
97
+ qreal to() const { return m_to; }
98
+
99
+ void setDuration(int duration) { m_duration = duration; }
100
+ int duration() const override { return m_duration; }
101
+
102
+ QEasingCurve easingCurve() const { return m_easing; }
103
+ void setEasingCurve(const QEasingCurve &curve) { m_easing = curve; }
104
+
105
+ // Initialize is called on the GUI thread just before it is started
106
+ // and taken over on the render thread.
107
+ virtual void initialize(QQuickAnimatorController *controller);
108
+
109
+ // Called on the render thread during SG shutdown.
110
+ virtual void invalidate() = 0;
111
+
112
+ // Called on the GUI thread after a complete render thread animation job
113
+ // has been completed to write back a given animator's result to the
114
+ // source item.
115
+ virtual void writeBack() = 0;
116
+
117
+ // Called before the SG sync on the render thread. The GUI thread is
118
+ // locked during this call.
119
+ virtual void preSync() { }
120
+
121
+ // Called after the SG sync on the render thread. The GUI thread is
122
+ // locked during this call.
123
+ virtual void postSync() { }
124
+
125
+ // Called after animations have ticked on the render thread. No locks are
126
+ // held at this time, so synchronization needs to be taken into account
127
+ // if applicable.
128
+ virtual void commit() { }
129
+
130
+ bool isTransform() const { return m_isTransform; }
131
+ bool isUniform() const { return m_isUniform; }
132
+
133
+ qreal value() const;
134
+
135
+ QQuickAnimatorController *controller() const { return m_controller; }
136
+
137
+ protected:
138
+ QQuickAnimatorJob();
139
+ void debugAnimation(QDebug d) const override;
140
+
141
+ qreal progress(int time) const;
142
+ void boundValue();
143
+
144
+ QPointer<QQuickItem> m_target;
145
+ QQuickAnimatorController *m_controller;
146
+
147
+ qreal m_from;
148
+ qreal m_to;
149
+ qreal m_value;
150
+
151
+ QEasingCurve m_easing;
152
+
153
+ int m_duration;
154
+
155
+ uint m_isTransform : 1;
156
+ uint m_isUniform : 1;
157
+ };
158
+
159
+ class QQuickTransformAnimatorJob : public QQuickAnimatorJob
160
+ {
161
+ public:
162
+
163
+ struct Helper
164
+ {
165
+ Helper()
166
+ : ref(1)
167
+ , node(nullptr)
168
+ , ox(0)
169
+ , oy(0)
170
+ , dx(0)
171
+ , dy(0)
172
+ , scale(1)
173
+ , rotation(0)
174
+ , wasSynced(false)
175
+ , wasChanged(false)
176
+ {
177
+ }
178
+
179
+ void sync();
180
+ void commit();
181
+
182
+ int ref;
183
+ QQuickItem *item;
184
+ QSGTransformNode *node;
185
+
186
+ // Origin
187
+ float ox;
188
+ float oy;
189
+
190
+ float dx;
191
+ float dy;
192
+ float scale;
193
+ float rotation;
194
+
195
+ uint wasSynced : 1;
196
+ uint wasChanged : 1;
197
+ };
198
+
199
+ ~QQuickTransformAnimatorJob();
200
+
201
+ void commit() override;
202
+ void preSync() override;
203
+
204
+ void setTarget(QQuickItem *item) override;
205
+
206
+ protected:
207
+ QQuickTransformAnimatorJob();
208
+ void invalidate() override;
209
+
210
+ Helper *m_helper;
211
+ };
212
+
213
+ class Q_QUICK_EXPORT QQuickScaleAnimatorJob : public QQuickTransformAnimatorJob
214
+ {
215
+ public:
216
+ void updateCurrentTime(int time) override;
217
+ void writeBack() override;
218
+ };
219
+
220
+ class Q_QUICK_EXPORT QQuickXAnimatorJob : public QQuickTransformAnimatorJob
221
+ {
222
+ public:
223
+ void updateCurrentTime(int time) override;
224
+ void writeBack() override;
225
+ };
226
+
227
+ class Q_QUICK_EXPORT QQuickYAnimatorJob : public QQuickTransformAnimatorJob
228
+ {
229
+ public:
230
+ void updateCurrentTime(int time) override;
231
+ void writeBack() override;
232
+ };
233
+
234
+ class Q_QUICK_EXPORT QQuickRotationAnimatorJob : public QQuickTransformAnimatorJob
235
+ {
236
+ public:
237
+ QQuickRotationAnimatorJob();
238
+
239
+ void updateCurrentTime(int time) override;
240
+ void writeBack() override;
241
+
242
+ void setDirection(QQuickRotationAnimator::RotationDirection direction) { m_direction = direction; }
243
+ QQuickRotationAnimator::RotationDirection direction() const { return m_direction; }
244
+
245
+ private:
246
+ QQuickRotationAnimator::RotationDirection m_direction;
247
+ };
248
+
249
+ class Q_QUICK_EXPORT QQuickOpacityAnimatorJob : public QQuickAnimatorJob
250
+ {
251
+ public:
252
+ QQuickOpacityAnimatorJob();
253
+
254
+ void invalidate() override;
255
+ void updateCurrentTime(int time) override;
256
+ void writeBack() override;
257
+ void postSync() override;
258
+
259
+ private:
260
+ QSGOpacityNode *m_opacityNode;
261
+ };
262
+
263
+ #if QT_CONFIG(quick_shadereffect)
264
+ class QQuickShaderEffect;
265
+
266
+ class Q_QUICK_EXPORT QQuickUniformAnimatorJob : public QQuickAnimatorJob
267
+ {
268
+ public:
269
+ QQuickUniformAnimatorJob();
270
+
271
+ void setTarget(QQuickItem *target) override;
272
+
273
+ void setUniform(const QByteArray &uniform) { m_uniform = uniform; }
274
+ QByteArray uniform() const { return m_uniform; }
275
+
276
+ void updateCurrentTime(int time) override;
277
+ void writeBack() override;
278
+ void postSync() override;
279
+
280
+ void invalidate() override;
281
+
282
+ private:
283
+ QByteArray m_uniform;
284
+ QPointer<QQuickShaderEffect> m_effect;
285
+ };
286
+ #endif
287
+
288
+ QT_END_NAMESPACE
289
+
290
+ #endif // QQUICKANIMATORJOB_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickapplication_p.h ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKAPPLICATION_P_H
5
+ #define QQUICKAPPLICATION_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 <QtQuick/private/qtquickglobal_p.h>
19
+ #include <QtQuick/private/qquickscreen_p.h>
20
+
21
+ #include <QtQml/qqml.h>
22
+ #include <QtQml/private/qqmlglobal_p.h>
23
+
24
+ #include <QtGui/qfont.h>
25
+ #include <QtGui/qstylehints.h>
26
+
27
+ #include <QtCore/qobject.h>
28
+
29
+ QT_BEGIN_NAMESPACE
30
+
31
+ class Q_QUICK_EXPORT QQuickApplication : public QQmlApplication
32
+ {
33
+ Q_OBJECT
34
+ Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL) // deprecated, use 'state' instead
35
+ Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged FINAL)
36
+ Q_PROPERTY(bool supportsMultipleWindows READ supportsMultipleWindows CONSTANT FINAL)
37
+ Q_PROPERTY(Qt::ApplicationState state READ state NOTIFY stateChanged FINAL)
38
+ Q_PROPERTY(QFont font READ font CONSTANT FINAL)
39
+ Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged FINAL)
40
+ Q_PROPERTY(QQmlListProperty<QQuickScreenInfo> screens READ screens NOTIFY screensChanged FINAL)
41
+ Q_PROPERTY(QStyleHints *styleHints READ styleHints CONSTANT FINAL)
42
+
43
+ QML_NAMED_ELEMENT(Application)
44
+ QML_SINGLETON
45
+ QML_ADDED_IN_VERSION(2, 0)
46
+
47
+ public:
48
+ explicit QQuickApplication(QObject *parent = nullptr);
49
+ virtual ~QQuickApplication();
50
+ bool active() const;
51
+ Qt::LayoutDirection layoutDirection() const;
52
+ bool supportsMultipleWindows() const;
53
+ Qt::ApplicationState state() const;
54
+ QFont font() const;
55
+ QQmlListProperty<QQuickScreenInfo> screens();
56
+ QString displayName() const;
57
+ void setDisplayName(const QString &displayName);
58
+ QStyleHints *styleHints();
59
+
60
+ Q_SIGNALS:
61
+ void activeChanged();
62
+ void displayNameChanged();
63
+ void layoutDirectionChanged();
64
+ void stateChanged(Qt::ApplicationState state);
65
+ void screensChanged();
66
+
67
+ private Q_SLOTS:
68
+ void updateScreens();
69
+
70
+ private:
71
+ Q_DISABLE_COPY(QQuickApplication)
72
+ QVector<QQuickScreenInfo *> m_screens;
73
+ };
74
+
75
+ QT_END_NAMESPACE
76
+
77
+ #endif // QQUICKAPPLICATION_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickbehavior_p.h ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKBEHAVIOR_H
5
+ #define QQUICKBEHAVIOR_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
+ #include <private/qqmlpropertyvalueinterceptor_p.h>
21
+ #include <private/qqmlengine_p.h>
22
+ #include <qqml.h>
23
+ #include <private/qqmlfinalizer_p.h>
24
+
25
+ QT_BEGIN_NAMESPACE
26
+
27
+ class QQuickAbstractAnimation;
28
+ class QQuickBehaviorPrivate;
29
+ class Q_QUICK_EXPORT QQuickBehavior : public QObject, public QQmlPropertyValueInterceptor, public QQmlFinalizerHook
30
+ {
31
+ Q_OBJECT
32
+ Q_INTERFACES(QQmlFinalizerHook)
33
+ Q_DECLARE_PRIVATE(QQuickBehavior)
34
+
35
+ Q_INTERFACES(QQmlPropertyValueInterceptor)
36
+ Q_CLASSINFO("DefaultProperty", "animation")
37
+ Q_PROPERTY(QQuickAbstractAnimation *animation READ animation WRITE setAnimation)
38
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
39
+ Q_PROPERTY(QVariant targetValue READ targetValue NOTIFY targetValueChanged REVISION(2, 13))
40
+ Q_PROPERTY(QQmlProperty targetProperty READ targetProperty NOTIFY targetPropertyChanged REVISION(2, 15))
41
+ Q_CLASSINFO("DeferredPropertyNames", "animation")
42
+ QML_NAMED_ELEMENT(Behavior)
43
+ QML_ADDED_IN_VERSION(2, 0)
44
+
45
+ public:
46
+ QQuickBehavior(QObject *parent=nullptr);
47
+ ~QQuickBehavior();
48
+
49
+ void setTarget(const QQmlProperty &) override;
50
+ void write(const QVariant &value) override;
51
+ bool bindable(QUntypedBindable *untypedBindable, QUntypedBindable target) override;
52
+
53
+ QQuickAbstractAnimation *animation();
54
+ void setAnimation(QQuickAbstractAnimation *);
55
+
56
+ bool enabled() const;
57
+ void setEnabled(bool enabled);
58
+
59
+ QVariant targetValue() const;
60
+
61
+ QQmlProperty targetProperty() const;
62
+
63
+ void componentFinalized() override;
64
+
65
+ Q_SIGNALS:
66
+ void enabledChanged();
67
+ void targetValueChanged();
68
+ void targetPropertyChanged();
69
+ };
70
+
71
+ QT_END_NAMESPACE
72
+
73
+ #endif // QQUICKBEHAVIOR_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p.h ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKBORDERIMAGE_P_H
5
+ #define QQUICKBORDERIMAGE_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 "qquickimagebase_p.h"
19
+
20
+ QT_BEGIN_NAMESPACE
21
+
22
+ class QQuickScaleGrid;
23
+ class QQuickGridScaledImage;
24
+ class QQuickBorderImagePrivate;
25
+ class Q_QUICK_EXPORT QQuickBorderImage : public QQuickImageBase
26
+ {
27
+ Q_OBJECT
28
+
29
+ Q_PROPERTY(QQuickScaleGrid *border READ border CONSTANT)
30
+ Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged)
31
+ Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged)
32
+ // read-only for BorderImage
33
+ Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged)
34
+ QML_NAMED_ELEMENT(BorderImage)
35
+ QML_ADDED_IN_VERSION(2, 0)
36
+
37
+ public:
38
+ QQuickBorderImage(QQuickItem *parent=nullptr);
39
+ ~QQuickBorderImage();
40
+
41
+ QQuickScaleGrid *border();
42
+
43
+ enum TileMode { Stretch = Qt::StretchTile, Repeat = Qt::RepeatTile, Round = Qt::RoundTile };
44
+ Q_ENUM(TileMode)
45
+
46
+ TileMode horizontalTileMode() const;
47
+ void setHorizontalTileMode(TileMode);
48
+
49
+ TileMode verticalTileMode() const;
50
+ void setVerticalTileMode(TileMode);
51
+
52
+ void setSource(const QUrl &url) override;
53
+
54
+ Q_SIGNALS:
55
+ void horizontalTileModeChanged();
56
+ void verticalTileModeChanged();
57
+ void sourceSizeChanged();
58
+
59
+ protected:
60
+ void load() override;
61
+ void pixmapChange() override;
62
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
63
+
64
+ private:
65
+ void setGridScaledImage(const QQuickGridScaledImage& sci);
66
+
67
+ private Q_SLOTS:
68
+ void doUpdate();
69
+ void requestFinished() override;
70
+ #if QT_CONFIG(qml_network)
71
+ void sciRequestFinished();
72
+ #endif
73
+
74
+ private:
75
+ Q_DISABLE_COPY(QQuickBorderImage)
76
+ Q_DECLARE_PRIVATE(QQuickBorderImage)
77
+ };
78
+
79
+ QT_END_NAMESPACE
80
+
81
+ #endif // QQUICKBORDERIMAGE_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p_p.h ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKBORDERIMAGE_P_P_H
5
+ #define QQUICKBORDERIMAGE_P_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 "qquickimagebase_p_p.h"
19
+ #include "qquickscalegrid_p_p.h"
20
+
21
+ #include <private/qqmlglobal_p.h>
22
+
23
+ QT_BEGIN_NAMESPACE
24
+
25
+ #if QT_CONFIG(qml_network)
26
+ class QNetworkReply;
27
+ #endif
28
+ class QQuickBorderImagePrivate : public QQuickImageBasePrivate
29
+ {
30
+ Q_DECLARE_PUBLIC(QQuickBorderImage)
31
+
32
+ public:
33
+ QQuickBorderImagePrivate()
34
+ {
35
+ }
36
+
37
+ ~QQuickBorderImagePrivate()
38
+ {
39
+ }
40
+
41
+ QQuickScaleGrid *getScaleGrid()
42
+ {
43
+ Q_Q(QQuickBorderImage);
44
+ if (!border) {
45
+ border = new QQuickScaleGrid(q);
46
+ qmlobject_connect(border, QQuickScaleGrid, SIGNAL(borderChanged()),
47
+ q, QQuickBorderImage, SLOT(doUpdate()));
48
+ }
49
+ return border;
50
+ }
51
+
52
+ static void calculateRects(const QQuickScaleGrid *border,
53
+ const QSize &sourceSize,
54
+ const QSizeF &targetSize,
55
+ int horizontalTileMode,
56
+ int verticalTileMode,
57
+ qreal devicePixelRatio,
58
+ QRectF *targetRect,
59
+ QRectF *innerTargetRect,
60
+ QRectF *innerSourceRect,
61
+ QRectF *subSourceRect);
62
+
63
+ QUrl sciurl;
64
+ QQuickScaleGrid *border = nullptr;
65
+ QQuickBorderImage::TileMode horizontalTileMode = QQuickBorderImage::Stretch;
66
+ QQuickBorderImage::TileMode verticalTileMode = QQuickBorderImage::Stretch;
67
+ bool pixmapChanged = false;
68
+
69
+ #if QT_CONFIG(qml_network)
70
+ QNetworkReply *sciReply = nullptr;
71
+ #endif
72
+ };
73
+
74
+ QT_END_NAMESPACE
75
+
76
+ #endif // QQUICKBORDERIMAGE_P_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvascontext_p.h ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKCANVASCONTEXT_P_H
5
+ #define QQUICKCANVASCONTEXT_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_canvas);
21
+
22
+ #include <QtQuick/qquickitem.h>
23
+ #include <QtQml/private/qv4staticvalue_p.h>
24
+
25
+ QT_BEGIN_NAMESPACE
26
+
27
+ namespace QV4 {
28
+ struct ExecutionEngine;
29
+ }
30
+
31
+ class QQuickCanvasItem;
32
+ class QSGLayer;
33
+
34
+ class QQuickCanvasContext : public QObject
35
+ {
36
+ Q_OBJECT
37
+
38
+ public:
39
+ QQuickCanvasContext(QObject *parent = nullptr);
40
+ ~QQuickCanvasContext();
41
+
42
+ virtual QStringList contextNames() const = 0;
43
+
44
+ // Init (ignore options if necessary)
45
+ virtual void init(QQuickCanvasItem *canvasItem, const QVariantMap &args) = 0;
46
+
47
+ virtual void prepare(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth, bool antialiasing);
48
+ virtual void flush();
49
+
50
+ virtual QV4::ExecutionEngine *v4Engine() const = 0;
51
+ virtual void setV4Engine(QV4::ExecutionEngine *engine) = 0;
52
+ virtual QV4::ReturnedValue v4value() const = 0;
53
+
54
+ virtual QImage toImage(const QRectF& bounds) = 0;
55
+
56
+ Q_SIGNALS:
57
+ void textureChanged();
58
+ };
59
+
60
+ QT_END_NAMESPACE
61
+
62
+ #endif //QQUICKCANVASCONTEXT_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvasitem_p.h ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKCANVASITEM_P_H
5
+ #define QQUICKCANVASITEM_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_canvas);
21
+
22
+ #include <QtQuick/qquickitem.h>
23
+ #include <private/qqmlrefcount_p.h>
24
+ #include <QtCore/QThread>
25
+ #include <QtCore/qmutex.h>
26
+ #include <QtGui/QImage>
27
+
28
+ QT_BEGIN_NAMESPACE
29
+
30
+ class QQuickCanvasContext;
31
+
32
+ class QQuickCanvasItemPrivate;
33
+ class QQuickPixmap;
34
+
35
+ class QQuickCanvasPixmap final : public QQmlRefCounted<QQuickCanvasPixmap>
36
+ {
37
+ public:
38
+ QQuickCanvasPixmap(const QImage& image);
39
+ QQuickCanvasPixmap(QQuickPixmap *pixmap);
40
+ ~QQuickCanvasPixmap();
41
+
42
+ QImage image();
43
+
44
+ qreal width() const;
45
+ qreal height() const;
46
+ bool isValid() const;
47
+ QQuickPixmap *pixmap() const { return m_pixmap;}
48
+
49
+ private:
50
+ QQuickPixmap *m_pixmap;
51
+ QImage m_image;
52
+ };
53
+
54
+ class QQuickCanvasItem : public QQuickItem
55
+ {
56
+ Q_OBJECT
57
+
58
+ Q_PROPERTY(bool available READ isAvailable NOTIFY availableChanged)
59
+ Q_PROPERTY(QString contextType READ contextType WRITE setContextType NOTIFY contextTypeChanged)
60
+ Q_PROPERTY(QJSValue context READ context NOTIFY contextChanged)
61
+ Q_PROPERTY(QSizeF canvasSize READ canvasSize WRITE setCanvasSize NOTIFY canvasSizeChanged)
62
+ Q_PROPERTY(QSize tileSize READ tileSize WRITE setTileSize NOTIFY tileSizeChanged)
63
+ Q_PROPERTY(QRectF canvasWindow READ canvasWindow WRITE setCanvasWindow NOTIFY canvasWindowChanged)
64
+ Q_PROPERTY(RenderTarget renderTarget READ renderTarget WRITE setRenderTarget NOTIFY renderTargetChanged)
65
+ Q_PROPERTY(RenderStrategy renderStrategy READ renderStrategy WRITE setRenderStrategy NOTIFY renderStrategyChanged)
66
+ QML_NAMED_ELEMENT(Canvas)
67
+ QML_ADDED_IN_VERSION(2, 0)
68
+
69
+ public:
70
+ enum RenderTarget {
71
+ Image,
72
+ FramebufferObject
73
+ };
74
+ Q_ENUM(RenderTarget)
75
+
76
+ enum RenderStrategy {
77
+ Immediate,
78
+ Threaded,
79
+ Cooperative
80
+ };
81
+ Q_ENUM(RenderStrategy)
82
+
83
+ QQuickCanvasItem(QQuickItem *parent = nullptr);
84
+ ~QQuickCanvasItem();
85
+
86
+ bool isAvailable() const;
87
+
88
+ QString contextType() const;
89
+ void setContextType(const QString &contextType);
90
+
91
+ QJSValue context() const;
92
+
93
+ QSizeF canvasSize() const;
94
+ void setCanvasSize(const QSizeF &);
95
+
96
+ QSize tileSize() const;
97
+ void setTileSize(const QSize &);
98
+
99
+ QRectF canvasWindow() const;
100
+ void setCanvasWindow(const QRectF& rect);
101
+
102
+ RenderTarget renderTarget() const;
103
+ void setRenderTarget(RenderTarget target);
104
+
105
+ RenderStrategy renderStrategy() const;
106
+ void setRenderStrategy(RenderStrategy strategy);
107
+
108
+ QQuickCanvasContext *rawContext() const;
109
+
110
+ QImage toImage(const QRectF& rect = QRectF()) const;
111
+
112
+ Q_INVOKABLE void getContext(QQmlV4FunctionPtr args);
113
+
114
+ Q_INVOKABLE void requestAnimationFrame(QQmlV4FunctionPtr args);
115
+ Q_INVOKABLE void cancelRequestAnimationFrame(QQmlV4FunctionPtr args);
116
+
117
+ Q_INVOKABLE void requestPaint();
118
+ Q_INVOKABLE void markDirty(const QRectF& dirtyRect = QRectF());
119
+
120
+ Q_INVOKABLE bool save(const QString &filename, const QSizeF &imageSize = QSizeF()) const;
121
+ Q_INVOKABLE QString toDataURL(const QString& type = QLatin1String("image/png")) const;
122
+ QQmlRefPointer<QQuickCanvasPixmap> loadedPixmap(const QUrl& url, QSizeF sourceSize = QSizeF());
123
+
124
+ bool isTextureProvider() const override;
125
+ QSGTextureProvider *textureProvider() const override;
126
+
127
+ Q_SIGNALS:
128
+ void paint(const QRect &region);
129
+ void painted();
130
+ void availableChanged();
131
+ void contextTypeChanged();
132
+ void contextChanged();
133
+ void canvasSizeChanged();
134
+ void tileSizeChanged();
135
+ void canvasWindowChanged();
136
+ void renderTargetChanged();
137
+ void renderStrategyChanged();
138
+ void imageLoaded();
139
+
140
+ public Q_SLOTS:
141
+ void loadImage(const QUrl& url, QSizeF sourceSize = QSizeF());
142
+ void unloadImage(const QUrl& url);
143
+ bool isImageLoaded(const QUrl& url) const;
144
+ bool isImageLoading(const QUrl& url) const;
145
+ bool isImageError(const QUrl& url) const;
146
+
147
+ private Q_SLOTS:
148
+ void sceneGraphInitialized();
149
+ void checkAnimationCallbacks();
150
+ void invalidateSceneGraph();
151
+ void schedulePolish();
152
+
153
+ protected:
154
+ void componentComplete() override;
155
+ void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) override;
156
+ void updatePolish() override;
157
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
158
+ void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
159
+ void releaseResources() override;
160
+ bool event(QEvent *event) override;
161
+ private:
162
+ Q_DECLARE_PRIVATE(QQuickCanvasItem)
163
+ Q_INVOKABLE void delayedCreate();
164
+ bool createContext(const QString &contextType);
165
+ void initializeContext(QQuickCanvasContext *context, const QVariantMap &args = QVariantMap());
166
+ static QRect tiledRect(const QRectF &window, const QSize &tileSize);
167
+ bool isPaintConnected();
168
+ };
169
+
170
+ class QQuickContext2DRenderThread : public QThread
171
+ {
172
+ Q_OBJECT
173
+ public:
174
+ QQuickContext2DRenderThread(QQmlEngine *eng);
175
+ ~QQuickContext2DRenderThread();
176
+
177
+ static QQuickContext2DRenderThread *instance(QQmlEngine *engine);
178
+
179
+ private:
180
+ QQmlEngine *m_engine;
181
+ QObject *m_eventLoopQuitHack;
182
+ static QHash<QQmlEngine *,QQuickContext2DRenderThread*> renderThreads;
183
+ static QMutex renderThreadsMutex;
184
+ };
185
+
186
+ QT_END_NAMESPACE
187
+
188
+ #endif //QQUICKCANVASITEM_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickclipnode_p.h ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKCLIPNODE_P_H
5
+ #define QQUICKCLIPNODE_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
+ #include <QtQuick/qsgnode.h>
20
+
21
+ QT_BEGIN_NAMESPACE
22
+
23
+ class Q_QUICK_EXPORT QQuickDefaultClipNode : public QSGClipNode
24
+ {
25
+ public:
26
+ QQuickDefaultClipNode(const QRectF &);
27
+
28
+ void setRect(const QRectF &);
29
+ QRectF rect() const { return m_rect; }
30
+
31
+ void setRadius(qreal radius);
32
+ qreal radius() const { return m_radius; }
33
+
34
+ virtual void update();
35
+
36
+ private:
37
+ void updateGeometry();
38
+ QRectF m_rect;
39
+ qreal m_radius;
40
+
41
+ uint m_dirty_geometry : 1;
42
+ uint m_reserved : 31;
43
+
44
+ QSGGeometry m_geometry;
45
+ };
46
+
47
+ QT_END_NAMESPACE
48
+
49
+ #endif // QQUICKCLIPNODE_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcolorgroup_p.h ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2020 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
+ #ifndef QQUICKCOLORGROUP_H
4
+ #define QQUICKCOLORGROUP_H
5
+
6
+ //
7
+ // W A R N I N G
8
+ // -------------
9
+ //
10
+ // This file is not part of the Qt API. It exists for the convenience
11
+ // of QQuickColorGroup. This header file may change from version to
12
+ // version without notice, or even be removed.
13
+ //
14
+ // We mean it.
15
+ //
16
+
17
+ #include <QtGui/qpalette.h>
18
+
19
+ #include <QtCore/private/qobject_p.h>
20
+
21
+ #include <QtQuick/private/qtquickglobal_p.h>
22
+
23
+ #include <QtQml/qqml.h>
24
+
25
+ #include <QtCore/qpointer.h>
26
+
27
+ QT_BEGIN_NAMESPACE
28
+
29
+ class QQuickPalette;
30
+ class QQuickPaletteColorProvider;
31
+
32
+ class Q_QUICK_EXPORT QQuickColorGroup : public QObject
33
+ {
34
+ Q_OBJECT
35
+
36
+ Q_PROPERTY(QColor alternateBase READ alternateBase WRITE setAlternateBase RESET resetAlternateBase NOTIFY alternateBaseChanged FINAL)
37
+ Q_PROPERTY(QColor base READ base WRITE setBase RESET resetBase NOTIFY baseChanged FINAL)
38
+ Q_PROPERTY(QColor brightText READ brightText WRITE setBrightText RESET resetBrightText NOTIFY brightTextChanged FINAL)
39
+ Q_PROPERTY(QColor button READ button WRITE setButton RESET resetButton NOTIFY buttonChanged FINAL)
40
+ Q_PROPERTY(QColor buttonText READ buttonText WRITE setButtonText RESET resetButtonText NOTIFY buttonTextChanged FINAL)
41
+ Q_PROPERTY(QColor dark READ dark WRITE setDark RESET resetDark NOTIFY darkChanged FINAL)
42
+ Q_PROPERTY(QColor highlight READ highlight WRITE setHighlight RESET resetHighlight NOTIFY highlightChanged FINAL)
43
+ Q_PROPERTY(QColor highlightedText READ highlightedText WRITE setHighlightedText RESET resetHighlightedText NOTIFY highlightedTextChanged FINAL)
44
+ Q_PROPERTY(QColor light READ light WRITE setLight RESET resetLight NOTIFY lightChanged FINAL)
45
+ Q_PROPERTY(QColor link READ link WRITE setLink RESET resetLink NOTIFY linkChanged FINAL)
46
+ Q_PROPERTY(QColor linkVisited READ linkVisited WRITE setLinkVisited RESET resetLinkVisited NOTIFY linkVisitedChanged FINAL)
47
+ Q_PROPERTY(QColor mid READ mid WRITE setMid RESET resetMid NOTIFY midChanged FINAL)
48
+ Q_PROPERTY(QColor midlight READ midlight WRITE setMidlight RESET resetMidlight NOTIFY midlightChanged FINAL)
49
+ Q_PROPERTY(QColor shadow READ shadow WRITE setShadow RESET resetShadow NOTIFY shadowChanged FINAL)
50
+ Q_PROPERTY(QColor text READ text WRITE setText RESET resetText NOTIFY textChanged FINAL)
51
+ Q_PROPERTY(QColor toolTipBase READ toolTipBase WRITE setToolTipBase RESET resetToolTipBase NOTIFY toolTipBaseChanged FINAL)
52
+ Q_PROPERTY(QColor toolTipText READ toolTipText WRITE setToolTipText RESET resetToolTipText NOTIFY toolTipTextChanged FINAL)
53
+ Q_PROPERTY(QColor window READ window WRITE setWindow RESET resetWindow NOTIFY windowChanged FINAL)
54
+ Q_PROPERTY(QColor windowText READ windowText WRITE setWindowText RESET resetWindowText NOTIFY windowTextChanged FINAL)
55
+ Q_PROPERTY(QColor placeholderText READ placeholderText WRITE setPlaceholderText
56
+ RESET resetPlaceholderText NOTIFY placeholderTextChanged REVISION(6, 2) FINAL)
57
+ Q_PROPERTY(QColor accent READ accent WRITE setAccent RESET resetAccent NOTIFY accentChanged REVISION(6, 6) FINAL)
58
+
59
+ QML_NAMED_ELEMENT(ColorGroup)
60
+ QML_ADDED_IN_VERSION(6, 0)
61
+
62
+ public: // Types
63
+ using GroupPtr = QPointer<QQuickColorGroup>;
64
+
65
+ public:
66
+ Q_DISABLE_COPY_MOVE(QQuickColorGroup)
67
+
68
+ explicit QQuickColorGroup(QObject *parent = nullptr);
69
+
70
+ QColor alternateBase() const;
71
+ void setAlternateBase(const QColor &color);
72
+ void resetAlternateBase();
73
+
74
+ QColor base() const;
75
+ void setBase(const QColor &color);
76
+ void resetBase();
77
+
78
+ QColor brightText() const;
79
+ void setBrightText(const QColor &color);
80
+ void resetBrightText();
81
+
82
+ QColor button() const;
83
+ void setButton(const QColor &color);
84
+ void resetButton();
85
+
86
+ QColor buttonText() const;
87
+ void setButtonText(const QColor &color);
88
+ void resetButtonText();
89
+
90
+ QColor dark() const;
91
+ void setDark(const QColor &color);
92
+ void resetDark();
93
+
94
+ QColor highlight() const;
95
+ void setHighlight(const QColor &color);
96
+ void resetHighlight();
97
+
98
+ QColor highlightedText() const;
99
+ void setHighlightedText(const QColor &color);
100
+ void resetHighlightedText();
101
+
102
+ QColor light() const;
103
+ void setLight(const QColor &color);
104
+ void resetLight();
105
+
106
+ QColor link() const;
107
+ void setLink(const QColor &color);
108
+ void resetLink();
109
+
110
+ QColor linkVisited() const;
111
+ void setLinkVisited(const QColor &color);
112
+ void resetLinkVisited();
113
+
114
+ QColor mid() const;
115
+ void setMid(const QColor &color);
116
+ void resetMid();
117
+
118
+ QColor midlight() const;
119
+ void setMidlight(const QColor &color);
120
+ void resetMidlight();
121
+
122
+ QColor shadow() const;
123
+ void setShadow(const QColor &color);
124
+ void resetShadow();
125
+
126
+ QColor text() const;
127
+ void setText(const QColor &color);
128
+ void resetText();
129
+
130
+ QColor toolTipBase() const;
131
+ void setToolTipBase(const QColor &color);
132
+ void resetToolTipBase();
133
+
134
+ QColor toolTipText() const;
135
+ void setToolTipText(const QColor &color);
136
+ void resetToolTipText();
137
+
138
+ QColor window() const;
139
+ void setWindow(const QColor &color);
140
+ void resetWindow();
141
+
142
+ QColor windowText() const;
143
+ void setWindowText(const QColor &color);
144
+ void resetWindowText();
145
+
146
+ QColor placeholderText() const;
147
+ void setPlaceholderText(const QColor &color);
148
+ void resetPlaceholderText();
149
+
150
+ QColor accent() const;
151
+ void setAccent(const QColor &color);
152
+ void resetAccent();
153
+
154
+ QPalette::ColorGroup groupTag() const;
155
+ void setGroupTag(QPalette::ColorGroup tag);
156
+
157
+ const QQuickPaletteColorProvider &colorProvider() const;
158
+ QQuickPaletteColorProvider &colorProvider();
159
+
160
+ static QQuickColorGroup* createWithParent(QQuickPalette &parent);
161
+
162
+ Q_SIGNALS:
163
+ void alternateBaseChanged();
164
+ void baseChanged();
165
+ void brightTextChanged();
166
+ void buttonChanged();
167
+ void buttonTextChanged();
168
+ void darkChanged();
169
+ void highlightChanged();
170
+ void highlightedTextChanged();
171
+ void lightChanged();
172
+ void linkChanged();
173
+ void linkVisitedChanged();
174
+ void midChanged();
175
+ void midlightChanged();
176
+ void shadowChanged();
177
+ void textChanged();
178
+ void toolTipBaseChanged();
179
+ void toolTipTextChanged();
180
+ void windowChanged();
181
+ void windowTextChanged();
182
+ Q_REVISION(6, 2) void placeholderTextChanged();
183
+ Q_REVISION(6, 6) void accentChanged();
184
+
185
+ void changed();
186
+
187
+ protected:
188
+ explicit QQuickColorGroup(QQuickPalette &parent);
189
+
190
+ static constexpr QPalette::ColorGroup defaultGroupTag() { return QPalette::All; }
191
+
192
+ virtual QPalette::ColorGroup currentColorGroup() const;
193
+
194
+ private:
195
+ using Notifier = void (QQuickColorGroup::* )();
196
+
197
+ QColor color(QPalette::ColorRole role) const;
198
+ void setColor(QPalette::ColorRole role, QColor color, Notifier notifier);
199
+ void resetColor(QPalette::ColorRole role, Notifier notifier);
200
+
201
+ private:
202
+ QPalette::ColorGroup m_groupTag;
203
+ std::shared_ptr<QQuickPaletteColorProvider> m_colorProvider;
204
+ };
205
+
206
+ QT_END_NAMESPACE
207
+
208
+ #endif // QQUICKCOLORGROUP_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2d_p.h ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKCONTEXT2D_P_H
5
+ #define QQUICKCONTEXT2D_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_canvas);
21
+
22
+ #include <QtQml/qqml.h>
23
+ #include <QtQml/qqmlcomponent.h>
24
+ #include <private/qquickcanvascontext_p.h>
25
+ #include <private/qquickcanvasitem_p.h>
26
+ #include <QtGui/qpainter.h>
27
+ #include <QtGui/qpainterpath.h>
28
+ #include <QtGui/qoffscreensurface.h>
29
+ #include <QtCore/qstring.h>
30
+ #include <QtCore/qstack.h>
31
+ #include <QtCore/qqueue.h>
32
+ #include <QtCore/QWaitCondition>
33
+
34
+ #include <private/qv4persistent_p.h>
35
+
36
+ //#define QQUICKCONTEXT2D_DEBUG //enable this for just DEBUG purpose!
37
+
38
+ #ifdef QQUICKCONTEXT2D_DEBUG
39
+ #include <QElapsedTimer>
40
+ #endif
41
+
42
+ QT_BEGIN_NAMESPACE
43
+
44
+ namespace QV4 {
45
+ struct ExecutionEngine;
46
+ }
47
+
48
+ class QQuickContext2DCommandBuffer;
49
+ class QQuickContext2DTexture;
50
+ class QQuickPixmap;
51
+ class QSGTexture;
52
+ class QSurface;
53
+
54
+ class QQuickContext2D : public QQuickCanvasContext
55
+ {
56
+ Q_OBJECT
57
+
58
+ public:
59
+ Q_DISABLE_COPY(QQuickContext2D)
60
+
61
+ enum TextBaseLineType { Alphabetic=0, Top, Middle, Bottom, Hanging};
62
+ enum TextAlignType { Start=0, End, Left, Right, Center};
63
+ enum PaintCommand {
64
+ Invalid = 0,
65
+ UpdateMatrix,
66
+ ClearRect,
67
+ FillRect,
68
+ StrokeRect,
69
+ Fill,
70
+ Stroke,
71
+ Clip,
72
+ UpdateBrush,
73
+ GlobalAlpha,
74
+ GlobalCompositeOperation,
75
+ StrokeStyle,
76
+ FillStyle,
77
+ LineWidth,
78
+ LineCap,
79
+ LineJoin,
80
+ LineDash,
81
+ LineDashOffset,
82
+ MiterLimit,
83
+ ShadowOffsetX,
84
+ ShadowOffsetY,
85
+ ShadowBlur,
86
+ ShadowColor,
87
+ Font,
88
+ TextBaseline,
89
+ TextAlign,
90
+ FillText,
91
+ StrokeText,
92
+ DrawImage,
93
+ DrawPixmap,
94
+ GetImageData
95
+ };
96
+
97
+ struct State {
98
+ State()
99
+ : strokeStyle(QColor(Qt::black))
100
+ , fillStyle(QColor(Qt::black))
101
+ , fillPatternRepeatX(false)
102
+ , fillPatternRepeatY(false)
103
+ , strokePatternRepeatX(false)
104
+ , strokePatternRepeatY(false)
105
+ , invertibleCTM(true)
106
+ , clip(false)
107
+ , fillRule(Qt::WindingFill)
108
+ , globalAlpha(1.0)
109
+ , lineWidth(1)
110
+ , lineCap(Qt::FlatCap)
111
+ , lineJoin(Qt::MiterJoin)
112
+ , lineDashOffset(0)
113
+ , miterLimit(10)
114
+ , shadowOffsetX(0)
115
+ , shadowOffsetY(0)
116
+ , shadowBlur(0)
117
+ , shadowColor(qRgba(0, 0, 0, 0))
118
+ , globalCompositeOperation(QPainter::CompositionMode_SourceOver)
119
+ , font(QFont(QLatin1String("sans-serif")))
120
+ , textAlign(QQuickContext2D::Start)
121
+ , textBaseline(QQuickContext2D::Alphabetic)
122
+ {
123
+ font.setPixelSize(10);
124
+ }
125
+
126
+ QTransform matrix;
127
+ QPainterPath clipPath;
128
+ QBrush strokeStyle;
129
+ QBrush fillStyle;
130
+ bool fillPatternRepeatX:1;
131
+ bool fillPatternRepeatY:1;
132
+ bool strokePatternRepeatX:1;
133
+ bool strokePatternRepeatY:1;
134
+ bool invertibleCTM:1;
135
+ bool clip:1;
136
+ Qt::FillRule fillRule;
137
+ qreal globalAlpha;
138
+ qreal lineWidth;
139
+ Qt::PenCapStyle lineCap;
140
+ Qt::PenJoinStyle lineJoin;
141
+ QVector<qreal> lineDash;
142
+ qreal lineDashOffset;
143
+ qreal miterLimit;
144
+ qreal shadowOffsetX;
145
+ qreal shadowOffsetY;
146
+ qreal shadowBlur;
147
+ QColor shadowColor;
148
+ QPainter::CompositionMode globalCompositeOperation;
149
+ QFont font;
150
+ QQuickContext2D::TextAlignType textAlign;
151
+ QQuickContext2D::TextBaseLineType textBaseline;
152
+ };
153
+
154
+ QQuickContext2D(QObject *parent = nullptr);
155
+ ~QQuickContext2D();
156
+
157
+ QStringList contextNames() const override;
158
+ void init(QQuickCanvasItem *canvasItem, const QVariantMap &args) override;
159
+ void prepare(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth, bool antialiasing) override;
160
+ void flush() override;
161
+ void sync();
162
+ QThread *thread() const { return m_thread; }
163
+ QQuickContext2DTexture *texture() const;
164
+ QImage toImage(const QRectF& bounds) override;
165
+
166
+ QV4::ReturnedValue v4value() const override;
167
+ QV4::ExecutionEngine *v4Engine() const override;
168
+ void setV4Engine(QV4::ExecutionEngine *eng) override;
169
+
170
+ QQuickCanvasItem* canvas() const { return m_canvas; }
171
+ QQuickContext2DCommandBuffer* buffer() const { return m_buffer; }
172
+
173
+ bool bufferValid() const { return m_buffer != nullptr; }
174
+ void popState();
175
+ void pushState();
176
+ void reset();
177
+
178
+ void fill();
179
+ void clip();
180
+ void stroke();
181
+ void fillRect(qreal x, qreal y, qreal w, qreal h);
182
+ void strokeRect(qreal x, qreal y, qreal w, qreal h);
183
+ void clearRect(qreal x, qreal y, qreal w, qreal h);
184
+ void drawText(const QString& text, qreal x, qreal y, bool fill);
185
+
186
+ //Transform APIs
187
+ void scale(qreal x, qreal y);
188
+ void rotate(qreal angle);
189
+ void shear(qreal h, qreal v);
190
+ void translate(qreal x, qreal y);
191
+ void transform(qreal a, qreal b, qreal c, qreal d, qreal e, qreal f);
192
+ void setTransform(qreal a, qreal b, qreal c, qreal d, qreal e, qreal f);
193
+
194
+ // Path APIs
195
+ void beginPath();
196
+ void closePath();
197
+ void moveTo(qreal x, qreal y);
198
+ void lineTo(qreal x, qreal y);
199
+ void quadraticCurveTo(qreal cpx, qreal cpy, qreal x, qreal y);
200
+ void bezierCurveTo(qreal cp1x, qreal cp1y,
201
+ qreal cp2x, qreal cp2y, qreal x, qreal y);
202
+ void arcTo(qreal x1, qreal y1, qreal x2, qreal y2, qreal radius);
203
+ void rect(qreal x, qreal y, qreal w, qreal h);
204
+ void roundedRect(qreal x, qreal y,qreal w, qreal h, qreal xr, qreal yr);
205
+ void ellipse(qreal x, qreal y,qreal w, qreal h);
206
+ void text(const QString& str, qreal x, qreal y);
207
+ void arc(qreal x, qreal y, qreal radius,
208
+ qreal startAngle, qreal endAngle,
209
+ bool anticlockwise);
210
+ void addArcTo(const QPointF& p1, const QPointF& p2, qreal radius);
211
+
212
+ bool isPointInPath(qreal x, qreal y) const;
213
+
214
+ QPainterPath createTextGlyphs(qreal x, qreal y, const QString& text);
215
+ QQmlRefPointer<QQuickCanvasPixmap> createPixmap(const QUrl& url, QSizeF sourceSize = QSizeF());
216
+
217
+ QSurface *surface() const { return m_surface.data(); }
218
+ void setGrabbedImage(const QImage& grab);
219
+
220
+ State state;
221
+ QStack<QQuickContext2D::State> m_stateStack;
222
+ QQuickCanvasItem* m_canvas;
223
+ QQuickContext2DCommandBuffer* m_buffer;
224
+ QPainterPath m_path;
225
+ QV4::PersistentValue m_fillStyle;
226
+ QV4::PersistentValue m_strokeStyle;
227
+ QV4::PersistentValue m_v4path;
228
+ QV4::ExecutionEngine *m_v4engine;
229
+ QScopedPointer<QOffscreenSurface> m_surface;
230
+ QV4::PersistentValue m_v4value;
231
+ QQuickContext2DTexture *m_texture;
232
+ QQuickCanvasItem::RenderTarget m_renderTarget;
233
+ QQuickCanvasItem::RenderStrategy m_renderStrategy;
234
+ QQueue<QQuickContext2DCommandBuffer*> m_bufferQueue;
235
+ QThread *m_thread;
236
+ QImage m_grabbedImage;
237
+ bool m_grabbed:1;
238
+
239
+ static QMutex mutex;
240
+ };
241
+
242
+ QT_END_NAMESPACE
243
+
244
+ #endif // QQUICKCONTEXT2D_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dcommandbuffer_p.h ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKCONTEXT2DCOMMANDBUFFER_P_H
5
+ #define QQUICKCONTEXT2DCOMMANDBUFFER_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_canvas);
21
+
22
+ #include <QtCore/qmutex.h>
23
+ #include "qquickcontext2d_p.h"
24
+
25
+ QT_BEGIN_NAMESPACE
26
+
27
+ class QQuickCanvasItem;
28
+ class QMutex;
29
+
30
+ class QQuickContext2DCommandBuffer
31
+ {
32
+ public:
33
+ QQuickContext2DCommandBuffer();
34
+ ~QQuickContext2DCommandBuffer();
35
+ void reset();
36
+ void clear();
37
+
38
+ inline int size() const { return commands.size(); }
39
+ inline bool isEmpty() const {return commands.isEmpty(); }
40
+ inline bool hasNext() const {return cmdIdx < commands.size(); }
41
+ inline QQuickContext2D::PaintCommand takeNextCommand() { return commands.at(cmdIdx++); }
42
+
43
+ inline qreal takeGlobalAlpha() { return takeReal(); }
44
+ inline QPainter::CompositionMode takeGlobalCompositeOperation(){ return static_cast<QPainter::CompositionMode>(takeInt()); }
45
+ inline QBrush takeStrokeStyle() { return takeBrush(); }
46
+ inline QBrush takeFillStyle() { return takeBrush(); }
47
+
48
+ inline qreal takeLineWidth() { return takeReal(); }
49
+ inline Qt::PenCapStyle takeLineCap() { return static_cast<Qt::PenCapStyle>(takeInt());}
50
+ inline Qt::PenJoinStyle takeLineJoin(){ return static_cast<Qt::PenJoinStyle>(takeInt());}
51
+ inline qreal takeMiterLimit() { return takeReal(); }
52
+
53
+ inline void setGlobalAlpha( qreal alpha)
54
+ {
55
+ commands << QQuickContext2D::GlobalAlpha;
56
+ reals << alpha;
57
+ }
58
+
59
+ inline void setGlobalCompositeOperation(QPainter::CompositionMode cm)
60
+ {
61
+ commands << QQuickContext2D::GlobalCompositeOperation;
62
+ ints << cm;
63
+ }
64
+
65
+ inline void setStrokeStyle(const QBrush &style, bool repeatX = false, bool repeatY = false)
66
+ {
67
+ commands << QQuickContext2D::StrokeStyle;
68
+ brushes << style;
69
+ bools << repeatX << repeatY;
70
+ }
71
+
72
+ inline void drawImage(const QImage& image, const QRectF& sr, const QRectF& dr)
73
+ {
74
+ commands << QQuickContext2D::DrawImage;
75
+ images << image;
76
+ rects << sr << dr;
77
+ }
78
+
79
+ inline void drawPixmap(QQmlRefPointer<QQuickCanvasPixmap> pixmap, const QRectF& sr, const QRectF& dr)
80
+ {
81
+ commands << QQuickContext2D::DrawPixmap;
82
+ pixmaps << pixmap;
83
+ rects << sr << dr;
84
+ }
85
+
86
+ inline qreal takeShadowOffsetX() { return takeReal(); }
87
+ inline qreal takeShadowOffsetY() { return takeReal(); }
88
+ inline qreal takeShadowBlur() { return takeReal(); }
89
+ inline QColor takeShadowColor() { return takeColor(); }
90
+
91
+
92
+ inline void updateMatrix(const QTransform& matrix)
93
+ {
94
+ commands << QQuickContext2D::UpdateMatrix;
95
+ matrixes << matrix;
96
+ }
97
+
98
+ inline void clearRect(const QRectF& r)
99
+ {
100
+ commands << QQuickContext2D::ClearRect;
101
+ rects << r;
102
+ }
103
+
104
+ inline void fillRect(const QRectF& r)
105
+ {
106
+ commands << QQuickContext2D::FillRect;
107
+ rects << r;
108
+ }
109
+
110
+ inline void strokeRect(const QRectF& r)
111
+ {
112
+ QPainterPath p;
113
+ p.addRect(r);
114
+
115
+ commands << QQuickContext2D::Stroke;
116
+ pathes << p;
117
+ }
118
+
119
+
120
+ inline void fill(const QPainterPath& path)
121
+ {
122
+ commands << QQuickContext2D::Fill;
123
+ pathes << path;
124
+
125
+ }
126
+
127
+ inline void stroke(const QPainterPath& path)
128
+ {
129
+ commands << QQuickContext2D::Stroke;
130
+ pathes << path;
131
+ }
132
+
133
+ inline void clip(bool enabled, const QPainterPath& path)
134
+ {
135
+ commands << QQuickContext2D::Clip;
136
+ bools << enabled;
137
+ pathes << path;
138
+ }
139
+
140
+
141
+
142
+ inline void setFillStyle(const QBrush &style, bool repeatX = false, bool repeatY = false)
143
+ {
144
+ commands << QQuickContext2D::FillStyle;
145
+ brushes << style;
146
+ bools << repeatX << repeatY;
147
+ }
148
+
149
+
150
+ inline void setLineWidth( qreal w)
151
+ {
152
+ commands << QQuickContext2D::LineWidth;
153
+ reals << w;
154
+ }
155
+
156
+ inline void setLineCap(Qt::PenCapStyle cap)
157
+ {
158
+ commands << QQuickContext2D::LineCap;
159
+ ints << cap;
160
+ }
161
+
162
+ inline void setLineJoin(Qt::PenJoinStyle join)
163
+ {
164
+ commands << QQuickContext2D::LineJoin;
165
+ ints << join;
166
+ }
167
+
168
+ inline void setLineDash(const QVector<qreal> &pattern)
169
+ {
170
+ commands << QQuickContext2D::LineDash;
171
+ reals << pattern.size();
172
+ for (qreal r : pattern)
173
+ reals << r;
174
+ }
175
+
176
+ inline void setLineDashOffset( qreal offset)
177
+ {
178
+ commands << QQuickContext2D::LineDashOffset;
179
+ reals << offset;
180
+ }
181
+
182
+ inline void setMiterLimit( qreal limit)
183
+ {
184
+ commands << QQuickContext2D::MiterLimit;
185
+ reals << limit;
186
+ }
187
+
188
+ inline void setShadowOffsetX( qreal x)
189
+ {
190
+ commands << QQuickContext2D::ShadowOffsetX;
191
+ reals << x;
192
+ }
193
+
194
+ inline void setShadowOffsetY( qreal y)
195
+ {
196
+ commands << QQuickContext2D::ShadowOffsetY;
197
+ reals << y;
198
+ }
199
+
200
+ inline void setShadowBlur( qreal b)
201
+ {
202
+ commands << QQuickContext2D::ShadowBlur;
203
+ reals << b;
204
+ }
205
+
206
+ inline void setShadowColor(const QColor &color)
207
+ {
208
+ commands << QQuickContext2D::ShadowColor;
209
+ colors << color;
210
+ }
211
+
212
+ inline QTransform takeMatrix() { return matrixes.at(matrixIdx++); }
213
+
214
+ inline QRectF takeRect() { return rects.at(rectIdx++); }
215
+
216
+ inline QPainterPath takePath() { return pathes.at(pathIdx++); }
217
+
218
+ inline const QImage& takeImage() { return images.at(imageIdx++); }
219
+ inline QQmlRefPointer<QQuickCanvasPixmap> takePixmap() { return pixmaps.at(pixmapIdx++); }
220
+
221
+ inline int takeInt() { return ints.at(intIdx++); }
222
+ inline bool takeBool() {return bools.at(boolIdx++); }
223
+ inline qreal takeReal() { return reals.at(realIdx++); }
224
+ inline QColor takeColor() { return colors.at(colorIdx++); }
225
+ inline QBrush takeBrush() { return brushes.at(brushIdx++); }
226
+
227
+ void replay(QPainter* painter, QQuickContext2D::State& state, const QVector2D &scaleFactor);
228
+
229
+ private:
230
+ static QPen makePen(const QQuickContext2D::State& state);
231
+ void setPainterState(QPainter* painter, const QQuickContext2D::State& state, const QPen& pen);
232
+ int cmdIdx;
233
+ int intIdx;
234
+ int boolIdx;
235
+ int realIdx;
236
+ int rectIdx;
237
+ int colorIdx;
238
+ int matrixIdx;
239
+ int brushIdx;
240
+ int pathIdx;
241
+ int imageIdx;
242
+ int pixmapIdx;
243
+ QVector<QQuickContext2D::PaintCommand> commands;
244
+
245
+ QVector<int> ints;
246
+ QVector<bool> bools;
247
+ QVector<qreal> reals;
248
+ QVector<QRectF> rects;
249
+ QVector<QColor> colors;
250
+ QVector<QTransform> matrixes;
251
+ QVector<QBrush> brushes;
252
+ QVector<QPainterPath> pathes;
253
+ QVector<QImage> images;
254
+ QVector<QQmlRefPointer<QQuickCanvasPixmap> > pixmaps;
255
+ QMutex queueLock;
256
+ };
257
+
258
+ QT_END_NAMESPACE
259
+
260
+ #endif // QQUICKCONTEXT2DCOMMANDBUFFER_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtexture_p.h ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKCONTEXT2DTEXTURE_P_H
5
+ #define QQUICKCONTEXT2DTEXTURE_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_canvas);
21
+
22
+ #include <QtQuick/qsgtexture.h>
23
+ #include "qquickcanvasitem_p.h"
24
+ #include "qquickcontext2d_p.h"
25
+ #include <QtCore/QMutex>
26
+ #include <QtCore/QWaitCondition>
27
+ #include <QtCore/QThread>
28
+
29
+ QT_BEGIN_NAMESPACE
30
+
31
+ class QQuickContext2DTile;
32
+ class QQuickContext2DCommandBuffer;
33
+
34
+ class QQuickContext2DTexture : public QObject
35
+ {
36
+ Q_OBJECT
37
+ public:
38
+ class PaintEvent : public QEvent {
39
+ public:
40
+ PaintEvent(QQuickContext2DCommandBuffer *b) : QEvent(QEvent::Type(QEvent::User + 1)), buffer(b) {}
41
+ QQuickContext2DCommandBuffer *buffer;
42
+ };
43
+
44
+ class CanvasChangeEvent : public QEvent {
45
+ public:
46
+ CanvasChangeEvent(const QSize &cSize,
47
+ const QSize &tSize,
48
+ const QRect &cWindow,
49
+ const QRect &dRect,
50
+ bool sm,
51
+ bool aa)
52
+ : QEvent(QEvent::Type(QEvent::User + 2))
53
+ , canvasSize(cSize)
54
+ , tileSize(tSize)
55
+ , canvasWindow(cWindow)
56
+ , dirtyRect(dRect)
57
+ , smooth(sm)
58
+ , antialiasing(aa)
59
+ {
60
+ }
61
+ QSize canvasSize;
62
+ QSize tileSize;
63
+ QRect canvasWindow;
64
+ QRect dirtyRect;
65
+ bool smooth;
66
+ bool antialiasing;
67
+ };
68
+
69
+ QQuickContext2DTexture();
70
+ ~QQuickContext2DTexture();
71
+
72
+ virtual QQuickCanvasItem::RenderTarget renderTarget() const = 0;
73
+ static QRect tiledRect(const QRectF& window, const QSize& tileSize);
74
+
75
+ bool setCanvasSize(const QSize &size);
76
+ bool setTileSize(const QSize &size);
77
+ bool setCanvasWindow(const QRect& canvasWindow);
78
+ void setSmooth(bool smooth);
79
+ void setAntialiasing(bool antialiasing);
80
+ bool setDirtyRect(const QRect &dirtyRect);
81
+ bool canvasDestroyed();
82
+ void setOnCustomThread(bool is) { m_onCustomThread = is; }
83
+ bool isOnCustomThread() const { return m_onCustomThread; }
84
+
85
+ // Called during sync() on the scene graph thread while GUI is blocked.
86
+ virtual QSGTexture *textureForNextFrame(QSGTexture *lastFrame, QQuickWindow *window) = 0;
87
+ bool event(QEvent *e) override;
88
+
89
+ Q_SIGNALS:
90
+ void textureChanged();
91
+
92
+ public Q_SLOTS:
93
+ void canvasChanged(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth, bool antialiasing);
94
+ void paint(QQuickContext2DCommandBuffer *ccb);
95
+ void markDirtyTexture();
96
+ void setItem(QQuickCanvasItem* item);
97
+ virtual void grabImage(const QRectF& region = QRectF()) = 0;
98
+
99
+ protected:
100
+ virtual QVector2D scaleFactor() const { return QVector2D(1, 1); }
101
+
102
+ void paintWithoutTiles(QQuickContext2DCommandBuffer *ccb);
103
+ virtual QPaintDevice* beginPainting() {m_painting = true; return nullptr; }
104
+ virtual void endPainting() {m_painting = false;}
105
+ virtual QQuickContext2DTile* createTile() const = 0;
106
+ virtual void compositeTile(QQuickContext2DTile* tile) = 0;
107
+
108
+ void clearTiles();
109
+ virtual QSize adjustedTileSize(const QSize &ts);
110
+ QRect createTiles(const QRect& window);
111
+
112
+ QList<QQuickContext2DTile*> m_tiles;
113
+ QQuickContext2D *m_context;
114
+ QSurface *m_surface;
115
+
116
+ QQuickContext2D::State m_state;
117
+
118
+ QQuickCanvasItem* m_item;
119
+ QSize m_canvasSize;
120
+ QSize m_tileSize;
121
+ QRect m_canvasWindow;
122
+ qreal m_canvasDevicePixelRatio;
123
+
124
+ QMutex m_mutex;
125
+ QWaitCondition m_condition;
126
+
127
+ uint m_canvasWindowChanged : 1;
128
+ uint m_dirtyTexture : 1;
129
+ uint m_smooth : 1;
130
+ uint m_antialiasing : 1;
131
+ uint m_tiledCanvas : 1;
132
+ uint m_painting : 1;
133
+ uint m_onCustomThread : 1; // Not GUI and not SGRender
134
+ };
135
+
136
+ class QSGPlainTexture;
137
+ class QQuickContext2DImageTexture : public QQuickContext2DTexture
138
+ {
139
+ Q_OBJECT
140
+
141
+ public:
142
+ QQuickContext2DImageTexture();
143
+ ~QQuickContext2DImageTexture();
144
+
145
+ QQuickCanvasItem::RenderTarget renderTarget() const override;
146
+
147
+ QQuickContext2DTile* createTile() const override;
148
+ QPaintDevice* beginPainting() override;
149
+ void endPainting() override;
150
+ void compositeTile(QQuickContext2DTile* tile) override;
151
+
152
+ QSGTexture *textureForNextFrame(QSGTexture *lastFrame, QQuickWindow *window) override;
153
+
154
+ public Q_SLOTS:
155
+ void grabImage(const QRectF& region = QRectF()) override;
156
+
157
+ private:
158
+ QImage m_image;
159
+ QImage m_displayImage;
160
+ QPainter m_painter;
161
+ };
162
+
163
+ QT_END_NAMESPACE
164
+
165
+ #endif // QQUICKCONTEXT2DTEXTURE_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtile_p.h ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKCONTEXT2DTILE_P_H
5
+ #define QQUICKCONTEXT2DTILE_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_canvas);
21
+
22
+ #include "qquickcontext2d_p.h"
23
+ QT_BEGIN_NAMESPACE
24
+
25
+ class QQuickContext2DTexture;
26
+ class QQuickContext2DCommandBuffer;
27
+
28
+ class QQuickContext2DTile
29
+ {
30
+ public:
31
+ QQuickContext2DTile();
32
+ virtual ~QQuickContext2DTile();
33
+
34
+ bool dirty() const {return m_dirty;}
35
+ void markDirty(bool dirty) {m_dirty = dirty;}
36
+
37
+ QRect rect() const {return m_rect;}
38
+
39
+ virtual void setRect(const QRect& r) = 0;
40
+ virtual QPainter* createPainter(bool smooth, bool antialiasing);
41
+ virtual void drawFinished() {}
42
+
43
+ protected:
44
+ virtual void aboutToDraw() {}
45
+ uint m_dirty : 1;
46
+ QRect m_rect;
47
+ QPaintDevice* m_device;
48
+ QPainter m_painter;
49
+ };
50
+
51
+ class QQuickContext2DImageTile : public QQuickContext2DTile
52
+ {
53
+ public:
54
+ QQuickContext2DImageTile();
55
+ ~QQuickContext2DImageTile();
56
+ void setRect(const QRect& r) override;
57
+ const QImage& image() const {return m_image;}
58
+ private:
59
+ QImage m_image;
60
+ };
61
+ QT_END_NAMESPACE
62
+
63
+ #endif // QQUICKCONTEXT2DTILE_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p.h ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2021 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 QQUICKDELIVERYAGENT_P_H
5
+ #define QQUICKDELIVERYAGENT_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 <QtQuick/private/qtquickglobal_p.h>
19
+
20
+ #include <QtQml/qqml.h>
21
+ #include <QtQml/private/qqmlglobal_p.h>
22
+
23
+ #include <QtCore/qobject.h>
24
+ #include <QtGui/qevent.h>
25
+
26
+ QT_BEGIN_NAMESPACE
27
+
28
+ class QQuickItem;
29
+ class QQuickDeliveryAgentPrivate;
30
+
31
+ class Q_QUICK_EXPORT QQuickDeliveryAgent : public QObject
32
+ {
33
+ Q_OBJECT
34
+ Q_DECLARE_PRIVATE(QQuickDeliveryAgent)
35
+
36
+ public:
37
+ struct Q_QUICK_EXPORT Transform
38
+ {
39
+ virtual ~Transform();
40
+ virtual QPointF map(const QPointF &point) = 0;
41
+ };
42
+
43
+ explicit QQuickDeliveryAgent(QQuickItem *rootItem);
44
+ virtual ~QQuickDeliveryAgent();
45
+
46
+ QQuickItem *rootItem() const;
47
+
48
+ Transform *sceneTransform() const;
49
+ void setSceneTransform(Transform *transform);
50
+ bool event(QEvent *ev) override;
51
+
52
+ Q_SIGNALS:
53
+
54
+ private:
55
+ Q_DISABLE_COPY(QQuickDeliveryAgent)
56
+ };
57
+
58
+ #ifndef QT_NO_DEBUG_STREAM
59
+ QDebug Q_QUICK_EXPORT operator<<(QDebug debug, const QQuickDeliveryAgent *da);
60
+ #endif
61
+
62
+ QT_END_NAMESPACE
63
+
64
+ #endif // QQUICKDELIVERYAGENT_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p_p.h ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2021 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 QQUICKDELIVERYAGENT_P_P_H
5
+ #define QQUICKDELIVERYAGENT_P_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 <QtQuick/private/qquickdeliveryagent_p.h>
19
+ #include <QtGui/qevent.h>
20
+ #include <QtCore/qstack.h>
21
+
22
+ #include <private/qevent_p.h>
23
+ #include <private/qpointingdevice_p.h>
24
+
25
+ #include <QtCore/qpointer.h>
26
+ #include <private/qobject_p.h>
27
+
28
+ #include <memory>
29
+
30
+ QT_BEGIN_NAMESPACE
31
+
32
+ class QQuickDragGrabber;
33
+ class QQuickItem;
34
+ class QQuickPointerHandler;
35
+ class QQuickWindow;
36
+
37
+ /*! \internal
38
+ Extra device-specific data to be stored in QInputDevicePrivate::qqExtra
39
+ */
40
+ struct QQuickPointingDeviceExtra {
41
+ // used in QQuickPointerHandlerPrivate::deviceDeliveryTargets
42
+ QVector<QObject *> deliveryTargets;
43
+ };
44
+
45
+ class Q_QUICK_EXPORT QQuickDeliveryAgentPrivate : public QObjectPrivate
46
+ {
47
+ public:
48
+ Q_DECLARE_PUBLIC(QQuickDeliveryAgent)
49
+ QQuickDeliveryAgentPrivate(QQuickItem *root);
50
+ ~QQuickDeliveryAgentPrivate();
51
+
52
+ QQuickItem *rootItem = nullptr;
53
+
54
+ QQuickItem *activeFocusItem = nullptr;
55
+
56
+ void deliverKeyEvent(QKeyEvent *e);
57
+
58
+ enum FocusOption {
59
+ DontChangeFocusProperty = 0x01,
60
+ DontChangeSubFocusItem = 0x02
61
+ };
62
+ Q_DECLARE_FLAGS(FocusOptions, FocusOption)
63
+
64
+ void setFocusInScope(QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason, FocusOptions = { });
65
+ void clearFocusInScope(QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason, FocusOptions = { });
66
+ static void notifyFocusChangesRecur(QQuickItem **item, int remaining, Qt::FocusReason reason);
67
+ void clearFocusObject();
68
+ void updateFocusItemTransform();
69
+
70
+ QQuickItem *focusTargetItem() const;
71
+
72
+ // Keeps track of the item currently receiving mouse events
73
+ #if QT_CONFIG(quick_draganddrop)
74
+ QQuickDragGrabber *dragGrabber = nullptr;
75
+ #endif
76
+ QQuickItem *lastUngrabbed = nullptr;
77
+ QStack<QPointerEvent *> eventsInDelivery;
78
+ QFlatMap<QPointer<QQuickItem>, uint> hoverItems;
79
+ QVector<QQuickItem *> hasFiltered; // during event delivery to a single receiver, the filtering parents for which childMouseEventFilter was already called
80
+ QVector<QQuickItem *> skipDelivery; // during delivery of one event to all receivers, Items to which we know delivery is no longer necessary
81
+
82
+ std::unique_ptr<QMutableTouchEvent> delayedTouch;
83
+ QList<const QPointingDevice *> knownPointingDevices;
84
+
85
+ uint currentHoverId = 0;
86
+ #if QT_CONFIG(wheelevent)
87
+ uint lastWheelEventAccepted = 0;
88
+ #endif
89
+ uchar compressedTouchCount = 0;
90
+ bool allowChildEventFiltering = true;
91
+ bool frameSynchronousHoverEnabled = true;
92
+ bool hoveredLeafItemFound = false;
93
+
94
+ bool isSubsceneAgent = false;
95
+ static bool subsceneAgentsExist;
96
+ // QQuickDeliveryAgent::event() sets this to the one that's currently (trying to) handle the event
97
+ static QQuickDeliveryAgent *currentEventDeliveryAgent;
98
+ static QQuickDeliveryAgent *currentOrItemDeliveryAgent(const QQuickItem *item);
99
+
100
+ Qt::FocusReason lastFocusReason = Qt::OtherFocusReason;
101
+ int pointerEventRecursionGuard = 0;
102
+
103
+ int touchMouseId = -1; // only for obsolete stuff like QQuickItem::grabMouse()
104
+ // TODO get rid of these
105
+ const QPointingDevice *touchMouseDevice = nullptr;
106
+ ulong touchMousePressTimestamp = 0;
107
+ QPoint touchMousePressPos; // in screen coordinates
108
+
109
+ QQuickDeliveryAgent::Transform *sceneTransform = nullptr;
110
+
111
+ bool isDeliveringTouchAsMouse() const { return touchMouseId != -1 && touchMouseDevice; }
112
+ void cancelTouchMouseSynthesis();
113
+
114
+ bool checkIfDoubleTapped(ulong newPressEventTimestamp, const QPoint &newPressPos);
115
+ void resetIfDoubleTapPrevented(const QEventPoint &pressedPoint);
116
+ QPointingDevicePrivate::EventPointData *mousePointData();
117
+ QPointerEvent *eventInDelivery() const;
118
+
119
+ // Mouse positions are saved in widget coordinates
120
+ QPointF lastMousePosition;
121
+ bool deliverTouchAsMouse(QQuickItem *item, QTouchEvent *pointerEvent);
122
+ void translateTouchEvent(QTouchEvent *touchEvent);
123
+ void removeGrabber(QQuickItem *grabber, bool mouse = true, bool touch = true, bool cancel = false);
124
+ void clearGrabbers(QPointerEvent *pointerEvent);
125
+ void onGrabChanged(QObject *grabber, QPointingDevice::GrabTransition transition, const QPointerEvent *event, const QEventPoint &point);
126
+ static QPointerEvent *clonePointerEvent(QPointerEvent *event, std::optional<QPointF> transformedLocalPos = std::nullopt);
127
+ void deliverToPassiveGrabbers(const QVector<QPointer<QObject> > &passiveGrabbers, QPointerEvent *pointerEvent);
128
+ bool sendFilteredMouseEvent(QEvent *event, QQuickItem *receiver, QQuickItem *filteringParent);
129
+ bool sendFilteredPointerEvent(QPointerEvent *event, QQuickItem *receiver, QQuickItem *filteringParent = nullptr);
130
+ bool sendFilteredPointerEventImpl(QPointerEvent *event, QQuickItem *receiver, QQuickItem *filteringParent);
131
+ bool deliverSinglePointEventUntilAccepted(QPointerEvent *);
132
+
133
+ // entry point of events to the window
134
+ void handleTouchEvent(QTouchEvent *);
135
+ void handleMouseEvent(QMouseEvent *);
136
+ bool compressTouchEvent(QTouchEvent *);
137
+ void flushFrameSynchronousEvents(QQuickWindow *win);
138
+ void deliverDelayedTouchEvent();
139
+ void handleWindowDeactivate(QQuickWindow *win);
140
+ void handleWindowHidden(QQuickWindow *win);
141
+
142
+ // utility functions that used to be in QQuickPointerEvent et al.
143
+ bool allUpdatedPointsAccepted(const QPointerEvent *ev);
144
+ static void localizePointerEvent(QPointerEvent *ev, const QQuickItem *dest);
145
+ QList<QObject *> exclusiveGrabbers(QPointerEvent *ev);
146
+ static bool anyPointGrabbed(const QPointerEvent *ev);
147
+ static bool allPointsGrabbed(const QPointerEvent *ev);
148
+ static bool isMouseEvent(const QPointerEvent *ev);
149
+ static bool isMouseOrWheelEvent(const QPointerEvent *ev);
150
+ static bool isHoverEvent(const QPointerEvent *ev);
151
+ static bool isTouchEvent(const QPointerEvent *ev);
152
+ static bool isTabletEvent(const QPointerEvent *ev);
153
+ static bool isEventFromMouseOrTouchpad(const QPointerEvent *ev);
154
+ static bool isSynthMouse(const QPointerEvent *ev);
155
+ static bool isWithinDoubleClickInterval(ulong timeInterval);
156
+ static bool isWithinDoubleTapDistance(const QPoint &distanceBetweenPresses);
157
+ static bool isSinglePointDevice(const QInputDevice *dev);
158
+ static QQuickPointingDeviceExtra *deviceExtra(const QInputDevice *device);
159
+
160
+ // delivery of pointer events:
161
+ void touchToMouseEvent(QEvent::Type type, const QEventPoint &p, const QTouchEvent *touchEvent, QMutableSinglePointEvent *mouseEvent);
162
+ void ensureDeviceConnected(const QPointingDevice *dev);
163
+ void deliverPointerEvent(QPointerEvent *);
164
+ bool deliverTouchCancelEvent(QTouchEvent *);
165
+ bool deliverPressOrReleaseEvent(QPointerEvent *, bool handlersOnly = false);
166
+ void deliverUpdatedPoints(QPointerEvent *event);
167
+ void deliverMatchingPointsToItem(QQuickItem *item, bool isGrabber, QPointerEvent *pointerEvent, bool handlersOnly = false);
168
+
169
+ QVector<QQuickItem *> pointerTargets(QQuickItem *, const QPointerEvent *event, const QEventPoint &point,
170
+ bool checkMouseButtons, bool checkAcceptsTouch) const;
171
+ QVector<QQuickItem *> mergePointerTargets(const QVector<QQuickItem *> &list1, const QVector<QQuickItem *> &list2) const;
172
+
173
+ // hover delivery
174
+ enum class HoverChange : uint8_t {
175
+ Clear,
176
+ Set,
177
+ };
178
+ bool deliverHoverEvent(const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, ulong timestamp);
179
+ bool deliverHoverEventRecursive(QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, ulong timestamp);
180
+ bool deliverHoverEventToItem(QQuickItem *item, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, ulong timestamp,
181
+ HoverChange hoverChange);
182
+ bool sendHoverEvent(QEvent::Type, QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos,
183
+ Qt::KeyboardModifiers modifiers, ulong timestamp);
184
+ bool clearHover(ulong timestamp = 0);
185
+
186
+ #if QT_CONFIG(quick_draganddrop)
187
+ void deliverDragEvent(QQuickDragGrabber *, QEvent *);
188
+ bool deliverDragEvent(QQuickDragGrabber *, QQuickItem *, QDragMoveEvent *,
189
+ QVarLengthArray<QQuickItem *, 64> *currentGrabItems = nullptr,
190
+ QObject *formerTarget = nullptr);
191
+ #endif
192
+
193
+ static bool dragOverThreshold(qreal d, Qt::Axis axis, QMouseEvent *event, int startDragThreshold = -1);
194
+
195
+ static bool dragOverThreshold(qreal d, Qt::Axis axis, const QEventPoint &tp, int startDragThreshold = -1);
196
+
197
+ static bool dragOverThreshold(QVector2D delta);
198
+ };
199
+
200
+ Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickDeliveryAgentPrivate::FocusOptions)
201
+
202
+ QT_END_NAMESPACE
203
+
204
+ #endif // QQUICKDELIVERYAGENT_P_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomobjectdata_p.h ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DESIGNERCUSTOMOBJECTDATA_H
5
+ #define DESIGNERCUSTOMOBJECTDATA_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 "qquickdesignersupport_p.h"
19
+
20
+ #include <QHash>
21
+ #include <QObject>
22
+ #include <QVariant>
23
+
24
+ #include <private/qqmlanybinding_p.h>
25
+
26
+ QT_BEGIN_NAMESPACE
27
+ class QQmlContext;
28
+
29
+ class QQuickDesignerCustomObjectData
30
+ {
31
+ public:
32
+ static void registerData(QObject *object);
33
+ static QQuickDesignerCustomObjectData *get(QObject *object);
34
+ static QVariant getResetValue(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName);
35
+ static void doResetProperty(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName);
36
+ static bool hasValidResetBinding(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName);
37
+ static bool hasBindingForProperty(QObject *object,
38
+ QQmlContext *context,
39
+ const QQuickDesignerSupport::PropertyName &propertyName,
40
+ bool *hasChanged);
41
+ static void setPropertyBinding(QObject *object,
42
+ QQmlContext *context,
43
+ const QQuickDesignerSupport::PropertyName &propertyName,
44
+ const QString &expression);
45
+ static void keepBindingFromGettingDeleted(QObject *object,
46
+ QQmlContext *context,
47
+ const QQuickDesignerSupport::PropertyName &propertyName);
48
+ void handleDestroyed();
49
+
50
+ private:
51
+ QQuickDesignerCustomObjectData(QObject *object);
52
+ void populateResetHashes();
53
+ QObject *object() const;
54
+ QVariant getResetValue(const QQuickDesignerSupport::PropertyName &propertyName) const;
55
+ void doResetProperty(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName);
56
+ bool hasValidResetBinding(const QQuickDesignerSupport::PropertyName &propertyName) const;
57
+ QQmlAnyBinding getResetBinding(const QQuickDesignerSupport::PropertyName &propertyName) const;
58
+ bool hasBindingForProperty(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName, bool *hasChanged) const;
59
+ void setPropertyBinding(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName, const QString &expression);
60
+ void keepBindingFromGettingDeleted(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName);
61
+
62
+ QObject *m_object;
63
+ QHash<QQuickDesignerSupport::PropertyName, QVariant> m_resetValueHash;
64
+ QHash<QQuickDesignerSupport::PropertyName, QQmlAnyBinding> m_resetBindingHash;
65
+ mutable QHash<QQuickDesignerSupport::PropertyName, bool> m_hasBindingHash;
66
+ };
67
+
68
+ QT_END_NAMESPACE
69
+
70
+ #endif // DESIGNERCUSTOMOBJECTDATA_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomparserobject_p.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QUICKDESIGNERCUSTOMPARSEROBJECT_H
5
+ #define QUICKDESIGNERCUSTOMPARSEROBJECT_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 <QObject>
19
+ #include <private/qqmlcustomparser_p.h>
20
+
21
+ QT_BEGIN_NAMESPACE
22
+
23
+ class QQuickDesignerCustomParserObject : public QObject
24
+ {
25
+ Q_OBJECT
26
+
27
+ public:
28
+ QQuickDesignerCustomParserObject();
29
+ };
30
+
31
+ class QQuickDesignerCustomParser : public QQmlCustomParser
32
+ {
33
+ public:
34
+ QQuickDesignerCustomParser()
35
+ : QQmlCustomParser(AcceptsAttachedProperties | AcceptsSignalHandlers) {}
36
+
37
+ void verifyBindings(const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &props) override;
38
+ void applyBindings(QObject *obj, const QQmlRefPointer<QV4::ExecutableCompilationUnit> &compilationUnit, const QList<const QV4::CompiledData::Binding *> &bindings) override;
39
+ };
40
+
41
+ QT_END_NAMESPACE
42
+
43
+ #endif // QUICKDESIGNERCUSTOMPARSEROBJECT_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupport_p.h ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2021 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 DESIGNERSUPPORT_H
5
+ #define DESIGNERSUPPORT_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 <QtQuick/qtquickglobal.h>
19
+ #include <QtCore/QtGlobal>
20
+ #include <QtCore/QHash>
21
+ #include <QtCore/QRectF>
22
+ #include <QtCore/private/qglobal_p.h>
23
+
24
+ QT_BEGIN_NAMESPACE
25
+
26
+ class QQuickItem;
27
+ class QSGLayer;
28
+ class QImage;
29
+ class QTransform;
30
+ class QQmlContext;
31
+ class QQuickView;
32
+ class QObject;
33
+ class QQuickWindow;
34
+
35
+ class Q_QUICK_EXPORT QQuickDesignerSupport
36
+ {
37
+ public:
38
+ typedef QByteArray PropertyName;
39
+ typedef QList<PropertyName> PropertyNameList;
40
+ typedef QByteArray TypeName;
41
+
42
+ enum DirtyType {
43
+ TransformOrigin = 0x00000001,
44
+ Transform = 0x00000002,
45
+ BasicTransform = 0x00000004,
46
+ Position = 0x00000008,
47
+ Size = 0x00000010,
48
+
49
+ ZValue = 0x00000020,
50
+ Content = 0x00000040,
51
+ Smooth = 0x00000080,
52
+ OpacityValue = 0x00000100,
53
+ ChildrenChanged = 0x00000200,
54
+ ChildrenStackingChanged = 0x00000400,
55
+ ParentChanged = 0x00000800,
56
+
57
+ Clip = 0x00001000,
58
+ Window = 0x00002000,
59
+
60
+ EffectReference = 0x00008000,
61
+ Visible = 0x00010000,
62
+ HideReference = 0x00020000,
63
+
64
+ TransformUpdateMask = TransformOrigin | Transform | BasicTransform | Position | Size | Window,
65
+ ComplexTransformUpdateMask = Transform | Window,
66
+ ContentUpdateMask = Size | Content | Smooth | Window,
67
+ ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference | Window,
68
+ AllMask = TransformUpdateMask | ContentUpdateMask | ChildrenUpdateMask
69
+ };
70
+
71
+
72
+ QQuickDesignerSupport();
73
+ ~QQuickDesignerSupport();
74
+
75
+ void refFromEffectItem(QQuickItem *referencedItem, bool hide = true);
76
+ void derefFromEffectItem(QQuickItem *referencedItem, bool unhide = true);
77
+
78
+ QImage renderImageForItem(QQuickItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize);
79
+
80
+ static bool isDirty(QQuickItem *referencedItem, DirtyType dirtyType);
81
+ static void addDirty(QQuickItem *referencedItem, DirtyType dirtyType);
82
+ static void resetDirty(QQuickItem *referencedItem);
83
+
84
+ static QTransform windowTransform(QQuickItem *referencedItem);
85
+ static QTransform parentTransform(QQuickItem *referencedItem);
86
+
87
+ static bool isAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem);
88
+ static bool areChildrenAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem);
89
+ static bool hasAnchor(QQuickItem *item, const QString &name);
90
+ static QQuickItem *anchorFillTargetItem(QQuickItem *item);
91
+ static QQuickItem *anchorCenterInTargetItem(QQuickItem *item);
92
+ static QPair<QString, QObject*> anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context);
93
+ static void resetAnchor(QQuickItem *item, const QString &name);
94
+ static void emitComponentCompleteSignalForAttachedProperty(QObject *item);
95
+
96
+ static QList<QObject*> statesForItem(QQuickItem *item);
97
+
98
+ static bool isComponentComplete(QQuickItem *item);
99
+
100
+ static int borderWidth(QQuickItem *item);
101
+
102
+ static void refreshExpressions(QQmlContext *context);
103
+
104
+ static void setRootItem(QQuickView *view, QQuickItem *item);
105
+
106
+ static bool isValidWidth(QQuickItem *item);
107
+ static bool isValidHeight(QQuickItem *item);
108
+
109
+ static void updateDirtyNode(QQuickItem *item);
110
+
111
+ static void activateDesignerMode();
112
+
113
+ static void disableComponentComplete();
114
+ static void enableComponentComplete();
115
+
116
+ static void polishItems(QQuickWindow *window);
117
+
118
+ private:
119
+ QHash<QQuickItem*, QSGLayer*> m_itemTextureHash;
120
+ };
121
+
122
+ class Q_QUICK_EXPORT ComponentCompleteDisabler
123
+ {
124
+ public:
125
+ ComponentCompleteDisabler();
126
+
127
+ ~ComponentCompleteDisabler();
128
+ };
129
+
130
+ typedef QQuickDesignerSupport DesignerSupport;
131
+
132
+ QT_END_NAMESPACE
133
+
134
+ #endif // DESIGNERSUPPORT_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportitems_p.h ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DESIGNERSUPPORTITEM_H
5
+ #define DESIGNERSUPPORTITEM_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 "qquickdesignersupport_p.h"
19
+
20
+ #include <QObject>
21
+ #include <QString>
22
+ #include <QVariant>
23
+ #include <QList>
24
+ #include <QByteArray>
25
+ #include <QTypeRevision>
26
+ #include <QQmlContext>
27
+ #include <QQmlListReference>
28
+
29
+ QT_BEGIN_NAMESPACE
30
+
31
+ class Q_QUICK_EXPORT QQuickDesignerSupportItems
32
+ {
33
+ public:
34
+ static QObject *createPrimitive(const QString &typeName, QTypeRevision version, QQmlContext *context);
35
+ static QObject *createComponent(const QUrl &componentUrl, QQmlContext *context);
36
+ static void tweakObjects(QObject *object);
37
+ static bool objectWasDeleted(QObject *object);
38
+ static void disableNativeTextRendering(QQuickItem *item);
39
+ static void disableTextCursor(QQuickItem *item);
40
+ static void disableTransition(QObject *object);
41
+ static void disableBehaivour(QObject *object);
42
+ static void stopUnifiedTimer();
43
+ static void registerFixResourcePathsForObjectCallBack(void (*callback)(QObject *));
44
+ };
45
+
46
+ QT_END_NAMESPACE
47
+
48
+ #endif // DESIGNERSUPPORTITEM_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportmetainfo_p.h ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DESIGNERSUPPORTMETAINFO_H
5
+ #define DESIGNERSUPPORTMETAINFO_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 "qquickdesignersupport_p.h"
19
+
20
+ #include <QObject>
21
+ #include <QByteArray>
22
+
23
+ QT_BEGIN_NAMESPACE
24
+
25
+ class Q_QUICK_EXPORT QQuickDesignerSupportMetaInfo
26
+ {
27
+ public:
28
+ static bool isSubclassOf(QObject *object, const QByteArray &superTypeName);
29
+ static void registerNotifyPropertyChangeCallBack(void (*callback)(QObject *, const QQuickDesignerSupport::PropertyName &));
30
+ static void registerMockupObject(const char *uri, int versionMajor, int versionMinor, const char *qmlName);
31
+ };
32
+
33
+ QT_END_NAMESPACE
34
+
35
+ #endif // DESIGNERSUPPORTMETAINFO_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportproperties_p.h ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DESIGNERSUPPORTPROPERTIES_H
5
+ #define DESIGNERSUPPORTPROPERTIES_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 "qquickdesignersupport_p.h"
19
+
20
+ #include <QObject>
21
+ #include <QString>
22
+ #include <QVariant>
23
+ #include <QList>
24
+ #include <QByteArray>
25
+ #include <QQmlContext>
26
+ #include <QQmlListReference>
27
+
28
+ QT_BEGIN_NAMESPACE
29
+
30
+ class Q_QUICK_EXPORT QQuickDesignerSupportProperties
31
+ {
32
+ public:
33
+ static void createNewDynamicProperty(QObject *object, QQmlEngine *engine, const QString &name);
34
+ static void registerNodeInstanceMetaObject(QObject *object, QQmlEngine *engine);
35
+ static void registerCustomData(QObject *object);
36
+ static QVariant getResetValue(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName);
37
+ static void doResetProperty(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName);
38
+ static bool hasValidResetBinding(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName);
39
+
40
+ static bool hasBindingForProperty(QObject *object,
41
+ QQmlContext *context,
42
+ const QQuickDesignerSupport::PropertyName &propertyName,
43
+ bool *hasChanged);
44
+ static void setPropertyBinding(QObject *object,
45
+ QQmlContext *context,
46
+ const QQuickDesignerSupport::PropertyName &propertyName,
47
+ const QString &expression);
48
+ static void keepBindingFromGettingDeleted(QObject *object,
49
+ QQmlContext *context,
50
+ const QQuickDesignerSupport::PropertyName &propertyName);
51
+
52
+ static bool isPropertyQObject(const QMetaProperty &metaProperty);
53
+ static QObject *readQObjectProperty(const QMetaProperty &metaProperty, QObject *object);
54
+
55
+ static void getPropertyCache(QObject *object);
56
+ static bool isPropertyBlackListed(const QQuickDesignerSupport::PropertyName &propertyName);
57
+ static QQuickDesignerSupport::PropertyNameList propertyNameListForWritableProperties(QObject *object);
58
+ static QQuickDesignerSupport::PropertyNameList allPropertyNames(QObject *object,
59
+ const QQuickDesignerSupport::PropertyName &baseName = QQuickDesignerSupport::PropertyName(),
60
+ QObjectList *inspectedObjects = nullptr,
61
+ int depth = 0);
62
+ static bool hasFullImplementedListInterface(const QQmlListReference &list);
63
+ };
64
+
65
+ QT_END_NAMESPACE
66
+
67
+ #endif // DESIGNERSUPPORTPROPERTIES_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportpropertychanges_p.h ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DESIGNERSUPPORTPROPERTYCHANGES_H
5
+ #define DESIGNERSUPPORTPROPERTYCHANGES_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 "qquickdesignersupport_p.h"
19
+
20
+ #include <QVariant>
21
+
22
+ QT_BEGIN_NAMESPACE
23
+
24
+ class Q_QUICK_EXPORT QQuickDesignerSupportPropertyChanges
25
+ {
26
+ public:
27
+ static void detachFromState(QObject *propertyChanges);
28
+ static void attachToState(QObject *propertyChanges);
29
+ static QObject *targetObject(QObject *propertyChanges);
30
+ static void removeProperty(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName);
31
+ static QVariant getProperty(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName);
32
+ static void changeValue(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName, const QVariant &value);
33
+ static void changeExpression(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName, const QString &expression);
34
+ static QObject *stateObject(QObject *propertyChanges);
35
+ static bool isNormalProperty(const QQuickDesignerSupport::PropertyName &propertyName);
36
+ };
37
+
38
+ QT_END_NAMESPACE
39
+
40
+ #endif // DESIGNERSUPPORTPROPERTYCHANGES_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportstates_p.h ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 DESIGNERSUPPORTSTATES_H
5
+ #define DESIGNERSUPPORTSTATES_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 "qquickdesignersupport_p.h"
19
+
20
+ #include <QVariant>
21
+
22
+ QT_BEGIN_NAMESPACE
23
+
24
+ class Q_QUICK_EXPORT QQuickDesignerSupportStates
25
+ {
26
+ public:
27
+ static bool isStateActive(QObject *object, QQmlContext *context);
28
+ static void activateState(QObject *object, QQmlContext *context);
29
+ static void deactivateState(QObject *object);
30
+ static bool changeValueInRevertList(QObject *state,
31
+ QObject *target,
32
+ const QQuickDesignerSupport::PropertyName &propertyName,
33
+ const QVariant &value);
34
+
35
+ static bool updateStateBinding(QObject *state, QObject *target,
36
+ const QQuickDesignerSupport::PropertyName &propertyName,
37
+ const QString &expression);
38
+
39
+ static bool resetStateProperty(QObject *state, QObject *target,
40
+ const QQuickDesignerSupport::PropertyName &propertyName,
41
+ const QVariant &);
42
+ };
43
+
44
+ QT_END_NAMESPACE
45
+
46
+ #endif // DESIGNERSUPPORTSTATES_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p.h ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKDRAG_P_H
5
+ #define QQUICKDRAG_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 <QtQuick/qquickitem.h>
19
+
20
+ #include <private/qintrusivelist_p.h>
21
+ #include <private/qqmlguard_p.h>
22
+ #include <private/qtquickglobal_p.h>
23
+
24
+ #include <QtCore/qmimedata.h>
25
+ #include <QtCore/qstringlist.h>
26
+ #include <QtCore/qurl.h>
27
+
28
+ QT_REQUIRE_CONFIG(quick_draganddrop);
29
+
30
+ QT_BEGIN_NAMESPACE
31
+
32
+ class QQuickItem;
33
+ class QQuickDrag;
34
+
35
+ class QQuickDragGrabber
36
+ {
37
+ class Item : public QQmlGuard<QQuickItem>
38
+ {
39
+ public:
40
+ Item(QQuickItem *item) : QQmlGuard<QQuickItem>(Item::objectDestroyedImpl, item) {}
41
+
42
+ QIntrusiveListNode node;
43
+ private:
44
+ static void objectDestroyedImpl(QQmlGuardImpl *guard) { delete static_cast<Item *>(guard); }
45
+ };
46
+
47
+ typedef QIntrusiveList<Item, &Item::node> ItemList;
48
+
49
+ public:
50
+ QQuickDragGrabber() : m_target(nullptr) {}
51
+ ~QQuickDragGrabber() { while (!m_items.isEmpty()) delete m_items.first(); }
52
+
53
+
54
+ QObject *target() const
55
+ {
56
+ if (m_target)
57
+ return m_target;
58
+ else if (!m_items.isEmpty())
59
+ return *m_items.first();
60
+ else
61
+ return nullptr;
62
+ }
63
+ void setTarget(QObject *target) { m_target = target; }
64
+ void resetTarget() { m_target = nullptr; }
65
+
66
+ bool isEmpty() const { return m_items.isEmpty(); }
67
+
68
+ typedef ItemList::iterator iterator;
69
+ iterator begin() { return m_items.begin(); }
70
+ iterator end() { return m_items.end(); }
71
+
72
+ void grab(QQuickItem *item) { m_items.insert(new Item(item)); }
73
+ iterator release(iterator at) { Item *item = *at; at = at.erase(); delete item; return at; }
74
+
75
+ auto& ignoreList() { return m_ignoreDragItems; }
76
+
77
+ private:
78
+
79
+ ItemList m_items;
80
+ QVarLengthArray<QQuickItem *, 4> m_ignoreDragItems;
81
+ QObject *m_target;
82
+ };
83
+
84
+ class QQuickDropEventEx : public QDropEvent
85
+ {
86
+ public:
87
+ void setProposedAction(Qt::DropAction action) { m_defaultAction = action; m_dropAction = action; }
88
+
89
+ static void setProposedAction(QDropEvent *event, Qt::DropAction action) {
90
+ static_cast<QQuickDropEventEx *>(event)->setProposedAction(action);
91
+ }
92
+
93
+ void copyActions(const QDropEvent &from) {
94
+ m_defaultAction = from.proposedAction(); m_dropAction = from.dropAction(); }
95
+
96
+ static void copyActions(QDropEvent *to, const QDropEvent &from) {
97
+ static_cast<QQuickDropEventEx *>(to)->copyActions(from);
98
+ }
99
+ };
100
+
101
+ class QQuickDragMimeData : public QMimeData
102
+ {
103
+ Q_OBJECT
104
+ public:
105
+ QQuickDragMimeData()
106
+ : m_source(nullptr)
107
+ {
108
+ }
109
+
110
+ QStringList keys() const { return m_keys; }
111
+ QObject *source() const { return m_source; }
112
+
113
+ private:
114
+ QObject *m_source;
115
+ Qt::DropActions m_supportedActions;
116
+ QStringList m_keys;
117
+
118
+ friend class QQuickDragAttached;
119
+ friend class QQuickDragAttachedPrivate;
120
+ };
121
+
122
+ class QQuickDragAttached;
123
+ class Q_QUICK_EXPORT QQuickDrag : public QObject
124
+ {
125
+ Q_OBJECT
126
+
127
+ Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged RESET resetTarget FINAL)
128
+ Q_PROPERTY(Axis axis READ axis WRITE setAxis NOTIFY axisChanged FINAL FINAL)
129
+ Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin NOTIFY minimumXChanged FINAL)
130
+ Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged FINAL)
131
+ Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged FINAL)
132
+ Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged FINAL)
133
+ Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL)
134
+ Q_PROPERTY(bool filterChildren READ filterChildren WRITE setFilterChildren NOTIFY filterChildrenChanged FINAL)
135
+ Q_PROPERTY(bool smoothed READ smoothed WRITE setSmoothed NOTIFY smoothedChanged FINAL)
136
+ // Note, threshold was added in QtQuick 2.2 but REVISION is not supported (or needed) for grouped
137
+ // properties See QTBUG-33179
138
+ Q_PROPERTY(qreal threshold READ threshold WRITE setThreshold NOTIFY thresholdChanged RESET resetThreshold FINAL)
139
+ //### consider drag and drop
140
+
141
+ QML_NAMED_ELEMENT(Drag)
142
+ QML_ADDED_IN_VERSION(2, 0)
143
+ QML_UNCREATABLE("Drag is only available via attached properties.")
144
+ QML_ATTACHED(QQuickDragAttached)
145
+
146
+ public:
147
+ QQuickDrag(QObject *parent=nullptr);
148
+ ~QQuickDrag();
149
+
150
+ enum DragType { None, Automatic, Internal };
151
+ Q_ENUM(DragType)
152
+
153
+ QQuickItem *target() const;
154
+ void setTarget(QQuickItem *target);
155
+ void resetTarget();
156
+
157
+ enum Axis { XAxis=0x01, YAxis=0x02, XAndYAxis=0x03, XandYAxis=XAndYAxis };
158
+ Q_ENUM(Axis)
159
+ Axis axis() const;
160
+ void setAxis(Axis);
161
+
162
+ qreal xmin() const;
163
+ void setXmin(qreal);
164
+ qreal xmax() const;
165
+ void setXmax(qreal);
166
+ qreal ymin() const;
167
+ void setYmin(qreal);
168
+ qreal ymax() const;
169
+ void setYmax(qreal);
170
+
171
+ bool smoothed() const;
172
+ void setSmoothed(bool smooth);
173
+
174
+ qreal threshold() const;
175
+ void setThreshold(qreal);
176
+ void resetThreshold();
177
+
178
+ bool active() const;
179
+ void setActive(bool);
180
+
181
+ bool filterChildren() const;
182
+ void setFilterChildren(bool);
183
+
184
+ static QQuickDragAttached *qmlAttachedProperties(QObject *obj);
185
+
186
+ Q_SIGNALS:
187
+ void targetChanged();
188
+ void axisChanged();
189
+ void minimumXChanged();
190
+ void maximumXChanged();
191
+ void minimumYChanged();
192
+ void maximumYChanged();
193
+ void activeChanged();
194
+ void filterChildrenChanged();
195
+ void smoothedChanged();
196
+ void thresholdChanged();
197
+
198
+ private:
199
+ QQuickItem *_target;
200
+ Axis _axis;
201
+ qreal _xmin;
202
+ qreal _xmax;
203
+ qreal _ymin;
204
+ qreal _ymax;
205
+ bool _active : 1;
206
+ bool _filterChildren: 1;
207
+ bool _smoothed : 1;
208
+ qreal _threshold;
209
+ Q_DISABLE_COPY(QQuickDrag)
210
+ };
211
+
212
+ class QQuickDragAttachedPrivate;
213
+ class Q_QUICK_EXPORT QQuickDragAttached : public QObject
214
+ {
215
+ Q_OBJECT
216
+ Q_DECLARE_PRIVATE(QQuickDragAttached)
217
+
218
+ Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
219
+ Q_PROPERTY(QObject *source READ source WRITE setSource NOTIFY sourceChanged RESET resetSource FINAL)
220
+ Q_PROPERTY(QObject *target READ target NOTIFY targetChanged FINAL)
221
+ Q_PROPERTY(QPointF hotSpot READ hotSpot WRITE setHotSpot NOTIFY hotSpotChanged FINAL)
222
+ Q_PROPERTY(QUrl imageSource READ imageSource WRITE setImageSource NOTIFY imageSourceChanged FINAL)
223
+ // imageSourceSize is new in Qt 6.8; revision omitted because of QTBUG-33179
224
+ Q_PROPERTY(QSize imageSourceSize READ imageSourceSize WRITE setImageSourceSize NOTIFY imageSourceSizeChanged FINAL)
225
+ Q_PROPERTY(QStringList keys READ keys WRITE setKeys NOTIFY keysChanged FINAL)
226
+ Q_PROPERTY(QVariantMap mimeData READ mimeData WRITE setMimeData NOTIFY mimeDataChanged FINAL)
227
+ Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions WRITE setSupportedActions NOTIFY supportedActionsChanged FINAL)
228
+ Q_PROPERTY(Qt::DropAction proposedAction READ proposedAction WRITE setProposedAction NOTIFY proposedActionChanged FINAL)
229
+ Q_PROPERTY(QQuickDrag::DragType dragType READ dragType WRITE setDragType NOTIFY dragTypeChanged FINAL)
230
+
231
+ QML_ANONYMOUS
232
+ QML_ADDED_IN_VERSION(2, 0)
233
+
234
+ public:
235
+ QQuickDragAttached(QObject *parent);
236
+ ~QQuickDragAttached();
237
+
238
+ bool isActive() const;
239
+ void setActive(bool active);
240
+
241
+ QObject *source() const;
242
+ void setSource(QObject *item);
243
+ void resetSource();
244
+
245
+ QObject *target() const;
246
+
247
+ QPointF hotSpot() const;
248
+ void setHotSpot(const QPointF &hotSpot);
249
+
250
+ QUrl imageSource() const;
251
+ void setImageSource(const QUrl &url);
252
+
253
+ QSize imageSourceSize() const;
254
+ void setImageSourceSize(const QSize &size);
255
+
256
+ QStringList keys() const;
257
+ void setKeys(const QStringList &keys);
258
+
259
+ QVariantMap mimeData() const;
260
+ void setMimeData(const QVariantMap &mimeData);
261
+
262
+ Qt::DropActions supportedActions() const;
263
+ void setSupportedActions(Qt::DropActions actions);
264
+
265
+ Qt::DropAction proposedAction() const;
266
+ void setProposedAction(Qt::DropAction action);
267
+
268
+ QQuickDrag::DragType dragType() const;
269
+ void setDragType(QQuickDrag::DragType dragType);
270
+
271
+ Q_INVOKABLE int drop();
272
+
273
+ bool event(QEvent *event) override;
274
+
275
+ public Q_SLOTS:
276
+ void start(QQmlV4FunctionPtr);
277
+ void startDrag(QQmlV4FunctionPtr);
278
+ void cancel();
279
+
280
+ Q_SIGNALS:
281
+ void dragStarted();
282
+ void dragFinished(Qt::DropAction dropAction);
283
+
284
+ void activeChanged();
285
+ void sourceChanged();
286
+ void targetChanged();
287
+ void hotSpotChanged();
288
+ void imageSourceChanged();
289
+ void imageSourceSizeChanged(); // new in Qt 6.8
290
+ void keysChanged();
291
+ void mimeDataChanged();
292
+ void supportedActionsChanged();
293
+ void proposedActionChanged();
294
+ void dragTypeChanged();
295
+ };
296
+
297
+ QT_END_NAMESPACE
298
+
299
+ #endif
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p_p.h ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2022 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 QQUICKDRAG_P_P_H
5
+ #define QQUICKDRAG_P_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 "qquickdrag_p.h"
19
+
20
+ #include <QtCore/qobject.h>
21
+ #include <QtCore/private/qobject_p.h>
22
+ #include <QtCore/qpointer.h>
23
+ #include <QtCore/qurl.h>
24
+ #include <QtCore/qvariant.h>
25
+
26
+ #include <QtQuick/qquickitem.h>
27
+ #include <QtQuick/private/qquickitemchangelistener_p.h>
28
+ #include <QtQuick/private/qquickpixmap_p.h>
29
+
30
+ QT_BEGIN_NAMESPACE
31
+
32
+ class Q_AUTOTEST_EXPORT QQuickDragAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener
33
+ {
34
+ Q_DECLARE_PUBLIC(QQuickDragAttached)
35
+ QML_ANONYMOUS
36
+ QML_ADDED_IN_VERSION(2, 0)
37
+
38
+ public:
39
+ static QQuickDragAttachedPrivate *get(QQuickDragAttached *attached) {
40
+ return static_cast<QQuickDragAttachedPrivate *>(QObjectPrivate::get(attached)); }
41
+
42
+ QQuickDragAttachedPrivate()
43
+ : attachedItem(nullptr)
44
+ , mimeData(nullptr)
45
+ , proposedAction(Qt::MoveAction)
46
+ , supportedActions(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction)
47
+ , active(false)
48
+ , listening(false)
49
+ , inEvent(false)
50
+ , dragRestarted(false)
51
+ , itemMoved(false)
52
+ , eventQueued(false)
53
+ , overrideActions(false)
54
+ , dragType(QQuickDrag::Internal)
55
+ {
56
+ }
57
+
58
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
59
+ void itemParentChanged(QQuickItem *, QQuickItem *parent) override;
60
+ void updatePosition();
61
+ void restartDrag();
62
+ void deliverEnterEvent();
63
+ void deliverMoveEvent();
64
+ void deliverLeaveEvent();
65
+ void deliverEvent(QQuickWindow *window, QEvent *event);
66
+ void start(Qt::DropActions supportedActions);
67
+ Qt::DropAction startDrag(Qt::DropActions supportedActions);
68
+ void setTarget(QQuickItem *item);
69
+ QMimeData *createMimeData() const;
70
+ void loadPixmap();
71
+
72
+ QQuickDragGrabber dragGrabber;
73
+
74
+ QPointer<QObject> source;
75
+ QPointer<QObject> target;
76
+ QPointer<QQuickWindow> window;
77
+ QQuickItem *attachedItem;
78
+ QQuickDragMimeData *mimeData;
79
+ Qt::DropAction proposedAction;
80
+ Qt::DropActions supportedActions;
81
+ bool active : 1;
82
+ bool listening : 1;
83
+ bool inEvent : 1;
84
+ bool dragRestarted : 1;
85
+ bool itemMoved : 1;
86
+ bool eventQueued : 1;
87
+ bool overrideActions : 1;
88
+ QPointF hotSpot;
89
+ QUrl imageSource;
90
+ QSize imageSourceSize;
91
+ QQuickPixmap pixmapLoader;
92
+ QStringList keys;
93
+ QVariantMap externalMimeData;
94
+ QQuickDrag::DragType dragType;
95
+ };
96
+
97
+ QT_END_NAMESPACE
98
+
99
+ #endif
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdragaxis_p.h ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2019 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 QQUICKDRAGAXIS_P_H
5
+ #define QQUICKDRAGAXIS_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 <QtQml/qqml.h>
19
+ #include <QtQml/qqmlproperty.h>
20
+ #include <private/qtquickglobal_p.h>
21
+
22
+ QT_BEGIN_NAMESPACE
23
+
24
+ class QQuickItem;
25
+ class QQuickPointerHandler;
26
+
27
+ class Q_QUICK_EXPORT QQuickDragAxis : public QObject
28
+ {
29
+ Q_OBJECT
30
+ Q_PROPERTY(qreal minimum READ minimum WRITE setMinimum NOTIFY minimumChanged)
31
+ Q_PROPERTY(qreal maximum READ maximum WRITE setMaximum NOTIFY maximumChanged)
32
+ Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
33
+ Q_PROPERTY(qreal activeValue READ activeValue NOTIFY activeValueChanged REVISION(6, 5))
34
+ QML_NAMED_ELEMENT(DragAxis)
35
+ QML_ADDED_IN_VERSION(2, 12)
36
+ QML_UNCREATABLE("DragAxis is only available as a grouped property of DragHandler or PinchHandler.")
37
+
38
+ public:
39
+ QQuickDragAxis(QQuickPointerHandler *handler, const QString &propertyName,
40
+ qreal initValue = 0);
41
+
42
+ qreal minimum() const { return m_minimum; }
43
+ void setMinimum(qreal minimum);
44
+
45
+ qreal maximum() const { return m_maximum; }
46
+ void setMaximum(qreal maximum);
47
+
48
+ bool enabled() const { return m_enabled; }
49
+ void setEnabled(bool enabled);
50
+
51
+ qreal activeValue() const { return m_activeValue; }
52
+
53
+ qreal persistentValue() const { return m_accumulatedValue; }
54
+
55
+ protected:
56
+ void onActiveChanged(bool active, qreal initActiveValue);
57
+ qreal targetValue();
58
+ void updateValue(qreal activeValue, qreal accumulatedValue, qreal delta = 0);
59
+
60
+ Q_SIGNALS:
61
+ void minimumChanged();
62
+ void maximumChanged();
63
+ void enabledChanged();
64
+ Q_REVISION(6, 5) void activeValueChanged(qreal delta);
65
+
66
+ private:
67
+ qreal m_minimum = std::numeric_limits<qreal>::lowest();
68
+ qreal m_maximum = std::numeric_limits<qreal>::max();
69
+ qreal m_startValue = 0;
70
+ qreal m_activeValue = 0;
71
+ qreal m_accumulatedValue = 0;
72
+ QString m_propertyName;
73
+ bool m_enabled = true;
74
+
75
+ friend class QQuickDragHandler;
76
+ friend class QQuickPinchHandler;
77
+ };
78
+
79
+ QT_END_NAMESPACE
80
+
81
+ #endif // QQUICKDRAGAXIS_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdraghandler_p.h ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2018 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 QQUICKDRAGHANDLER_H
5
+ #define QQUICKDRAGHANDLER_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 "qquickmultipointhandler_p.h"
19
+ #include "qquickdragaxis_p.h"
20
+
21
+ QT_BEGIN_NAMESPACE
22
+
23
+ using namespace Qt::StringLiterals;
24
+
25
+ class Q_QUICK_EXPORT QQuickDragHandler : public QQuickMultiPointHandler
26
+ {
27
+ Q_OBJECT
28
+ Q_PROPERTY(QQuickDragAxis * xAxis READ xAxis CONSTANT)
29
+ Q_PROPERTY(QQuickDragAxis * yAxis READ yAxis CONSTANT)
30
+ #if QT_DEPRECATED_SINCE(6, 2)
31
+ Q_PROPERTY(QVector2D translation READ translation NOTIFY translationChanged)
32
+ #endif
33
+ Q_PROPERTY(QVector2D activeTranslation READ activeTranslation NOTIFY translationChanged REVISION(6, 2))
34
+ Q_PROPERTY(QVector2D persistentTranslation READ persistentTranslation WRITE setPersistentTranslation NOTIFY translationChanged REVISION(6, 2))
35
+ Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged REVISION(2, 14))
36
+ QML_NAMED_ELEMENT(DragHandler)
37
+ QML_ADDED_IN_VERSION(2, 12)
38
+
39
+ public:
40
+ enum SnapMode {
41
+ NoSnap = 0,
42
+ SnapAuto,
43
+ SnapIfPressedOutsideTarget,
44
+ SnapAlways
45
+ };
46
+ Q_ENUM(SnapMode)
47
+
48
+ explicit QQuickDragHandler(QQuickItem *parent = nullptr);
49
+
50
+ void handlePointerEventImpl(QPointerEvent *event) override;
51
+
52
+ QQuickDragAxis *xAxis() { return &m_xAxis; }
53
+ QQuickDragAxis *yAxis() { return &m_yAxis; }
54
+
55
+ #if QT_DEPRECATED_SINCE(6, 2)
56
+ QVector2D translation() const { return activeTranslation(); }
57
+ #endif
58
+ QVector2D activeTranslation() const { return QVector2D(QPointF(m_xAxis.activeValue(), m_yAxis.activeValue())); }
59
+ void setActiveTranslation(const QVector2D &trans);
60
+ QVector2D persistentTranslation() const { return QVector2D(QPointF(m_xAxis.persistentValue(), m_yAxis.persistentValue())); }
61
+ void setPersistentTranslation(const QVector2D &trans);
62
+ QQuickDragHandler::SnapMode snapMode() const;
63
+ void setSnapMode(QQuickDragHandler::SnapMode mode);
64
+
65
+ Q_SIGNALS:
66
+ void translationChanged(QVector2D delta);
67
+ Q_REVISION(2, 14) void snapModeChanged();
68
+
69
+ protected:
70
+ bool wantsPointerEvent(QPointerEvent *event) override;
71
+ void onActiveChanged() override;
72
+ void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *event, QEventPoint &point) override;
73
+
74
+ private:
75
+ void ungrab();
76
+ void enforceAxisConstraints(QPointF *localPos);
77
+ QPointF targetCentroidPosition();
78
+
79
+ private:
80
+ QPointF m_pressTargetPos; // We must also store the local targetPos, because we cannot deduce
81
+ // the press target pos from the scene pos in case there was e.g a
82
+ // flick in one of the ancestors during the drag.
83
+
84
+ QQuickDragAxis m_xAxis = {this, u"x"_s};
85
+ QQuickDragAxis m_yAxis = {this, u"y"_s};
86
+ QQuickDragHandler::SnapMode m_snapMode = SnapAuto;
87
+ bool m_pressedInsideTarget = false;
88
+
89
+ friend class QQuickDragAxis;
90
+ };
91
+
92
+ QT_END_NAMESPACE
93
+
94
+ #endif // QQUICKDRAGHANDLER_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdroparea_p.h ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 QQUICKDROPAREA_P_H
5
+ #define QQUICKDROPAREA_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
+ #include <QtQuick/qquickitem.h>
21
+
22
+ #include <QtGui/qevent.h>
23
+
24
+ QT_REQUIRE_CONFIG(quick_draganddrop);
25
+
26
+ QT_BEGIN_NAMESPACE
27
+
28
+ class QQuickDropAreaPrivate;
29
+ class QQuickDragEvent : public QObject
30
+ {
31
+ Q_OBJECT
32
+ Q_PROPERTY(qreal x READ x FINAL)
33
+ Q_PROPERTY(qreal y READ y FINAL)
34
+ Q_PROPERTY(QObject *source READ source FINAL)
35
+ Q_PROPERTY(QStringList keys READ keys FINAL)
36
+ Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions FINAL)
37
+ Q_PROPERTY(Qt::DropActions proposedAction READ proposedAction FINAL)
38
+ Q_PROPERTY(Qt::DropAction action READ action WRITE setAction RESET resetAction FINAL)
39
+ Q_PROPERTY(bool accepted READ accepted WRITE setAccepted FINAL)
40
+ Q_PROPERTY(bool hasColor READ hasColor FINAL)
41
+ Q_PROPERTY(bool hasHtml READ hasHtml FINAL)
42
+ Q_PROPERTY(bool hasText READ hasText FINAL)
43
+ Q_PROPERTY(bool hasUrls READ hasUrls FINAL)
44
+ Q_PROPERTY(QVariant colorData READ colorData FINAL)
45
+ Q_PROPERTY(QString html READ html FINAL)
46
+ Q_PROPERTY(QString text READ text FINAL)
47
+ Q_PROPERTY(QList<QUrl> urls READ urls FINAL)
48
+ Q_PROPERTY(QStringList formats READ formats FINAL)
49
+ QML_NAMED_ELEMENT(DragEvent)
50
+ QML_UNCREATABLE("DragEvent is only meant to be created by DropArea")
51
+ QML_ADDED_IN_VERSION(2, 0)
52
+ public:
53
+ QQuickDragEvent(QQuickDropAreaPrivate *d, QDropEvent *event) : d(d), event(event) {}
54
+
55
+ qreal x() const { return event->position().x(); }
56
+ qreal y() const { return event->position().y(); }
57
+
58
+ QObject *source() const;
59
+
60
+ Qt::DropActions supportedActions() const { return event->possibleActions(); }
61
+ Qt::DropActions proposedAction() const { return event->proposedAction(); }
62
+ Qt::DropAction action() const { return event->dropAction(); }
63
+ void setAction(Qt::DropAction action) { event->setDropAction(action); }
64
+ void resetAction() { event->setDropAction(event->proposedAction()); }
65
+
66
+ QStringList keys() const;
67
+
68
+ bool accepted() const { return event->isAccepted(); }
69
+ void setAccepted(bool accepted) { event->setAccepted(accepted); }
70
+
71
+ bool hasColor() const;
72
+ bool hasHtml() const;
73
+ bool hasText() const;
74
+ bool hasUrls() const;
75
+ QVariant colorData() const;
76
+ QString html() const;
77
+ QString text() const;
78
+ QList<QUrl> urls() const;
79
+ QStringList formats() const;
80
+
81
+ Q_INVOKABLE QString getDataAsString(const QString &format) const;
82
+ Q_INVOKABLE QByteArray getDataAsArrayBuffer(const QString &format) const;
83
+ Q_INVOKABLE void acceptProposedAction();
84
+ Q_INVOKABLE void accept();
85
+ Q_INVOKABLE void accept(Qt::DropAction action);
86
+
87
+ private:
88
+ QQuickDropAreaPrivate *d;
89
+ QDropEvent *event;
90
+ };
91
+
92
+ class QQuickDropAreaDrag : public QObject
93
+ {
94
+ Q_OBJECT
95
+ Q_PROPERTY(qreal x READ x NOTIFY positionChanged FINAL)
96
+ Q_PROPERTY(qreal y READ y NOTIFY positionChanged FINAL)
97
+ Q_PROPERTY(QObject *source READ source NOTIFY sourceChanged FINAL)
98
+ QML_ANONYMOUS
99
+ QML_ADDED_IN_VERSION(2, 0)
100
+ public:
101
+ QQuickDropAreaDrag(QQuickDropAreaPrivate *d, QObject *parent = nullptr);
102
+ ~QQuickDropAreaDrag();
103
+
104
+ qreal x() const;
105
+ qreal y() const;
106
+ QObject *source() const;
107
+
108
+ Q_SIGNALS:
109
+ void positionChanged();
110
+ void sourceChanged();
111
+
112
+ private:
113
+ QQuickDropAreaPrivate *d;
114
+
115
+ friend class QQuickDropArea;
116
+ friend class QQuickDropAreaPrivate;
117
+ };
118
+
119
+ class QQuickDropAreaPrivate;
120
+ class Q_QUICK_EXPORT QQuickDropArea : public QQuickItem
121
+ {
122
+ Q_OBJECT
123
+ Q_PROPERTY(bool containsDrag READ containsDrag NOTIFY containsDragChanged)
124
+ Q_PROPERTY(QStringList keys READ keys WRITE setKeys NOTIFY keysChanged)
125
+ Q_PROPERTY(QQuickDropAreaDrag *drag READ drag CONSTANT)
126
+ QML_NAMED_ELEMENT(DropArea)
127
+ QML_ADDED_IN_VERSION(2, 0)
128
+
129
+ public:
130
+ QQuickDropArea(QQuickItem *parent=0);
131
+ ~QQuickDropArea();
132
+
133
+ bool containsDrag() const;
134
+ void setContainsDrag(bool drag);
135
+
136
+ QStringList keys() const;
137
+ void setKeys(const QStringList &keys);
138
+
139
+ QQuickDropAreaDrag *drag();
140
+
141
+ Q_SIGNALS:
142
+ void containsDragChanged();
143
+ void keysChanged();
144
+ void sourceChanged();
145
+
146
+ void entered(QQuickDragEvent *drag);
147
+ void exited();
148
+ void positionChanged(QQuickDragEvent *drag);
149
+ void dropped(QQuickDragEvent *drop);
150
+
151
+ protected:
152
+ void dragMoveEvent(QDragMoveEvent *event) override;
153
+ void dragEnterEvent(QDragEnterEvent *event) override;
154
+ void dragLeaveEvent(QDragLeaveEvent *event) override;
155
+ void dropEvent(QDropEvent *event) override;
156
+
157
+ private:
158
+ Q_DISABLE_COPY(QQuickDropArea)
159
+ Q_DECLARE_PRIVATE(QQuickDropArea)
160
+ };
161
+
162
+ QT_END_NAMESPACE
163
+
164
+ #endif // QQUICKDROPAREA_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickevents_p_p.h ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2020 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 QQUICKEVENTS_P_P_H
5
+ #define QQUICKEVENTS_P_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
+ #include <qqml.h>
20
+
21
+ #include <QtCore/qobject.h>
22
+ #include <QtCore/qpointer.h>
23
+ #include <QtGui/qevent.h>
24
+ #include <QtGui/qpointingdevice.h>
25
+ #include <QtGui/qvector2d.h>
26
+ #include <QtQuick/qquickitem.h>
27
+
28
+ #if QT_CONFIG(shortcut)
29
+ # include <QtGui/qkeysequence.h>
30
+ #endif
31
+
32
+ QT_BEGIN_NAMESPACE
33
+
34
+ class QPointingDevice;
35
+ class QPointerEvent;
36
+ class QMouseEvent;
37
+ class QQuickPointerHandler;
38
+
39
+ class Q_QUICK_EXPORT QQuickKeyEvent : public QObject
40
+ {
41
+ Q_OBJECT
42
+ Q_PROPERTY(int key READ key CONSTANT FINAL)
43
+ Q_PROPERTY(QString text READ text CONSTANT FINAL)
44
+ Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL)
45
+ Q_PROPERTY(bool isAutoRepeat READ isAutoRepeat CONSTANT FINAL)
46
+ Q_PROPERTY(int count READ count CONSTANT FINAL)
47
+ Q_PROPERTY(quint32 nativeScanCode READ nativeScanCode CONSTANT FINAL)
48
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
49
+ QML_NAMED_ELEMENT(KeyEvent)
50
+ QML_UNCREATABLE("Should only be used by signal handlers in the Keys attached property")
51
+ QML_ADDED_IN_VERSION(2, 0)
52
+
53
+ public:
54
+ QQuickKeyEvent()
55
+ {}
56
+
57
+ void reset(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers,
58
+ const QString &text = QString(), bool autorep = false, ushort count = 1)
59
+ {
60
+ m_type = type;
61
+ m_key = key;
62
+ m_modifiers = modifiers;
63
+ m_text = text;
64
+ m_autoRepeat = autorep;
65
+ m_count = count;
66
+ setAccepted(false);
67
+ }
68
+
69
+ void reset(const QKeyEvent &ke)
70
+ {
71
+ m_type = ke.type();
72
+ m_key = ke.key();
73
+ m_modifiers = ke.modifiers();
74
+ m_text = ke.text();
75
+ m_autoRepeat = ke.isAutoRepeat();
76
+ m_count = ke.count();
77
+ m_nativeScanCode = ke.nativeScanCode();
78
+ setAccepted(false);
79
+ }
80
+
81
+ int key() const { return m_key; }
82
+ QString text() const { return m_text; }
83
+ int modifiers() const { return m_modifiers; }
84
+ bool isAutoRepeat() const { return m_autoRepeat; }
85
+ int count() const { return m_count; }
86
+ quint32 nativeScanCode() const { return m_nativeScanCode; }
87
+
88
+ bool isAccepted() { return m_accepted; }
89
+ void setAccepted(bool accepted) { m_accepted = accepted; }
90
+
91
+ #if QT_CONFIG(shortcut)
92
+ Q_REVISION(2, 2) Q_INVOKABLE bool matches(QKeySequence::StandardKey key) const;
93
+ #endif
94
+
95
+ private:
96
+ QString m_text;
97
+ quint32 m_nativeScanCode = 0;
98
+ QEvent::Type m_type = QEvent::None;
99
+ int m_key = 0;
100
+ int m_modifiers = 0;
101
+ int m_count = 0;
102
+ bool m_accepted = false;
103
+ bool m_autoRepeat = false;
104
+ };
105
+
106
+ class Q_QUICK_EXPORT QQuickMouseEvent : public QObject
107
+ {
108
+ Q_OBJECT
109
+ Q_PROPERTY(qreal x READ x CONSTANT FINAL)
110
+ Q_PROPERTY(qreal y READ y CONSTANT FINAL)
111
+ Q_PROPERTY(int button READ button CONSTANT FINAL)
112
+ Q_PROPERTY(int buttons READ buttons CONSTANT FINAL)
113
+ Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL)
114
+ #if QT_DEPRECATED_SINCE(6, 6)
115
+ Q_PROPERTY(int source READ source CONSTANT REVISION(2, 7) FINAL)
116
+ #endif
117
+ Q_PROPERTY(bool isClick READ isClick CONSTANT FINAL)
118
+ Q_PROPERTY(bool wasHeld READ wasHeld CONSTANT FINAL)
119
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
120
+ Q_PROPERTY(int flags READ flags CONSTANT REVISION(2, 11) FINAL)
121
+ QML_NAMED_ELEMENT(MouseEvent)
122
+ QML_UNCREATABLE("Should only be used by mouse event signal handlers, for example in MouseArea")
123
+ QML_ADDED_IN_VERSION(2, 0)
124
+
125
+ public:
126
+ QQuickMouseEvent()
127
+ : _wasHeld(false), _isClick(false), _accepted(false)
128
+ {}
129
+
130
+ void reset(qreal x, qreal y, Qt::MouseButton button, Qt::MouseButtons buttons,
131
+ Qt::KeyboardModifiers modifiers, bool isClick = false, bool wasHeld = false,
132
+ Qt::MouseEventFlags flags = { })
133
+ {
134
+ _x = x;
135
+ _y = y;
136
+ _button = button;
137
+ _buttons = buttons;
138
+ _modifiers = modifiers;
139
+ _source = Qt::MouseEventNotSynthesized;
140
+ _wasHeld = wasHeld;
141
+ _isClick = isClick;
142
+ _accepted = true;
143
+ _flags = flags;
144
+ }
145
+
146
+ qreal x() const { return _x; }
147
+ qreal y() const { return _y; }
148
+ int button() const { return _button; }
149
+ int buttons() const { return _buttons; }
150
+ int modifiers() const { return _modifiers; }
151
+ #if QT_DEPRECATED_SINCE(6, 6)
152
+ int source() const { return _source; }
153
+ #endif
154
+ bool wasHeld() const { return _wasHeld; }
155
+ bool isClick() const { return _isClick; }
156
+
157
+ // only for internal usage
158
+ void setX(qreal x) { _x = x; }
159
+ void setY(qreal y) { _y = y; }
160
+ void setPosition(const QPointF &point) { _x = point.x(); _y = point.y(); }
161
+ #if QT_DEPRECATED_SINCE(6, 6)
162
+ void setSource(Qt::MouseEventSource s) { _source = s; }
163
+ #endif
164
+
165
+ bool isAccepted() { return _accepted; }
166
+ void setAccepted(bool accepted) { _accepted = accepted; }
167
+ int flags() const { return _flags; }
168
+ private:
169
+ qreal _x = 0;
170
+ qreal _y = 0;
171
+ Qt::MouseButton _button = Qt::NoButton;
172
+ Qt::MouseButtons _buttons = Qt::NoButton;
173
+ Qt::KeyboardModifiers _modifiers = Qt::NoModifier;
174
+ Qt::MouseEventSource _source = Qt::MouseEventNotSynthesized;
175
+ bool _wasHeld : 1;
176
+ bool _isClick : 1;
177
+ bool _accepted : 1;
178
+ Qt::MouseEventFlags _flags = Qt::NoMouseEventFlag;
179
+ };
180
+
181
+ #if QT_CONFIG(wheelevent)
182
+ class Q_QUICK_EXPORT QQuickWheelEvent : public QObject
183
+ {
184
+ Q_OBJECT
185
+ Q_PROPERTY(const QPointingDevice *device READ pointingDevice CONSTANT FINAL)
186
+ Q_PROPERTY(qreal x READ x CONSTANT FINAL)
187
+ Q_PROPERTY(qreal y READ y CONSTANT FINAL)
188
+ Q_PROPERTY(QPoint angleDelta READ angleDelta CONSTANT FINAL)
189
+ Q_PROPERTY(QPoint pixelDelta READ pixelDelta CONSTANT FINAL)
190
+ Q_PROPERTY(Qt::ScrollPhase phase READ phase CONSTANT FINAL)
191
+ Q_PROPERTY(int buttons READ buttons CONSTANT FINAL)
192
+ Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL)
193
+ Q_PROPERTY(bool inverted READ inverted CONSTANT FINAL)
194
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
195
+ QML_NAMED_ELEMENT(WheelEvent)
196
+ QML_UNCREATABLE("Should only be used by wheel event signal handlers, for example in MouseArea")
197
+ QML_ADDED_IN_VERSION(2, 0)
198
+
199
+ public:
200
+ QQuickWheelEvent() = default;
201
+
202
+ void reset(const QWheelEvent *event)
203
+ {
204
+ _device = event->pointingDevice();
205
+ _x = event->position().x();
206
+ _y = event->position().y();
207
+ _angleDelta = event->angleDelta();
208
+ _pixelDelta = event->pixelDelta();
209
+ _buttons = event->buttons();
210
+ _modifiers = event->modifiers();
211
+ _accepted = true;
212
+ _inverted = event->inverted();
213
+ _phase = event->phase();
214
+ }
215
+
216
+ const QPointingDevice *pointingDevice() const { return _device; }
217
+ qreal x() const { return _x; }
218
+ qreal y() const { return _y; }
219
+ QPoint angleDelta() const { return _angleDelta; }
220
+ QPoint pixelDelta() const { return _pixelDelta; }
221
+ int buttons() const { return _buttons; }
222
+ int modifiers() const { return _modifiers; }
223
+ Qt::ScrollPhase phase() const { return _phase; }
224
+ bool inverted() const { return _inverted; }
225
+ bool isAccepted() { return _accepted; }
226
+ void setAccepted(bool accepted) { _accepted = accepted; }
227
+
228
+ private:
229
+ const QPointingDevice *_device = nullptr;
230
+ qreal _x = 0;
231
+ qreal _y = 0;
232
+ QPoint _angleDelta;
233
+ QPoint _pixelDelta;
234
+ Qt::MouseButtons _buttons = Qt::NoButton;
235
+ Qt::KeyboardModifiers _modifiers = Qt::NoModifier;
236
+ Qt::ScrollPhase _phase = Qt::NoScrollPhase;
237
+ bool _inverted = false;
238
+ bool _accepted = false;
239
+ };
240
+ #endif
241
+
242
+ class Q_QUICK_EXPORT QQuickCloseEvent : public QObject
243
+ {
244
+ Q_OBJECT
245
+ Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL)
246
+ QML_NAMED_ELEMENT(CloseEvent)
247
+ QML_UNCREATABLE("Should only be used by Window's closing signal")
248
+ QML_ADDED_IN_VERSION(2, 0)
249
+
250
+ public:
251
+ QQuickCloseEvent() {}
252
+
253
+ bool isAccepted() { return _accepted; }
254
+ void setAccepted(bool accepted) { _accepted = accepted; }
255
+
256
+ private:
257
+ bool _accepted = true;
258
+ };
259
+
260
+ QT_END_NAMESPACE
261
+
262
+ #endif // QQUICKEVENTS_P_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p.h ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2019 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 QQUICKFLICKABLE_P_H
5
+ #define QQUICKFLICKABLE_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 "qquickitem.h"
19
+ #include <private/qtquickglobal_p.h>
20
+
21
+ QT_BEGIN_NAMESPACE
22
+
23
+ class QQuickFlickablePrivate;
24
+ class QQuickFlickableVisibleArea;
25
+ class Q_QUICK_EXPORT QQuickFlickable : public QQuickItem
26
+ {
27
+ Q_OBJECT
28
+
29
+ Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged)
30
+ Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged)
31
+ Q_PROPERTY(qreal contentX READ contentX WRITE setContentX NOTIFY contentXChanged)
32
+ Q_PROPERTY(qreal contentY READ contentY WRITE setContentY NOTIFY contentYChanged)
33
+ Q_PROPERTY(QQuickItem *contentItem READ contentItem CONSTANT)
34
+
35
+ Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin NOTIFY topMarginChanged)
36
+ Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged)
37
+ Q_PROPERTY(qreal originY READ originY NOTIFY originYChanged)
38
+
39
+ Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged)
40
+ Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged)
41
+ Q_PROPERTY(qreal originX READ originX NOTIFY originXChanged)
42
+
43
+ Q_PROPERTY(qreal horizontalVelocity READ horizontalVelocity NOTIFY horizontalVelocityChanged)
44
+ Q_PROPERTY(qreal verticalVelocity READ verticalVelocity NOTIFY verticalVelocityChanged)
45
+
46
+ Q_PROPERTY(BoundsBehavior boundsBehavior READ boundsBehavior WRITE setBoundsBehavior NOTIFY boundsBehaviorChanged)
47
+ Q_PROPERTY(BoundsMovement boundsMovement READ boundsMovement WRITE setBoundsMovement NOTIFY boundsMovementChanged REVISION(2, 10))
48
+ Q_PROPERTY(QQuickTransition *rebound READ rebound WRITE setRebound NOTIFY reboundChanged)
49
+ Q_PROPERTY(qreal maximumFlickVelocity READ maximumFlickVelocity WRITE setMaximumFlickVelocity NOTIFY maximumFlickVelocityChanged)
50
+ Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged)
51
+ Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged)
52
+ Q_PROPERTY(bool movingHorizontally READ isMovingHorizontally NOTIFY movingHorizontallyChanged)
53
+ Q_PROPERTY(bool movingVertically READ isMovingVertically NOTIFY movingVerticallyChanged)
54
+ Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged)
55
+ Q_PROPERTY(bool flickingHorizontally READ isFlickingHorizontally NOTIFY flickingHorizontallyChanged)
56
+ Q_PROPERTY(bool flickingVertically READ isFlickingVertically NOTIFY flickingVerticallyChanged)
57
+ Q_PROPERTY(bool dragging READ isDragging NOTIFY draggingChanged)
58
+ Q_PROPERTY(bool draggingHorizontally READ isDraggingHorizontally NOTIFY draggingHorizontallyChanged)
59
+ Q_PROPERTY(bool draggingVertically READ isDraggingVertically NOTIFY draggingVerticallyChanged)
60
+ Q_PROPERTY(FlickableDirection flickableDirection READ flickableDirection WRITE setFlickableDirection NOTIFY flickableDirectionChanged)
61
+
62
+ Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged)
63
+ Q_PROPERTY(int pressDelay READ pressDelay WRITE setPressDelay NOTIFY pressDelayChanged)
64
+
65
+ Q_PROPERTY(bool atXEnd READ isAtXEnd NOTIFY atXEndChanged)
66
+ Q_PROPERTY(bool atYEnd READ isAtYEnd NOTIFY atYEndChanged)
67
+ Q_PROPERTY(bool atXBeginning READ isAtXBeginning NOTIFY atXBeginningChanged)
68
+ Q_PROPERTY(bool atYBeginning READ isAtYBeginning NOTIFY atYBeginningChanged)
69
+
70
+ Q_PROPERTY(QQuickFlickableVisibleArea *visibleArea READ visibleArea CONSTANT)
71
+
72
+ Q_PROPERTY(bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY pixelAlignedChanged)
73
+ Q_PROPERTY(bool synchronousDrag READ synchronousDrag WRITE setSynchronousDrag NOTIFY synchronousDragChanged REVISION(2, 12))
74
+
75
+ Q_PROPERTY(qreal horizontalOvershoot READ horizontalOvershoot NOTIFY horizontalOvershootChanged REVISION(2, 9))
76
+ Q_PROPERTY(qreal verticalOvershoot READ verticalOvershoot NOTIFY verticalOvershootChanged REVISION(2, 9))
77
+
78
+ Q_PROPERTY(QQmlListProperty<QObject> flickableData READ flickableData)
79
+ Q_PROPERTY(QQmlListProperty<QQuickItem> flickableChildren READ flickableChildren)
80
+ Q_CLASSINFO("DefaultProperty", "flickableData")
81
+ QML_NAMED_ELEMENT(Flickable)
82
+ QML_ADDED_IN_VERSION(2, 0)
83
+
84
+ public:
85
+ QQuickFlickable(QQuickItem *parent=nullptr);
86
+ ~QQuickFlickable() override;
87
+
88
+ QQmlListProperty<QObject> flickableData();
89
+ QQmlListProperty<QQuickItem> flickableChildren();
90
+
91
+ enum BoundsBehaviorFlag {
92
+ StopAtBounds = 0x0,
93
+ DragOverBounds = 0x1,
94
+ OvershootBounds = 0x2,
95
+ DragAndOvershootBounds = DragOverBounds | OvershootBounds
96
+ };
97
+ Q_DECLARE_FLAGS(BoundsBehavior, BoundsBehaviorFlag)
98
+ Q_FLAG(BoundsBehavior)
99
+
100
+ BoundsBehavior boundsBehavior() const;
101
+ void setBoundsBehavior(BoundsBehavior);
102
+
103
+ enum BoundsMovement {
104
+ // StopAtBounds = 0x0,
105
+ FollowBoundsBehavior = 0x1
106
+ };
107
+ Q_ENUM(BoundsMovement)
108
+
109
+ BoundsMovement boundsMovement() const;
110
+ void setBoundsMovement(BoundsMovement movement);
111
+
112
+ QQuickTransition *rebound() const;
113
+ void setRebound(QQuickTransition *transition);
114
+
115
+ qreal contentWidth() const;
116
+ void setContentWidth(qreal);
117
+
118
+ qreal contentHeight() const;
119
+ void setContentHeight(qreal);
120
+
121
+ qreal contentX() const;
122
+ virtual void setContentX(qreal pos);
123
+
124
+ qreal contentY() const;
125
+ virtual void setContentY(qreal pos);
126
+
127
+ qreal topMargin() const;
128
+ void setTopMargin(qreal m);
129
+
130
+ qreal bottomMargin() const;
131
+ void setBottomMargin(qreal m);
132
+
133
+ qreal leftMargin() const;
134
+ void setLeftMargin(qreal m);
135
+
136
+ qreal rightMargin() const;
137
+ void setRightMargin(qreal m);
138
+
139
+ virtual qreal originY() const;
140
+ virtual qreal originX() const;
141
+
142
+ bool isMoving() const;
143
+ bool isMovingHorizontally() const;
144
+ bool isMovingVertically() const;
145
+ bool isFlicking() const;
146
+ bool isFlickingHorizontally() const;
147
+ bool isFlickingVertically() const;
148
+ bool isDragging() const;
149
+ bool isDraggingHorizontally() const;
150
+ bool isDraggingVertically() const;
151
+
152
+ int pressDelay() const;
153
+ void setPressDelay(int delay);
154
+
155
+ qreal maximumFlickVelocity() const;
156
+ void setMaximumFlickVelocity(qreal);
157
+
158
+ qreal flickDeceleration() const;
159
+ void setFlickDeceleration(qreal);
160
+
161
+ bool isInteractive() const;
162
+ void setInteractive(bool);
163
+
164
+ qreal horizontalVelocity() const;
165
+ qreal verticalVelocity() const;
166
+
167
+ bool isAtXEnd() const;
168
+ bool isAtXBeginning() const;
169
+ bool isAtYEnd() const;
170
+ bool isAtYBeginning() const;
171
+
172
+ QQuickItem *contentItem() const;
173
+
174
+ enum FlickableDirection { AutoFlickDirection=0x0, HorizontalFlick=0x1, VerticalFlick=0x2, HorizontalAndVerticalFlick=0x3,
175
+ AutoFlickIfNeeded=0xc };
176
+ Q_ENUM(FlickableDirection)
177
+ FlickableDirection flickableDirection() const;
178
+ void setFlickableDirection(FlickableDirection);
179
+
180
+ bool pixelAligned() const;
181
+ void setPixelAligned(bool align);
182
+
183
+ bool synchronousDrag() const;
184
+ void setSynchronousDrag(bool v);
185
+
186
+ qreal horizontalOvershoot() const;
187
+ qreal verticalOvershoot() const;
188
+
189
+ Q_INVOKABLE void resizeContent(qreal w, qreal h, QPointF center);
190
+ Q_INVOKABLE void returnToBounds();
191
+ Q_INVOKABLE void flick(qreal xVelocity, qreal yVelocity);
192
+ Q_INVOKABLE void cancelFlick();
193
+
194
+ Q_SIGNALS:
195
+ void contentWidthChanged();
196
+ void contentHeightChanged();
197
+ void contentXChanged();
198
+ void contentYChanged();
199
+ void topMarginChanged();
200
+ void bottomMarginChanged();
201
+ void leftMarginChanged();
202
+ void rightMarginChanged();
203
+ void originYChanged();
204
+ void originXChanged();
205
+ void movingChanged();
206
+ void movingHorizontallyChanged();
207
+ void movingVerticallyChanged();
208
+ void flickingChanged();
209
+ void flickingHorizontallyChanged();
210
+ void flickingVerticallyChanged();
211
+ void draggingChanged();
212
+ void draggingHorizontallyChanged();
213
+ void draggingVerticallyChanged();
214
+ void horizontalVelocityChanged();
215
+ void verticalVelocityChanged();
216
+ void isAtBoundaryChanged();
217
+ void flickableDirectionChanged();
218
+ void interactiveChanged();
219
+ void boundsBehaviorChanged();
220
+ Q_REVISION(2, 10) void boundsMovementChanged();
221
+ void reboundChanged();
222
+ void maximumFlickVelocityChanged();
223
+ void flickDecelerationChanged();
224
+ void pressDelayChanged();
225
+ void movementStarted();
226
+ void movementEnded();
227
+ void flickStarted();
228
+ void flickEnded();
229
+ void dragStarted();
230
+ void dragEnded();
231
+ void pixelAlignedChanged();
232
+ Q_REVISION(2, 12) void synchronousDragChanged();
233
+ Q_REVISION(2, 9) void horizontalOvershootChanged();
234
+ Q_REVISION(2, 9) void verticalOvershootChanged();
235
+
236
+ // The next four signals should be marked as Q_REVISION(2, 12). See QTBUG-71243
237
+ void atXEndChanged();
238
+ void atYEndChanged();
239
+ void atXBeginningChanged();
240
+ void atYBeginningChanged();
241
+
242
+ protected:
243
+ bool childMouseEventFilter(QQuickItem *, QEvent *) override;
244
+ void mousePressEvent(QMouseEvent *event) override;
245
+ void mouseMoveEvent(QMouseEvent *event) override;
246
+ void mouseReleaseEvent(QMouseEvent *event) override;
247
+ void touchEvent(QTouchEvent *event) override;
248
+ #if QT_CONFIG(wheelevent)
249
+ void wheelEvent(QWheelEvent *event) override;
250
+ #endif
251
+ void timerEvent(QTimerEvent *event) override;
252
+
253
+ QQuickFlickableVisibleArea *visibleArea();
254
+
255
+ protected Q_SLOTS:
256
+ void movementStarting();
257
+ void movementEnding();
258
+ void movementEnding(bool hMovementEnding, bool vMovementEnding);
259
+ void velocityTimelineCompleted();
260
+ void timelineCompleted();
261
+
262
+ protected:
263
+ virtual qreal minXExtent() const;
264
+ virtual qreal minYExtent() const;
265
+ virtual qreal maxXExtent() const;
266
+ virtual qreal maxYExtent() const;
267
+ qreal vWidth() const;
268
+ qreal vHeight() const;
269
+ void componentComplete() override;
270
+ virtual void viewportMoved(Qt::Orientations orient);
271
+ void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
272
+ void mouseUngrabEvent() override;
273
+ bool filterPointerEvent(QQuickItem *receiver, QPointerEvent *event);
274
+
275
+ bool xflick() const;
276
+ bool yflick() const;
277
+
278
+ protected:
279
+ QQuickFlickable(QQuickFlickablePrivate &dd, QQuickItem *parent);
280
+
281
+ private:
282
+ Q_DISABLE_COPY(QQuickFlickable)
283
+ Q_DECLARE_PRIVATE(QQuickFlickable)
284
+ friend class QQuickFlickableVisibleArea;
285
+ friend class QQuickFlickableReboundTransition;
286
+ };
287
+
288
+ QT_END_NAMESPACE
289
+
290
+ #endif // QQUICKFLICKABLE_P_H
qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p_p.h ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Copyright (C) 2019 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 QQUICKFLICKABLE_P_P_H
5
+ #define QQUICKFLICKABLE_P_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 "qquickflickable_p.h"
19
+ #include "qquickitem_p.h"
20
+ #include "qquickitemchangelistener_p.h"
21
+
22
+ #include <QtQml/qqml.h>
23
+ #include <QtCore/qdatetime.h>
24
+ #include "qplatformdefs.h"
25
+
26
+ #include <private/qquicktimeline_p_p.h>
27
+ #include <private/qquickanimation_p_p.h>
28
+ #include <private/qquicktransitionmanager_p_p.h>
29
+ #include <private/qpodvector_p.h>
30
+
31
+ QT_BEGIN_NAMESPACE
32
+
33
+ class QQuickFlickableVisibleArea;
34
+ class QQuickTransition;
35
+ class QQuickFlickableReboundTransition;
36
+
37
+ class Q_QUICK_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, public QQuickItemChangeListener
38
+ {
39
+ Q_DECLARE_PUBLIC(QQuickFlickable)
40
+
41
+ public:
42
+ static inline QQuickFlickablePrivate *get(QQuickFlickable *o) { return o->d_func(); }
43
+
44
+ QQuickFlickablePrivate();
45
+ void init();
46
+
47
+ struct Velocity : public QQuickTimeLineValue
48
+ {
49
+ Velocity(QQuickFlickablePrivate *p)
50
+ : parent(p) {}
51
+ void setValue(qreal v) override {
52
+ if (v != value()) {
53
+ QQuickTimeLineValue::setValue(v);
54
+ parent->updateVelocity();
55
+ }
56
+ }
57
+ QQuickFlickablePrivate *parent;
58
+ };
59
+
60
+ enum MovementReason { Other, SetIndex, Mouse };
61
+
62
+ struct AxisData {
63
+ AxisData(QQuickFlickablePrivate *fp, void (QQuickFlickablePrivate::*func)(qreal))
64
+ : move(fp, func)
65
+ , smoothVelocity(fp), atEnd(false), atBeginning(true)
66
+ , transitionToSet(false)
67
+ , fixingUp(false), inOvershoot(false), inRebound(false), moving(false), flicking(false)
68
+ , flickingWhenDragBegan(false), dragging(false), extentsChanged(false)
69
+ , explicitValue(false), contentPositionChangedExternallyDuringDrag(false)
70
+ , minExtentDirty(true), maxExtentDirty(true)
71
+ {}
72
+
73
+ ~AxisData();
74
+
75
+ void reset() {
76
+ velocityBuffer.clear();
77
+ dragStartOffset = 0;
78
+ fixingUp = false;
79
+ inOvershoot = false;
80
+ contentPositionChangedExternallyDuringDrag = false;
81
+ }
82
+
83
+ void markExtentsDirty() {
84
+ minExtentDirty = true;
85
+ maxExtentDirty = true;
86
+ extentsChanged = true;
87
+ }
88
+
89
+ void resetTransitionTo() {
90
+ transitionTo = 0;
91
+ transitionToSet = false;
92
+ }
93
+
94
+ void addVelocitySample(qreal v, qreal maxVelocity);
95
+ void updateVelocity();
96
+
97
+ QQuickTimeLineValueProxy<QQuickFlickablePrivate> move;
98
+ QQuickFlickableReboundTransition *transitionToBounds = nullptr;
99
+ qreal viewSize = -1;
100
+ qreal pressPos = 0;
101
+ qreal lastPos = 0;
102
+ qreal dragStartOffset = 0;
103
+ qreal dragMinBound = 0;
104
+ qreal dragMaxBound = 0;
105
+ qreal previousDragDelta = 0;
106
+ qreal velocity = 0;
107
+ qreal flickTarget = 0;
108
+ qreal startMargin = 0;
109
+ qreal endMargin = 0;
110
+ qreal origin = 0;
111
+ qreal overshoot = 0;
112
+ qreal transitionTo = 0;
113
+ qreal continuousFlickVelocity = 0;
114
+ QElapsedTimer velocityTime;
115
+ int vTime = 0;
116
+ QQuickFlickablePrivate::Velocity smoothVelocity;
117
+ QPODVector<qreal,10> velocityBuffer;
118
+ // bitfield
119
+ uint atEnd : 1;
120
+ uint atBeginning : 1;
121
+ uint transitionToSet : 1;
122
+ uint fixingUp : 1;
123
+ uint inOvershoot : 1;
124
+ uint inRebound : 1;
125
+ uint moving : 1;
126
+ uint flicking : 1;
127
+ uint flickingWhenDragBegan : 1;
128
+ uint dragging : 1;
129
+ uint extentsChanged : 1;
130
+ uint explicitValue : 1;
131
+ uint contentPositionChangedExternallyDuringDrag : 1;
132
+ // mutable portion of bitfield
133
+ mutable uint minExtentDirty : 1;
134
+ mutable uint maxExtentDirty : 1;
135
+ // end bitfield
136
+ };
137
+
138
+ bool flickX(QEvent::Type eventType, qreal velocity);
139
+ bool flickY(QEvent::Type eventType, qreal velocity);
140
+ virtual bool flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize,
141
+ QQuickTimeLineCallback::Callback fixupCallback,
142
+ QEvent::Type eventType, qreal velocity);
143
+ void flickingStarted(bool flickingH, bool flickingV);
144
+
145
+ void fixupX();
146
+ void fixupY();
147
+ virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent);
148
+ void adjustContentPos(AxisData &data, qreal toPos);
149
+ void resetTimeline(AxisData &data);
150
+ void clearTimeline();
151
+
152
+ void updateBeginningEnd();
153
+
154
+ bool isInnermostPressDelay(QQuickItem *item) const;
155
+ void captureDelayedPress(QQuickItem *item, QPointerEvent *event);
156
+ void clearDelayedPress();
157
+ void replayDelayedPress();
158
+
159
+ void setViewportX(qreal x);
160
+ void setViewportY(qreal y);
161
+
162
+ qreal overShootDistance(qreal velocity) const;
163
+
164
+ void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override;
165
+
166
+ void draggingStarting();
167
+ void draggingEnding();
168
+
169
+ bool isViewMoving() const;
170
+
171
+ void cancelInteraction();
172
+
173
+ void addPointerHandler(QQuickPointerHandler *h) override;
174
+
175
+ virtual bool wantsPointerEvent(const QPointerEvent *) { return true; }
176
+
177
+ public:
178
+ QQuickItem *contentItem;
179
+
180
+ AxisData hData;
181
+ AxisData vData;
182
+
183
+ MovementReason moveReason = Other;
184
+
185
+ QQuickTimeLine timeline;
186
+ bool hMoved : 1;
187
+ bool vMoved : 1;
188
+ bool stealMouse : 1;
189
+ bool pressed : 1;
190
+ bool scrollingPhase : 1;
191
+ bool interactive : 1;
192
+ bool calcVelocity : 1;
193
+ bool pixelAligned : 1;
194
+ bool syncDrag : 1;
195
+ QElapsedTimer timer;
196
+ qint64 lastPosTime;
197
+ qint64 lastPressTime;
198
+ QPointF lastPos;
199
+ QPointF pressPos;
200
+ QVector2D accumulatedWheelPixelDelta;
201
+ qreal deceleration;
202
+ qreal wheelDeceleration;
203
+ qreal maxVelocity;
204
+ QPointerEvent *delayedPressEvent;
205
+ QBasicTimer delayedPressTimer;
206
+ int pressDelay;
207
+ int fixupDuration;
208
+ qreal flickBoost;
209
+ qreal initialWheelFlickDistance;
210
+
211
+ enum FixupMode { Normal, Immediate, ExtentChanged };
212
+ FixupMode fixupMode;
213
+
214
+ static void fixupY_callback(void *);
215
+ static void fixupX_callback(void *);
216
+
217
+ void updateVelocity();
218
+ int vTime;
219
+ QQuickTimeLine velocityTimeline;
220
+ QQuickFlickableVisibleArea *visibleArea;
221
+ QQuickFlickable::FlickableDirection flickableDirection;
222
+ QQuickFlickable::BoundsBehavior boundsBehavior;
223
+ QQuickFlickable::BoundsMovement boundsMovement;
224
+ QQuickTransition *rebound;
225
+
226
+ void viewportAxisMoved(AxisData &data, qreal minExtent, qreal maxExtent,
227
+ QQuickTimeLineCallback::Callback fixupCallback);
228
+
229
+ void handlePressEvent(QPointerEvent *);
230
+ void handleMoveEvent(QPointerEvent *);
231
+ void handleReleaseEvent(QPointerEvent *);
232
+
233
+ void maybeBeginDrag(qint64 currentTimestamp, const QPointF &pressPosn,
234
+ Qt::MouseButtons buttons = Qt::NoButton);
235
+ void drag(qint64 currentTimestamp, QEvent::Type eventType, const QPointF &localPos,
236
+ const QVector2D &deltas, bool overThreshold, bool momentum,
237
+ bool velocitySensitiveOverBounds, const QVector2D &velocity);
238
+
239
+ QVector2D firstPointLocalVelocity(QPointerEvent *event);
240
+ qint64 computeCurrentTime(QInputEvent *event) const;
241
+ qreal devicePixelRatio() const;
242
+
243
+ // flickableData property
244
+ static void data_append(QQmlListProperty<QObject> *, QObject *);
245
+ static qsizetype data_count(QQmlListProperty<QObject> *);
246
+ static QObject *data_at(QQmlListProperty<QObject> *, qsizetype);
247
+ static void data_clear(QQmlListProperty<QObject> *);
248
+ };
249
+
250
+ class Q_QUICK_EXPORT QQuickFlickableVisibleArea : public QObject
251
+ {
252
+ Q_OBJECT
253
+
254
+ Q_PROPERTY(qreal xPosition READ xPosition NOTIFY xPositionChanged FINAL)
255
+ Q_PROPERTY(qreal yPosition READ yPosition NOTIFY yPositionChanged FINAL)
256
+ Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY widthRatioChanged FINAL)
257
+ Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY heightRatioChanged FINAL)
258
+ QML_ANONYMOUS
259
+ QML_ADDED_IN_VERSION(2, 0)
260
+
261
+ public:
262
+ QQuickFlickableVisibleArea(QQuickFlickable *parent=nullptr);
263
+
264
+ qreal xPosition() const;
265
+ qreal widthRatio() const;
266
+ qreal yPosition() const;
267
+ qreal heightRatio() const;
268
+
269
+ void updateVisible();
270
+
271
+ Q_SIGNALS:
272
+ void xPositionChanged(qreal xPosition);
273
+ void yPositionChanged(qreal yPosition);
274
+ void widthRatioChanged(qreal widthRatio);
275
+ void heightRatioChanged(qreal heightRatio);
276
+
277
+ private:
278
+ QQuickFlickable *flickable;
279
+ qreal m_xPosition;
280
+ qreal m_widthRatio;
281
+ qreal m_yPosition;
282
+ qreal m_heightRatio;
283
+ };
284
+
285
+ QT_END_NAMESPACE
286
+
287
+ #endif // QQUICKFLICKABLE_P_P_H