summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-02 02:41:42 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-02 02:41:42 (GMT)
commit662666a5d4d114f91dbed8cbe3ce46fddfe3c82b (patch)
tree0b72d67d46bf1693e1b3e2b8669fef8c8c89e766 /src/gui/graphicsview/qgraphicsitem.cpp
parent35a211cd95e0d09ef0b547b57f01f0a9ff41da2f (diff)
parent64ca7030df6189a0bc4df36473befd868c8d2ef6 (diff)
downloadQt-662666a5d4d114f91dbed8cbe3ce46fddfe3c82b.zip
Qt-662666a5d4d114f91dbed8cbe3ce46fddfe3c82b.tar.gz
Qt-662666a5d4d114f91dbed8cbe3ce46fddfe3c82b.tar.bz2
Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into kinetic-declarativeui
Conflicts: tools/linguist/lupdate/main.cpp
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 3d81021..94e9fdd 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -268,6 +268,17 @@
*/
/*!
+ \variable QGraphicsItem::Type
+
+ The type value returned by the virtual type() function in standard
+ graphics item classes in Qt. All such standard graphics item
+ classes in Qt are associated with a unique value for Type,
+ e.g. the value returned by QGraphicsPathItem::type() is 2.
+
+ \snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 18
+*/
+
+/*!
\variable QGraphicsItem::UserType
The lowest permitted type value for custom items (subclasses
@@ -276,6 +287,8 @@
and declaring a Type enum value. Example:
\snippet doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp 1
+
+ \note UserType = 65536
*/
/*!
@@ -1558,17 +1571,18 @@ const QGraphicsObject *QGraphicsItem::toGraphicsObject() const
}
/*!
- Sets this item's parent item to \a parent. If this item already has a
- parent, it is first removed from the previous parent. If \a parent is 0,
- this item will become a top-level item.
+ Sets this item's parent item to \a newParent. If this item already
+ has a parent, it is first removed from the previous parent. If \a
+ newParent is 0, this item will become a top-level item.
- Note that this implicitly adds this graphics item to the scene of
- the parent. You should not \l{QGraphicsScene::addItem()}{add} the
- item to the scene yourself.
+ Note that this implicitly adds this graphics item to the scene of
+ the parent. You should not \l{QGraphicsScene::addItem()}{add} the
+ item to the scene yourself.
- Calling this function on an item that is an ancestor of \a parent have undefined behaviour.
+ Calling this function on an item that is an ancestor of \a newParent
+ have undefined behaviour.
- \sa parentItem(), childItems()
+ \sa parentItem(), childItems()
*/
void QGraphicsItem::setParentItem(QGraphicsItem *newParent)
{
@@ -7247,7 +7261,9 @@ void QGraphicsItem::prepareGeometryChange()
QGraphicsScenePrivate *scenePrivate = d_ptr->scene->d_func();
scenePrivate->index->prepareBoundingRectChange(this);
- scenePrivate->markDirty(this, QRectF(), /*invalidateChildren=*/true);
+ scenePrivate->markDirty(this, QRectF(), /*invalidateChildren=*/true, /*force=*/false,
+ /*ignoreOpacity=*/ false, /*removingItemFromScene=*/ false,
+ /*updateBoundingRect=*/true);
// For compatibility reasons, we have to update the item's old geometry
// if someone is connected to the changed signal or the scene has no views.