summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetranslate.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-26 07:02:53 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-26 07:02:53 (GMT)
commitb8952aef84c78949959728674db39eafb19efee7 (patch)
treea258b882059cf7e749e447e230a56e7a8e17c55d /src/declarative/graphicsitems/qdeclarativetranslate.cpp
parent56309fe1461c4ea3ca654e535a525165c28a0f12 (diff)
downloadQt-b8952aef84c78949959728674db39eafb19efee7.zip
Qt-b8952aef84c78949959728674db39eafb19efee7.tar.gz
Qt-b8952aef84c78949959728674db39eafb19efee7.tar.bz2
Test and fix order of transform application.
Remove Translate.z since Qt cannot sensibly support it yet.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetranslate.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate.cpp33
1 files changed, 4 insertions, 29 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate.cpp b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
index dd6ca92..1c96fa4 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
@@ -50,10 +50,9 @@ class QDeclarativeTranslatePrivate : public QGraphicsTransformPrivate
{
public:
QDeclarativeTranslatePrivate()
- : x(0), y(0), z(0) {}
+ : x(0), y(0) {}
qreal x;
qreal y;
- qreal z;
};
/*!
@@ -77,7 +76,7 @@ QDeclarativeTranslate::~QDeclarativeTranslate()
The translation can be any real number; the default value is 0.0.
- \sa y, z
+ \sa y
*/
qreal QDeclarativeTranslate::x() const
{
@@ -100,7 +99,7 @@ void QDeclarativeTranslate::setX(qreal x)
The translation can be any real number; the default value is 0.0.
- \sa x, z
+ \sa x
*/
qreal QDeclarativeTranslate::y() const
{
@@ -118,35 +117,12 @@ void QDeclarativeTranslate::setY(qreal y)
}
/*!
- \property QDeclarativeTranslate::z
- \brief the depth translation.
-
- The translation can be any real number; the default value is 0.0.
-
- \sa x, y
-*/
-qreal QDeclarativeTranslate::z() const
-{
- Q_D(const QDeclarativeTranslate);
- return d->z;
-}
-void QDeclarativeTranslate::setZ(qreal z)
-{
- Q_D(QDeclarativeTranslate);
- if (d->z == z)
- return;
- d->z = z;
- update();
- emit positionChanged();
-}
-
-/*!
\reimp
*/
void QDeclarativeTranslate::applyTo(QMatrix4x4 *matrix) const
{
Q_D(const QDeclarativeTranslate);
- matrix->translate(d->x, d->y, d->z);
+ matrix->translate(d->x, d->y, 0);
}
/*!
@@ -155,7 +131,6 @@ void QDeclarativeTranslate::applyTo(QMatrix4x4 *matrix) const
QDeclarativeTranslate emits this signal when its position changes.
\sa QDeclarativeTranslate::x, QDeclarativeTranslate::y
- \sa QDeclarativeTranslate::z
*/
QT_END_NAMESPACE