diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-07-29 06:36:46 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-07-29 06:36:46 (GMT) |
commit | eae48b410cc28b83433b7dcba379a31aae2ce2df (patch) | |
tree | a2ee1c29f135bcd95868eb5a1cf8e389ad820a4f /src/declarative/graphicsitems/qdeclarativepathview_p.h | |
parent | 5d5feaa86f3933a1e89b53267953b86e2b0459ed (diff) | |
download | Qt-eae48b410cc28b83433b7dcba379a31aae2ce2df.zip Qt-eae48b410cc28b83433b7dcba379a31aae2ce2df.tar.gz Qt-eae48b410cc28b83433b7dcba379a31aae2ce2df.tar.bz2 |
Add moving and flicking properties to PathView
PathView handles its own mouse interaction, but lacked properties
similar to those in Flickable to determine when it is stationary.
This made it impossible to start an animation when the view stops moving,
for example.
Task-number: QTBUG-12497
Reviewed-by: Warwick Allison
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativepathview_p.h')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativepathview_p.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h index d2980c6..035a64b 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h @@ -74,6 +74,9 @@ class Q_AUTOTEST_EXPORT QDeclarativePathView : public QDeclarativeItem Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged) Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged) + Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged) + Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged) + Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount NOTIFY pathItemCountChanged) @@ -122,6 +125,9 @@ public: bool isInteractive() const; void setInteractive(bool); + bool isMoving() const; + bool isFlicking() const; + int count() const; QDeclarativeComponent *delegate() const; @@ -151,9 +157,15 @@ Q_SIGNALS: void pathItemCountChanged(); void flickDecelerationChanged(); void interactiveChanged(); + void movingChanged(); + void flickingChanged(); void highlightChanged(); void highlightItemChanged(); void highlightMoveDurationChanged(); + void movementStarted(); + void movementEnded(); + void flickStarted(); + void flickEnded(); protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); @@ -167,6 +179,7 @@ protected: private Q_SLOTS: void refill(); void ticked(); + void movementEnding(); void itemsInserted(int index, int count); void itemsRemoved(int index, int count); void itemsMoved(int,int,int); |