Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
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
4#ifndef QQUICKTRANSLATE_P_H
5#define QQUICKTRANSLATE_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/qmatrix4x4.h>
23
25
27class Q_QUICK_EXPORT QQuickTranslate : public QQuickTransform
28{
30
31 Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
32 Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
33 QML_NAMED_ELEMENT(Translate)
35
36public:
37 QQuickTranslate(QObject *parent = nullptr);
38
39 qreal x() const;
40 void setX(qreal);
41
42 qreal y() const;
43 void setY(qreal);
44
45 void applyTo(QMatrix4x4 *matrix) const override;
46
48 void xChanged();
49 void yChanged();
50
52 Q_DECLARE_PRIVATE(QQuickTranslate)
53};
54
56class Q_QUICK_EXPORT QQuickScale : public QQuickTransform
57{
59
60 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
61 Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged)
62 Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged)
63 Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged)
66public:
67 QQuickScale(QObject *parent = nullptr);
68
69 QVector3D origin() const;
70 void setOrigin(const QVector3D &point);
71
72 qreal xScale() const;
73 void setXScale(qreal);
74
75 qreal yScale() const;
76 void setYScale(qreal);
77
78 qreal zScale() const;
79 void setZScale(qreal);
80
81 void applyTo(QMatrix4x4 *matrix) const override;
82
84 void originChanged();
85 void xScaleChanged();
86 void yScaleChanged();
87 void zScaleChanged();
88 void scaleChanged();
89
91 Q_DECLARE_PRIVATE(QQuickScale)
92};
93
95class Q_QUICK_EXPORT QQuickRotation : public QQuickTransform
96{
98
99 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
100 Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged)
101 Q_PROPERTY(QVector3D axis READ axis WRITE setAxis NOTIFY axisChanged)
102 QML_NAMED_ELEMENT(Rotation)
104public:
105 QQuickRotation(QObject *parent = nullptr);
106
107 QVector3D origin() const;
108 void setOrigin(const QVector3D &point);
109
110 qreal angle() const;
111 void setAngle(qreal);
112
113 QVector3D axis() const;
114 void setAxis(const QVector3D &axis);
115 void setAxis(Qt::Axis axis);
116
117 void applyTo(QMatrix4x4 *matrix) const override;
118
120 void originChanged();
121 void angleChanged();
122 void axisChanged();
123
124private:
125 Q_DECLARE_PRIVATE(QQuickRotation)
126};
127
129class Q_QUICK_EXPORT QQuickMatrix4x4 : public QQuickTransform
130{
132
133 Q_PROPERTY(QMatrix4x4 matrix READ matrix WRITE setMatrix NOTIFY matrixChanged)
134 QML_NAMED_ELEMENT(Matrix4x4)
136public:
137 QQuickMatrix4x4(QObject *parent = nullptr);
138
139 QMatrix4x4 matrix() const;
140 void setMatrix(const QMatrix4x4& matrix);
141
142 void applyTo(QMatrix4x4 *matrix) const override;
143
145 void matrixChanged();
146
147private:
148 Q_DECLARE_PRIVATE(QQuickMatrix4x4)
149};
150
151
153
154#endif
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
\inmodule QtCore
Definition qobject.h:103
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
Definition qcompare.h:63
static void setMatrix(libinput_device *dev)
GLint GLint GLint GLint GLint x
[0]
GLfloat angle
GLint y
GLuint GLenum matrix
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
p setX(p.x()+1)