aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-07 17:06:03 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-07 17:07:44 +0100
commitb907a01b467b551756b108f6c9a04d7e7382ae64 (patch)
tree2d21d785186ce485f615034e6667d9673b62a4fc /src/quick/items/qquickitem.cpp
parent4f8537ff8c9427705e3587861a62fe81cf3e503b (diff)
parent1d29d8edf8e4e709ca2f27791cdf8672c15488f3 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: examples/quick/textureprovider/etcprovider.h src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp src/qml/doc/qtqml.qdocconf src/quick/doc/qtquick.qdocconf tests/auto/quick/qquickflickable/tst_qquickflickable.cpp Change-Id: I5027b0ee024e00b9525bd45516b7f401ff7d4ae4
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp90
1 files changed, 87 insertions, 3 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 8e2a8c2ddc..e87f870eb8 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -1706,15 +1706,91 @@ void QQuickItemPrivate::updateSubFocusItem(QQuickItem *scope, bool focus)
/*!
\enum QQuickItem::ItemChange
- \internal
+ \brief Used in conjunction with QQuickItem::itemChange() to notify
+ the item about certain types of changes.
+
+ \value ItemChildAddedChange A child was added. ItemChangeData::item contains
+ the added child.
+
+ \value ItemChildRemovedChange A child was removed. ItemChangeData::item
+ contains the removed child.
+
+ \value ItemSceneChange The item was added to or removed from a scene. The
+ QQuickWindow rendering the scene is specified in using ItemChangeData::window.
+ The window parameter is null when the item is removed from a scene.
+
+ \value ItemVisibleHasChanged The item's visibility has changed.
+ ItemChangeData::boolValue contains the new visibility.
+
+ \value ItemParentHasChanged The item's parent has changed.
+ ItemChangeData::item contains the new parent.
+
+ \value ItemOpacityHasChanged The item's opacity has changed.
+ ItemChangeData::realValue contains the new opacity.
+
+ \value ItemActiveFocusHasChanged The item's focus has changed.
+ ItemChangeData::boolValue contains whether the item has focus or not.
+
+ \value ItemRotationHasChanged The item's rotation has changed.
+ ItemChangeData::realValue contains the new rotation.
*/
/*!
\class QQuickItem::ItemChangeData
- \internal
+ \inmodule QtQuick
+ \brief Adds supplimentary information to the QQuickItem::itemChange()
+ function.
+
+ The meaning of each member of this class is defined by the change type.
+
+ \sa QQuickItem::ItemChange
*/
/*!
+ \fn QQuickItem::ItemChangeData::ItemChangeData(QQuickItem *)
+ \internal
+ */
+
+/*!
+ \fn QQuickItem::ItemChangeData::ItemChangeData(QQuickWindow *)
+ \internal
+ */
+
+/*!
+ \fn QQuickItem::ItemChangeData::ItemChangeData(qreal)
+ \internal
+ */
+
+/*!
+ \fn QQuickItem::ItemChangeData::ItemChangeData(bool)
+ \internal
+ */
+
+/*!
+ \variable QQuickItem::ItemChangeData::realValue
+ Contains supplimentary information to the QQuickItem::itemChange() function.
+ \sa QQuickItem::ItemChange
+ */
+
+/*!
+ \variable QQuickItem::ItemChangeData::boolValue
+ Contains supplimentary information to the QQuickItem::itemChange() function.
+ \sa QQuickItem::ItemChange
+ */
+
+/*!
+ \variable QQuickItem::ItemChangeData::item
+ Contains supplimentary information to the QQuickItem::itemChange() function.
+ \sa QQuickItem::ItemChange
+ */
+
+/*!
+ \variable QQuickItem::ItemChangeData::window
+ Contains supplimentary information to the QQuickItem::itemChange() function.
+ \sa QQuickItem::ItemChange
+ */
+
+/*!
\enum QQuickItem::TransformOrigin
Controls the point about which simple transforms like scale apply.
@@ -2161,6 +2237,11 @@ void QQuickItem::stackAfter(const QQuickItem *sibling)
/*!
Returns the window in which this item is rendered.
+
+ The item does not have a window until it has been assigned into a scene. To
+ get notification about this, reimplement the itemChange() function and
+ listen for the ItemSceneChange change. The itemChange() function is called
+ both when the item is entered into a scene and when it is removed from a scene.
*/
QQuickWindow *QQuickItem::window() const
{
@@ -4190,7 +4271,10 @@ void QQuickItemPrivate::deliverDragEvent(QEvent *e)
#endif // QT_NO_DRAGANDDROP
/*!
- \internal
+ Called when \a change occurs for this item.
+
+ \a value contains extra information relating to the change, when
+ applicable.
*/
void QQuickItem::itemChange(ItemChange change, const ItemChangeData &value)
{