diff options
author | Olivier JG <olivier.de.gaalon@kdab.com> | 2016-12-07 11:57:03 -0600 |
---|---|---|
committer | Olivier de Gaalon <olivier.de.gaalon@kdab.com> | 2016-12-16 18:28:44 +0000 |
commit | 17a1c12a4520c4ae756e7dd5c08b2386ef84673a (patch) | |
tree | bbad701738b98f890b9327c9c7ed6c3631fb39c6 /src/quick/items/qquickmousearea_p.h | |
parent | 0e80d28aa5892d6bbb4d0017b1bc9a33489f4176 (diff) |
Add pressAndHoldInterval to MouseArea
Introduce pressAndHoldInterval to allow setting the pressAndHold delay
per-MouseArea.
[ChangeLog][QtQml][MouseArea] Introduce pressAndHoldInterval property,
which controls the elapsed time before pressAndHold is emitted.
Task-Id: QTBUG-47662
Change-Id: Ic2173335033a6ed0d4b652333020f030de63a8e7
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/quick/items/qquickmousearea_p.h')
-rw-r--r-- | src/quick/items/qquickmousearea_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickmousearea_p.h b/src/quick/items/qquickmousearea_p.h index d90c8e1baa..ee166a2082 100644 --- a/src/quick/items/qquickmousearea_p.h +++ b/src/quick/items/qquickmousearea_p.h @@ -84,6 +84,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickMouseArea : public QQuickItem Q_PROPERTY(Qt::CursorShape cursorShape READ cursorShape WRITE setCursorShape RESET unsetCursor NOTIFY cursorShapeChanged) #endif Q_PROPERTY(bool containsPress READ containsPress NOTIFY containsPressChanged REVISION 1) + Q_PROPERTY(int pressAndHoldInterval READ pressAndHoldInterval WRITE setPressAndHoldInterval NOTIFY pressAndHoldIntervalChanged RESET resetPressAndHoldInterval REVISION 9) public: QQuickMouseArea(QQuickItem *parent=0); @@ -125,6 +126,10 @@ public: void setCursorShape(Qt::CursorShape shape); #endif + int pressAndHoldInterval() const; + void setPressAndHoldInterval(int interval); + void resetPressAndHoldInterval(); + Q_SIGNALS: void hoveredChanged(); void pressedChanged(); @@ -152,6 +157,7 @@ Q_SIGNALS: void exited(); void canceled(); Q_REVISION(1) void containsPressChanged(); + Q_REVISION(9) void pressAndHoldIntervalChanged(); protected: void setHovered(bool); |