diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2012-06-04 14:18:32 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-05 09:02:55 +0200 |
commit | a3768cb3bd27213a262518535d2d9edc88754dd9 (patch) | |
tree | cc8e5fde857cb177e0336d844583ea56c9f179b9 | |
parent | b7be632d5e777dfdfd7d6a31ba083e3ac653603d (diff) |
Add StartDragVelocity to style hints
This will be used by Flickable in combination with the drag distance
to improve the drag start detection logic.
Change-Id: Ica30042ef3d15041d857b07fa4173dde3d3f900f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r-- | src/gui/kernel/qplatformintegration.h | 3 | ||||
-rw-r--r-- | src/gui/kernel/qplatformintegration_qpa.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qstylehints.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qstylehints.h | 1 |
4 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h index 2c67664b00..3990adb3fe 100644 --- a/src/gui/kernel/qplatformintegration.h +++ b/src/gui/kernel/qplatformintegration.h @@ -132,7 +132,8 @@ public: KeyboardAutoRepeatRate, ShowIsFullScreen, PasswordMaskDelay, - FontSmoothingGamma + FontSmoothingGamma, + StartDragVelocity }; virtual QVariant styleHint(StyleHint hint) const; diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index 819f31efea..3021f6373e 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -296,6 +296,8 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const return 0; case FontSmoothingGamma: return qreal(1.7); + case StartDragVelocity: + return 0; // no limit } return 0; diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp index a98e5fbd76..53c5a07f6b 100644 --- a/src/gui/kernel/qstylehints.cpp +++ b/src/gui/kernel/qstylehints.cpp @@ -76,6 +76,11 @@ int QStyleHints::startDragTime() const return hint(QPlatformIntegration::StartDragTime).toInt(); } +int QStyleHints::startDragVelocity() const +{ + return hint(QPlatformIntegration::StartDragVelocity).toInt(); +} + int QStyleHints::keyboardInputInterval() const { return hint(QPlatformIntegration::KeyboardInputInterval).toInt(); diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h index 301b51868f..f15679b7d6 100644 --- a/src/gui/kernel/qstylehints.h +++ b/src/gui/kernel/qstylehints.h @@ -58,6 +58,7 @@ public: int mouseDoubleClickInterval() const; int startDragDistance() const; int startDragTime() const; + int startDragVelocity() const; int keyboardInputInterval() const; int keyboardAutoRepeatRate() const; int cursorFlashTime() const; |