Add StartDragVelocity to style hints
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>
Mon, 4 Jun 2012 11:18:32 +0000 (14:18 +0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 5 Jun 2012 07:02:55 +0000 (09:02 +0200)
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>
src/gui/kernel/qplatformintegration.h
src/gui/kernel/qplatformintegration_qpa.cpp
src/gui/kernel/qstylehints.cpp
src/gui/kernel/qstylehints.h

index 2c67664..3990adb 100644 (file)
@@ -132,7 +132,8 @@ public:
         KeyboardAutoRepeatRate,
         ShowIsFullScreen,
         PasswordMaskDelay,
-        FontSmoothingGamma
+        FontSmoothingGamma,
+        StartDragVelocity
     };
 
     virtual QVariant styleHint(StyleHint hint) const;
index 819f31e..3021f63 100644 (file)
@@ -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;
index a98e5fb..53c5a07 100644 (file)
@@ -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();
index 301b518..f15679b 100644 (file)
@@ -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;