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
qquicktranslate_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKTRANSLATE_P_H
6#define QQUICKTRANSLATE_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/qtquickglobal_p.h>
20
21#include <QtQuick/qquickitem.h>
22
23#include <QtGui/qmatrix4x4.h>
24
26
28class Q_QUICK_EXPORT QQuickTranslate : public QQuickTransform
29{
30 Q_OBJECT
31
32 Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
33 Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
34 QML_NAMED_ELEMENT(Translate)
35 QML_ADDED_IN_VERSION(2, 0)
36
37public:
38 QQuickTranslate(QObject *parent = nullptr);
39
40 qreal x() const;
41 void setX(qreal);
42
43 qreal y() const;
44 void setY(qreal);
45
46 void applyTo(QMatrix4x4 *matrix) const override;
47
48Q_SIGNALS:
49 void xChanged();
50 void yChanged();
51
52private:
53 Q_DECLARE_PRIVATE(QQuickTranslate)
54};
55
57class Q_QUICK_EXPORT QQuickScale : public QQuickTransform
58{
59 Q_OBJECT
60
61 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
62 Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged)
63 Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged)
64 Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged)
65 QML_NAMED_ELEMENT(Scale)
66 QML_ADDED_IN_VERSION(2, 0)
67public:
68 QQuickScale(QObject *parent = nullptr);
69
70 QVector3D origin() const;
71 void setOrigin(const QVector3D &point);
72
73 qreal xScale() const;
74 void setXScale(qreal);
75
76 qreal yScale() const;
77 void setYScale(qreal);
78
79 qreal zScale() const;
80 void setZScale(qreal);
81
82 void applyTo(QMatrix4x4 *matrix) const override;
83
84Q_SIGNALS:
85 void originChanged();
86 void xScaleChanged();
87 void yScaleChanged();
88 void zScaleChanged();
89 void scaleChanged();
90
91private:
92 Q_DECLARE_PRIVATE(QQuickScale)
93};
94
96class Q_QUICK_EXPORT QQuickRotation : public QQuickTransform
97{
98 Q_OBJECT
99
100 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
101 Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged)
102 Q_PROPERTY(QVector3D axis READ axis WRITE setAxis NOTIFY axisChanged)
103 QML_NAMED_ELEMENT(Rotation)
104 QML_ADDED_IN_VERSION(2, 0)
105public:
106 QQuickRotation(QObject *parent = nullptr);
107
108 QVector3D origin() const;
109 void setOrigin(const QVector3D &point);
110
111 qreal angle() const;
112 void setAngle(qreal);
113
114 QVector3D axis() const;
115 void setAxis(const QVector3D &axis);
116 void setAxis(Qt::Axis axis);
117
118 void applyTo(QMatrix4x4 *matrix) const override;
119
120Q_SIGNALS:
121 void originChanged();
122 void angleChanged();
123 void axisChanged();
124
125private:
126 Q_DECLARE_PRIVATE(QQuickRotation)
127};
128
130class Q_QUICK_EXPORT QQuickShear : public QQuickTransform
131{
132 Q_OBJECT
133
134 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
135 Q_PROPERTY(qreal xFactor READ xFactor WRITE setXFactor NOTIFY xFactorChanged)
136 Q_PROPERTY(qreal yFactor READ yFactor WRITE setYFactor NOTIFY yFactorChanged)
137 Q_PROPERTY(qreal xAngle READ xAngle WRITE setXAngle NOTIFY xAngleChanged)
138 Q_PROPERTY(qreal yAngle READ yAngle WRITE setYAngle NOTIFY yAngleChanged)
139 QML_NAMED_ELEMENT(Shear)
140 QML_ADDED_IN_VERSION(6, 9)
141public:
142 QQuickShear(QObject *parent = nullptr);
143
144 QVector3D origin() const;
145 void setOrigin(const QVector3D &point);
146
147 qreal xFactor() const;
148 void setXFactor(qreal);
149
150 qreal yFactor() const;
151 void setYFactor(qreal);
152
153 qreal xAngle() const;
154 void setXAngle(qreal);
155
156 qreal yAngle() const;
157 void setYAngle(qreal);
158
159 void applyTo(QMatrix4x4 *matrix) const override;
160
161Q_SIGNALS:
162 void originChanged();
163 void xFactorChanged();
164 void yFactorChanged();
165 void xAngleChanged();
166 void yAngleChanged();
167
168private:
169 Q_DECLARE_PRIVATE(QQuickShear)
170};
171
173class Q_QUICK_EXPORT QQuickMatrix4x4 : public QQuickTransform
174{
175 Q_OBJECT
176
177 Q_PROPERTY(QMatrix4x4 matrix READ matrix WRITE setMatrix NOTIFY matrixChanged)
178 QML_NAMED_ELEMENT(Matrix4x4)
179 QML_ADDED_IN_VERSION(2, 3)
180public:
181 QQuickMatrix4x4(QObject *parent = nullptr);
182
183 QMatrix4x4 matrix() const;
184 void setMatrix(const QMatrix4x4& matrix);
185
186 void applyTo(QMatrix4x4 *matrix) const override;
187
188Q_SIGNALS:
189 void matrixChanged();
190
191private:
192 Q_DECLARE_PRIVATE(QQuickMatrix4x4)
193};
194
195
196QT_END_NAMESPACE
197
198#endif
QPointer< QQuickItem > back
QPointer< QQuickItem > front
QPointer< QQuickLocalTransform > backTransform
\qmltype Shear \nativetype QQuickShear \inqmlmodule QtQuick
QT_REQUIRE_CONFIG(quick_flipable)