summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativeitem.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-09 01:47:04 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-09 01:47:04 (GMT)
commit9a32c5940f259f101f13b91dcb95d9861fb9043d (patch)
treeaf73f5081e20002fab7319a05ce5bccf48e6c302 /src/declarative/graphicsitems/qdeclarativeitem.cpp
parent2580b9b646586de0844d120d41f7240d75bc1a07 (diff)
parent147b11193618c954f41625b469a113f202362468 (diff)
downloadQt-9a32c5940f259f101f13b91dcb95d9861fb9043d.zip
Qt-9a32c5940f259f101f13b91dcb95d9861fb9043d.tar.gz
Qt-9a32c5940f259f101f13b91dcb95d9861fb9043d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Move pixmapChanged signal to QDeclarativeImage Minor cleanup. Add highlightRangeMode and snapMode to GridView. Minor anchors.fill optimization. Use one thread for all instances.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem.cpp')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 59dd43d..9d6b2a0 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -2855,6 +2855,27 @@ bool QDeclarativeItem::heightValid() const
return d->heightValid;
}
+/*! \internal */
+void QDeclarativeItem::setSize(const QSizeF &size)
+{
+ Q_D(QDeclarativeItem);
+ d->heightValid = true;
+ d->widthValid = true;
+
+ if (d->height == size.height() && d->width == size.width())
+ return;
+
+ qreal oldHeight = d->height;
+ qreal oldWidth = d->width;
+
+ prepareGeometryChange();
+ d->height = size.height();
+ d->width = size.width();
+
+ geometryChanged(QRectF(x(), y(), width(), height()),
+ QRectF(x(), y(), oldWidth, oldHeight));
+}
+
/*!
\qmlproperty bool Item::wantsFocus