summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-02-08 06:09:15 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-02-08 06:09:15 (GMT)
commit9dd2659319ba6b19c8612561f8b8bfe050ca914c (patch)
treec59cb4ac02991459e0ffa084cdffd551aa28ec7b /src/declarative
parentfd2463dcde5d921bccdbaddf25e33574affbd41f (diff)
downloadQt-9dd2659319ba6b19c8612561f8b8bfe050ca914c.zip
Qt-9dd2659319ba6b19c8612561f8b8bfe050ca914c.tar.gz
Qt-9dd2659319ba6b19c8612561f8b8bfe050ca914c.tar.bz2
Make transformOrigin Center by default
Task-number: QTBUG-7430
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem.cpp26
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsitem_p.h2
2 files changed, 14 insertions, 14 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
index b03f359..8973cb4 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp
@@ -119,7 +119,7 @@ QML_DEFINE_TYPE(Qt,4,6,Rotation,QGraphicsRotation)
/*!
\qmlproperty real Scale::xScale
- The scaling factor for the X axis.
+ The scaling factor for the X axis.
*/
/*!
@@ -1408,7 +1408,7 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject
/*!
\fn void QmlGraphicsItem::widthChanged()
- \internal
+ \internal
*/
/*!
@@ -1443,7 +1443,7 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject
// ### Must fix
struct RegisterAnchorLineAtStartup {
- RegisterAnchorLineAtStartup() {
+ RegisterAnchorLineAtStartup() {
qRegisterMetaType<QmlGraphicsAnchorLine>("QmlGraphicsAnchorLine");
}
};
@@ -1508,16 +1508,16 @@ QmlGraphicsItem::~QmlGraphicsItem()
\image declarative-transformorigin.png
- This example scales an image about its center.
+ This example rotates an image around its bottom-right corner.
\qml
Image {
source: "myimage.png"
- transformOrigin: Item.Center
- scale: 4
+ transformOrigin: Item.BottomRight
+ rotate: 45
}
\endqml
- The default transform origin is \c TopLeft.
+ The default transform origin is \c Center.
*/
/*!
@@ -2586,7 +2586,7 @@ void QmlGraphicsItem::setState(const QString &state)
/*!
\property QmlGraphicsItem::transform
- \internal
+ \internal
*/
/*! \internal */
@@ -2813,7 +2813,7 @@ void QmlGraphicsItem::setTransformOrigin(TransformOrigin origin)
smooth pixmap filtering, false otherwise.
The default is false.
-
+
\sa setSmooth()
*/
bool QmlGraphicsItem::smooth() const
@@ -3050,16 +3050,16 @@ QDebug operator<<(QDebug debug, QmlGraphicsItem *item)
}
int QmlGraphicsItemPrivate::consistentTime = -1;
-void QmlGraphicsItemPrivate::setConsistentTime(int t)
-{
- consistentTime = t;
+void QmlGraphicsItemPrivate::setConsistentTime(int t)
+{
+ consistentTime = t;
}
QTime QmlGraphicsItemPrivate::currentTime()
{
if (consistentTime == -1)
return QTime::currentTime();
- else
+ else
return QTime(0, 0).addMSecs(consistentTime);
}
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem_p.h b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
index 91d2119..1741808 100644
--- a/src/declarative/graphicsitems/qmlgraphicsitem_p.h
+++ b/src/declarative/graphicsitems/qmlgraphicsitem_p.h
@@ -110,7 +110,7 @@ public:
: _anchors(0), _contents(0),
_baselineOffset(0),
_anchorLines(0),
- _stateGroup(0), origin(QmlGraphicsItem::TopLeft),
+ _stateGroup(0), origin(QmlGraphicsItem::Center),
widthValid(false), heightValid(false),
_componentComplete(true), _keepMouse(false),
smooth(false), keyHandler(0),