author | Eckhart Koeppen <eckhart.koppen@nokia.com> |
Wed, 21 Apr 2010 11:15:19 +0300 | |
branch | RCL_3 |
changeset 11 | 25a739ee40f4 |
parent 4 | 3b1da2848fc7 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
4
3b1da2848fc7
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtGui module of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#ifndef QGRAPHICSTRANSFORM_H |
|
43 |
#define QGRAPHICSTRANSFORM_H |
|
44 |
||
45 |
#include <QtCore/QObject> |
|
46 |
#include <QtGui/QVector3D> |
|
47 |
#include <QtGui/QTransform> |
|
48 |
#include <QtGui/QMatrix4x4> |
|
49 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
50 |
#ifndef QT_NO_GRAPHICSVIEW |
0 | 51 |
QT_BEGIN_HEADER |
52 |
||
53 |
QT_BEGIN_NAMESPACE |
|
54 |
||
55 |
QT_MODULE(Gui) |
|
56 |
||
57 |
class QGraphicsItem; |
|
58 |
class QGraphicsTransformPrivate; |
|
59 |
||
60 |
class Q_GUI_EXPORT QGraphicsTransform : public QObject |
|
61 |
{ |
|
62 |
Q_OBJECT |
|
63 |
public: |
|
64 |
QGraphicsTransform(QObject *parent = 0); |
|
65 |
~QGraphicsTransform(); |
|
66 |
||
67 |
virtual void applyTo(QMatrix4x4 *matrix) const = 0; |
|
68 |
||
69 |
protected Q_SLOTS: |
|
70 |
void update(); |
|
71 |
||
72 |
protected: |
|
73 |
QGraphicsTransform(QGraphicsTransformPrivate &p, QObject *parent); |
|
74 |
||
75 |
private: |
|
76 |
friend class QGraphicsItem; |
|
77 |
friend class QGraphicsItemPrivate; |
|
78 |
Q_DECLARE_PRIVATE(QGraphicsTransform) |
|
79 |
}; |
|
80 |
||
81 |
class QGraphicsScalePrivate; |
|
82 |
||
83 |
class Q_GUI_EXPORT QGraphicsScale : public QGraphicsTransform |
|
84 |
{ |
|
85 |
Q_OBJECT |
|
86 |
||
87 |
Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged) |
|
88 |
Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY scaleChanged) |
|
89 |
Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY scaleChanged) |
|
90 |
Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY scaleChanged) |
|
91 |
public: |
|
92 |
QGraphicsScale(QObject *parent = 0); |
|
93 |
~QGraphicsScale(); |
|
94 |
||
95 |
QVector3D origin() const; |
|
96 |
void setOrigin(const QVector3D &point); |
|
97 |
||
98 |
qreal xScale() const; |
|
99 |
void setXScale(qreal); |
|
100 |
||
101 |
qreal yScale() const; |
|
102 |
void setYScale(qreal); |
|
103 |
||
104 |
qreal zScale() const; |
|
105 |
void setZScale(qreal); |
|
106 |
||
107 |
void applyTo(QMatrix4x4 *matrix) const; |
|
108 |
||
109 |
Q_SIGNALS: |
|
110 |
void originChanged(); |
|
111 |
void scaleChanged(); |
|
112 |
||
113 |
private: |
|
114 |
Q_DECLARE_PRIVATE(QGraphicsScale) |
|
115 |
}; |
|
116 |
||
117 |
class QGraphicsRotationPrivate; |
|
118 |
||
119 |
class Q_GUI_EXPORT QGraphicsRotation : public QGraphicsTransform |
|
120 |
{ |
|
121 |
Q_OBJECT |
|
122 |
||
123 |
Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged) |
|
124 |
Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged) |
|
125 |
Q_PROPERTY(QVector3D axis READ axis WRITE setAxis NOTIFY axisChanged) |
|
126 |
public: |
|
127 |
QGraphicsRotation(QObject *parent = 0); |
|
128 |
~QGraphicsRotation(); |
|
129 |
||
130 |
QVector3D origin() const; |
|
131 |
void setOrigin(const QVector3D &point); |
|
132 |
||
133 |
qreal angle() const; |
|
134 |
void setAngle(qreal); |
|
135 |
||
136 |
QVector3D axis() const; |
|
137 |
void setAxis(const QVector3D &axis); |
|
138 |
void setAxis(Qt::Axis axis); |
|
139 |
||
140 |
void applyTo(QMatrix4x4 *matrix) const; |
|
141 |
||
142 |
Q_SIGNALS: |
|
143 |
void originChanged(); |
|
144 |
void angleChanged(); |
|
145 |
void axisChanged(); |
|
146 |
||
147 |
private: |
|
148 |
Q_DECLARE_PRIVATE(QGraphicsRotation) |
|
149 |
}; |
|
150 |
||
151 |
QT_END_NAMESPACE |
|
152 |
||
153 |
QT_END_HEADER |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
154 |
#endif //QT_NO_GRAPHICSVIEW |
0 | 155 |
|
156 |
#endif // QFXTRANSFORM_H |