diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-17 00:46:53 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-17 00:46:53 (GMT) |
commit | 39b2302dbed5fe510d71c1bde3864a79c1a4c9d0 (patch) | |
tree | 80a8637d57124a17fce83ba3f1a67236e5201153 | |
parent | 539f7d9f4055a511d2820d19963ba0340983f8b1 (diff) | |
download | Qt-39b2302dbed5fe510d71c1bde3864a79c1a4c9d0.zip Qt-39b2302dbed5fe510d71c1bde3864a79c1a4c9d0.tar.gz Qt-39b2302dbed5fe510d71c1bde3864a79c1a4c9d0.tar.bz2 |
NOTIFY on children changed
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsitem.cpp | 7 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsitem.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.cpp b/src/declarative/graphicsitems/qmlgraphicsitem.cpp index ca45f62..fb6afb1 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.cpp +++ b/src/declarative/graphicsitems/qmlgraphicsitem.cpp @@ -1428,6 +1428,11 @@ QmlGraphicsKeysAttached *QmlGraphicsKeysAttached::qmlAttachedProperties(QObject */ /*! + \fn void QmlGraphicsItem::childrenChanged() + \internal +*/ + +/*! \fn void QmlGraphicsItem::focusChanged() \internal */ @@ -2692,6 +2697,8 @@ QVariant QmlGraphicsItem::itemChange(GraphicsItemChange change, { if (change == ItemParentHasChanged) { emit parentChanged(); + } else if (change == ItemChildAddedChange || change == ItemChildRemovedChange) { + emit childrenChanged(); } return QGraphicsItem::itemChange(change, value); diff --git a/src/declarative/graphicsitems/qmlgraphicsitem.h b/src/declarative/graphicsitems/qmlgraphicsitem.h index 2ac43b5..11d6e2e 100644 --- a/src/declarative/graphicsitems/qmlgraphicsitem.h +++ b/src/declarative/graphicsitems/qmlgraphicsitem.h @@ -69,7 +69,7 @@ class Q_DECLARATIVE_EXPORT QmlGraphicsItem : public QGraphicsObject, public QmlP Q_PROPERTY(QmlGraphicsItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged DESIGNABLE false FINAL) Q_PROPERTY(QmlList<QObject *> *data READ data DESIGNABLE false) - Q_PROPERTY(QmlList<QmlGraphicsItem *>* children READ fxChildren DESIGNABLE false) + Q_PROPERTY(QmlList<QmlGraphicsItem *>* children READ fxChildren DESIGNABLE false NOTIFY childrenChanged) Q_PROPERTY(QmlList<QObject *>* resources READ resources DESIGNABLE false) Q_PROPERTY(QmlList<QmlState *>* states READ states DESIGNABLE false) Q_PROPERTY(QmlList<QmlTransition *>* transitions READ transitions DESIGNABLE false) @@ -160,6 +160,7 @@ public: Q_SIGNALS: void widthChanged(); void heightChanged(); + void childrenChanged(); void childrenRectChanged(); void baselineOffsetChanged(); void stateChanged(const QString &); |