Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquicktransformgroup_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKTRANSFORMGROUP_P_H
5#define QQUICKTRANSFORMGROUP_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 <QtCore/qobject.h>
19#include <QtCore/qhash.h>
20#include <QtQml/qqmllist.h>
21#include <QtQuick/qquickitem.h>
22#include <QtQuickVectorImageHelpers/qtquickvectorimagehelpersexports.h>
23
25
27{
28 Q_OBJECT
29 QML_NAMED_ELEMENT(TransformGroup)
30
31 Q_PROPERTY(QQmlListProperty<QQuickTransform> transformSequence READ transformSequence)
32 Q_CLASSINFO("DefaultProperty", "transformSequence")
33
34public:
35 QQuickTransformGroup(QObject *parent = nullptr);
36 ~QQuickTransformGroup();
37
38 Q_INVOKABLE void activateOverride(QQuickTransform *);
39 Q_INVOKABLE void deactivateOverride(QQuickTransform *);
40 Q_INVOKABLE void deactivate(QQuickTransform *);
41
42 void applyTo(QMatrix4x4 *matrix) const override;
43
44 QQmlListProperty<QQuickTransform> transformSequence();
45
46 void triggerUpdate();
47
48private:
49 Q_DECLARE_PRIVATE(QQuickTransform)
50
51 static void transformSequence_append(QQmlListProperty<QQuickTransform> *, QQuickTransform *);
52 static qsizetype transformSequence_count(QQmlListProperty<QQuickTransform> *);
53 static QQuickTransform *transformSequence_at(QQmlListProperty<QQuickTransform> *, qsizetype);
54 static void transformSequence_clear(QQmlListProperty<QQuickTransform> *);
55
56 enum StateFlag {
57 Disabled = 1,
58 Override = 2
59 };
60
61 QQuickItem *m_dummyItem = nullptr;
62 QList<QQuickTransform *> m_transforms;
63 QHash<QQuickTransform *, int> m_transformFlags;
64};
65
66QT_END_NAMESPACE
67
68#endif // QQUICKTRANSFORMGROUP_P_H
DummyQuickItem(QQuickTransformGroup *group)
virtual void itemChange(ItemChange ic, const ItemChangeData &) override
Called when change occurs for this item.