summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformtheme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qplatformtheme.cpp')
-rw-r--r--src/gui/kernel/qplatformtheme.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index fc1b607563..878f656f2e 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -156,6 +156,11 @@ QT_BEGIN_NAMESPACE
\value ContextMenuOnMouseRelease (bool) Whether the context menu should be shown on mouse release.
+ \value TouchDoubleTapDistance (int) The maximum distance in logical pixels which a touchpoint can travel
+ between taps in order for the tap sequence to be handled as a double tap.
+ The default value is double the MouseDoubleClickDistance, or 10 logical pixels
+ if that is not specified.
+
\sa themeHint(), QStyle::pixelMetric()
*/
@@ -540,6 +545,14 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
}
case WheelScrollLines:
return QVariant(3);
+ case TouchDoubleTapDistance:
+ {
+ bool ok = false;
+ int dist = qEnvironmentVariableIntValue("QT_DBL_TAP_DIST", &ok);
+ if (!ok)
+ dist = defaultThemeHint(MouseDoubleClickDistance).toInt(&ok) * 2;
+ return QVariant(ok ? dist : 10);
+ }
}
return QVariant();
}
@@ -665,6 +678,19 @@ QString QPlatformTheme::standardButtonText(int button) const
return QPlatformTheme::defaultStandardButtonText(button);
}
+/*!
+ Returns the mnemonic that should be used for a standard \a button.
+
+ \since 5.9
+ \sa QPlatformDialogHelper::StandardButton
+ */
+
+QKeySequence QPlatformTheme::standardButtonShortcut(int button) const
+{
+ Q_UNUSED(button)
+ return QKeySequence();
+}
+
QString QPlatformTheme::defaultStandardButtonText(int button)
{
switch (button) {