summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-26 04:33:04 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-26 04:36:50 (GMT)
commit09a40e13174b9f34007ce9fbd98e06b4e48c1954 (patch)
tree8f7735640e87e154d434f80130ab8812e3f4e58b /src/declarative/graphicsitems/qdeclarativeitem.cpp
parentc2928bfdb467d7c54a97a71b6a1169db02e623fe (diff)
downloadQt-09a40e13174b9f34007ce9fbd98e06b4e48c1954.zip
Qt-09a40e13174b9f34007ce9fbd98e06b4e48c1954.tar.gz
Qt-09a40e13174b9f34007ce9fbd98e06b4e48c1954.tar.bz2
Control of image rendered size (esp. SVG).
Add Translate transform. Image::sourceWidth and Image::sourceHeight read/write properties. Task-number: QTBUG-8984
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index dd6056e..c331af7 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -83,7 +83,43 @@ QT_BEGIN_NAMESPACE
You can assign any number of Transform elements to an Item. Each Transform is applied in order,
one at a time, to the Item it's assigned to.
- \sa Rotation, Scale
+ \sa Rotation, Scale, Translate
+*/
+
+/*!
+ \qmlclass Translate QGraphicsTranslate
+ \since 4.7
+ \brief The Translate object provides a way to move an Item without changing its x or y.
+
+ The Translate object independent control over position in addition to the Item's x and y properties.
+
+ The following example moves the X axis of the Rectangle, relative to its interior point 25, 25:
+ \qml
+ Row {
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Translate { y: 20 }
+ }
+ Rectangle {
+ width: 100; height: 100
+ color: "red"
+ transform: Translate { y: -20 }
+ }
+ }
+ \endqml
+*/
+
+/*!
+ \qmlproperty real Translate::x
+
+ The translation along the X axis.
+*/
+
+/*!
+ \qmlproperty real Translate::yTranslate
+
+ The translation along the Y axis.
*/
/*!