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>
This commit is contained in:
Laszlo Agocs 2012-06-04 14:18:32 +03:00 committed by Qt by Nokia
parent b7be632d5e
commit a3768cb3bd
4 changed files with 10 additions and 1 deletions

View File

@ -132,7 +132,8 @@ public:
KeyboardAutoRepeatRate,
ShowIsFullScreen,
PasswordMaskDelay,
FontSmoothingGamma
FontSmoothingGamma,
StartDragVelocity
};
virtual QVariant styleHint(StyleHint hint) const;

View 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;

View 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();

View 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;