aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickmousearea_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-12-05 10:28:20 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-01-28 17:14:37 +0000
commit44ab79012f1662a4efa7c506b6ebc4466c50b3e9 (patch)
tree856c2bb40a42da5fb905bc858af87505fa2a75e8 /src/quick/items/qquickmousearea_p.h
parent9a23ecfb58c4795a7d3e722088c81a823cfb8c8d (diff)
MouseArea: add scrollGestureEnabled property
If true, scroll gestures coming from the operating system can cause wheel to be emitted; if false, only an actual mouse wheel will do that. The photosurface example demostrates the use case. 1) the flick gesture on a trackpad should flick the underlying Flickable, not zoom an individual image 2) mouse wheel should zoom an individual image if the cursor is pointing to it 3) dragging an image on a touchscreen should be possible, independently of flicking the Flickable. This means multiPointTouchEnabled should be true, so we cannot interpret multiPointTouchEnabled to mean that multipoint touch scroll gestures should be disabled. Change-Id: Ie063556866f07b3fbadc53990b110edeed532710 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickmousearea_p.h')
-rw-r--r--src/quick/items/qquickmousearea_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h
index 8348a255d9..e6bed1a72c 100644
--- a/src/quick/items/qquickmousearea_p.h
+++ b/src/quick/items/qquickmousearea_p.h
@@ -54,6 +54,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickMouseArea : public QQuickItem
Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged)
Q_PROPERTY(bool pressed READ pressed NOTIFY pressedChanged)
Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged)
+ Q_PROPERTY(bool scrollGestureEnabled READ isScrollGestureEnabled WRITE setScrollGestureEnabled NOTIFY scrollGestureEnabledChanged)
Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedButtonsChanged)
Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged)
Q_PROPERTY(bool hoverEnabled READ hoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged)
@@ -77,6 +78,9 @@ public:
bool isEnabled() const;
void setEnabled(bool);
+ bool isScrollGestureEnabled() const;
+ void setScrollGestureEnabled(bool);
+
bool hovered() const;
bool pressed() const;
bool containsPress() const;
@@ -108,6 +112,7 @@ Q_SIGNALS:
void hoveredChanged();
void pressedChanged();
void enabledChanged();
+ void scrollGestureEnabledChanged();
void pressedButtonsChanged();
void acceptedButtonsChanged();
void hoverEnabledChanged();