diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-12-15 22:22:16 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-12-15 22:22:16 (GMT) |
commit | 889b15f62121fd79b28b9f903569fc101578a139 (patch) | |
tree | e428adfeaa373673aa6557da6ede7ac56b63a800 /src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h | |
parent | 1e234c557ddbe5787b537f14ca383bd16e4e4cd1 (diff) | |
download | Qt-889b15f62121fd79b28b9f903569fc101578a139.zip Qt-889b15f62121fd79b28b9f903569fc101578a139.tar.gz Qt-889b15f62121fd79b28b9f903569fc101578a139.tar.bz2 |
Watch item geometry changes without using signal/slot connections.
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h b/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h index 4f7fde0..91c8ff1 100644 --- a/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h +++ b/src/declarative/graphicsitems/qmlgraphicsanchors_p_p.h @@ -54,7 +54,7 @@ // #include "qmlgraphicsanchors_p.h" - +#include "qmlgraphicsitemgeometrylistener_p.h" #include <private/qobject_p.h> QT_BEGIN_NAMESPACE @@ -91,7 +91,7 @@ Q_DECLARE_METATYPE(QmlGraphicsAnchorLine) -class QmlGraphicsAnchorsPrivate : public QObjectPrivate +class QmlGraphicsAnchorsPrivate : public QObjectPrivate, public QmlGraphicsItemGeometryListener { Q_DECLARE_PUBLIC(QmlGraphicsAnchors) public: @@ -128,7 +128,10 @@ public: void updateOnComplete(); void updateMe(); - void update(QmlGraphicsItem *, const QRectF &, const QRectF &); + + // QmlGraphicsItemGeometryListener interface + void itemGeometryChanged(QmlGraphicsItem *, const QRectF &, const QRectF &); + QmlGraphicsAnchorsPrivate *anchorPrivate() { return this; } bool checkHValid() const; bool checkVValid() const; |