1 // Commit: ac5c099cc3c5b8c7eec7a49fdeb8a21037230350
2 /****************************************************************************
4 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
5 ** All rights reserved.
6 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 ** This file is part of the QtDeclarative module of the Qt Toolkit.
10 ** $QT_BEGIN_LICENSE:LGPL$
11 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this
15 ** file. Please review the following information to ensure the GNU Lesser
16 ** General Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
23 ** GNU General Public License Usage
24 ** Alternatively, this file may be used under the terms of the GNU General
25 ** Public License version 3.0 as published by the Free Software Foundation
26 ** and appearing in the file LICENSE.GPL included in the packaging of this
27 ** file. Please review the following information to ensure the GNU General
28 ** Public License version 3.0 requirements will be met:
29 ** http://www.gnu.org/copyleft/gpl.html.
32 ** Alternatively, this file may be used in accordance with the terms and
33 ** conditions contained in a signed written agreement between you and Nokia.
41 ****************************************************************************/
43 #ifndef QSGTRANSLATE_P_H
44 #define QSGTRANSLATE_P_H
48 #include <QtGui/qmatrix4x4.h>
54 QT_MODULE(Declarative)
56 class QSGTranslatePrivate;
57 class Q_AUTOTEST_EXPORT QSGTranslate : public QSGTransform
61 Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
62 Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
65 QSGTranslate(QObject *parent = 0);
74 void applyTo(QMatrix4x4 *matrix) const;
81 Q_DECLARE_PRIVATE(QSGTranslate)
82 Q_DISABLE_COPY(QSGTranslate)
85 class QSGScalePrivate;
86 class Q_AUTOTEST_EXPORT QSGScale : public QSGTransform
90 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
91 Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged)
92 Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged)
93 Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged)
95 QSGScale(QObject *parent = 0);
98 QVector3D origin() const;
99 void setOrigin(const QVector3D &point);
101 qreal xScale() const;
102 void setXScale(qreal);
104 qreal yScale() const;
105 void setYScale(qreal);
107 qreal zScale() const;
108 void setZScale(qreal);
110 void applyTo(QMatrix4x4 *matrix) const;
113 void originChanged();
114 void xScaleChanged();
115 void yScaleChanged();
116 void zScaleChanged();
120 Q_DECLARE_PRIVATE(QSGScale)
123 class QSGRotationPrivate;
124 class Q_AUTOTEST_EXPORT QSGRotation : public QSGTransform
128 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
129 Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged)
130 Q_PROPERTY(QVector3D axis READ axis WRITE setAxis NOTIFY axisChanged)
132 QSGRotation(QObject *parent = 0);
135 QVector3D origin() const;
136 void setOrigin(const QVector3D &point);
139 void setAngle(qreal);
141 QVector3D axis() const;
142 void setAxis(const QVector3D &axis);
143 void setAxis(Qt::Axis axis);
145 void applyTo(QMatrix4x4 *matrix) const;
148 void originChanged();
153 Q_DECLARE_PRIVATE(QSGRotation)
158 QML_DECLARE_TYPE(QSGTranslate)