diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-10 02:11:27 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-11-10 02:11:27 (GMT) |
commit | 4983b04da9f3258519e4b15f8e593bf2a11f3556 (patch) | |
tree | fc1c7e6b8578268e45a8bbf12ba08c2c2f12ae78 /src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h | |
parent | cdabdb79808b3788519fa3bde0d240f2b11a4b34 (diff) | |
parent | 8d930f43d6e0827ece00b61676b736421b50f290 (diff) | |
download | Qt-4983b04da9f3258519e4b15f8e593bf2a11f3556.zip Qt-4983b04da9f3258519e4b15f8e593bf2a11f3556.tar.gz Qt-4983b04da9f3258519e4b15f8e593bf2a11f3556.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h b/src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h index 61b4497..d7a31a3 100644 --- a/src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h +++ b/src/declarative/graphicsitems/qmlgraphicspositioners_p_p.h @@ -60,6 +60,7 @@ #include <private/qmlstate_p.h> #include <private/qmltransitionmanager_p_p.h> #include <private/qmlstateoperations_p.h> +#include <QtCore/QTimer> QT_BEGIN_NAMESPACE class QmlGraphicsBasePositionerPrivate : public QmlGraphicsItemPrivate @@ -70,10 +71,17 @@ public: QmlGraphicsBasePositionerPrivate() : _ep(false), _componentComplete(false), _spacing(0), aut(QmlGraphicsBasePositioner::None), moveTransition(0), addTransition(0), - removeTransition(0), _movingItem(0) + removeTransition(0), _movingItem(0), queuedPositioning(false) { } + ~QmlGraphicsBasePositionerPrivate() + { + watched.removeAll(0); + foreach(QmlGraphicsItem* other, watched) + unwatchChanges(other);//Need to deregister from a list in QmlGI Private + } + void init(QmlGraphicsBasePositioner::AutoUpdateType at) { aut = at; @@ -99,6 +107,22 @@ public: QmlTransitionManager removeTransitionManager; // QmlStateGroup *stateGroup; QmlGraphicsItem *_movingItem; + + void watchChanges(QmlGraphicsItem *other); + void unwatchChanges(QmlGraphicsItem* other); + QList<QGuard<QmlGraphicsItem> > watched; + bool queuedPositioning; + + virtual void otherSiblingOrderChange(QmlGraphicsItemPrivate* other) + { + Q_Q(QmlGraphicsBasePositioner); + Q_UNUSED(other); + if(!queuedPositioning){ + //Delay is due to many children often being reordered at once + QTimer::singleShot(0,q,SLOT(prePositioning())); + queuedPositioning = true; + } + } }; QT_END_NAMESPACE |