aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickflickable_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-06-12 20:23:10 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-01-21 00:31:45 +0100
commit7ee429dd7a12dc38a4e4af8888325d111883a2ff (patch)
treefa3beeda8b1f342fdf05199dc4580a43c073ddef /src/quick/items/qquickflickable_p.h
parentfdec43a1ff7d8ff8a9cd014e7282e95d262fe5ed (diff)
Introduce Flickable.OvershootBounds behavior
Related to QTBUG-38515. It is not always desired to allow dragging over bounds even if flicking overshoots. This makes it possible to implement collision effects for flicks, while a drag over bounds would still do nothing. [ChangeLog][QtQuick][Flickable] Introduced Flickable.OvershootBounds behavior that allows content overshooting the boundary when flicked, but does not allow dragging content beyond the boundary of Flickable. [ChangeLog][QtQuick][Important Behavior Changes] Flickable.DragAndOvershootBounds value changed from 2 to 3. This will only affect you if you've worked around enum type checking and have the integer value explicitly in your code. Change-Id: I63c3540ab293a9c7c801d81220f74909d3fa1e17 Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
Diffstat (limited to 'src/quick/items/qquickflickable_p.h')
-rw-r--r--src/quick/items/qquickflickable_p.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h
index c996d18b01..6b58584751 100644
--- a/src/quick/items/qquickflickable_p.h
+++ b/src/quick/items/qquickflickable_p.h
@@ -94,7 +94,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickFlickable : public QQuickItem
Q_CLASSINFO("DefaultProperty", "flickableData")
Q_ENUMS(FlickableDirection)
- Q_ENUMS(BoundsBehavior)
+ Q_FLAGS(BoundsBehavior)
public:
QQuickFlickable(QQuickItem *parent=0);
@@ -103,7 +103,14 @@ public:
QQmlListProperty<QObject> flickableData();
QQmlListProperty<QQuickItem> flickableChildren();
- enum BoundsBehavior { StopAtBounds, DragOverBounds, DragAndOvershootBounds };
+ enum BoundsBehaviorFlag {
+ StopAtBounds = 0x0,
+ DragOverBounds = 0x1,
+ OvershootBounds = 0x2,
+ DragAndOvershootBounds = DragOverBounds | OvershootBounds
+ };
+ Q_DECLARE_FLAGS(BoundsBehavior, BoundsBehaviorFlag)
+
BoundsBehavior boundsBehavior() const;
void setBoundsBehavior(BoundsBehavior);