summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformtheme_qpa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qplatformtheme_qpa.cpp')
-rw-r--r--src/gui/kernel/qplatformtheme_qpa.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformtheme_qpa.cpp b/src/gui/kernel/qplatformtheme_qpa.cpp
index b4a177f915..22d4452f4e 100644
--- a/src/gui/kernel/qplatformtheme_qpa.cpp
+++ b/src/gui/kernel/qplatformtheme_qpa.cpp
@@ -41,8 +41,36 @@
#include "qplatformtheme_qpa.h"
+#include <QtCore/QVariant>
+
QT_BEGIN_NAMESPACE
+/*!
+ \class QPlatformTheme
+ \since 5.0
+ \internal
+ \preliminary
+ \ingroup qpa
+ \brief The QPlatformTheme class allows customizing the UI based on themes.
+
+*/
+
+/*!
+ \enum QPlatformTheme::ThemeHint
+
+ This enum describes the available theme hints.
+
+ \value TextCursorWidth (int) Determines the width of the text cursor.
+
+ \value DropShadow (bool) Determines whether the drop shadow effect for
+ tooltips or whatsthis is enabled.
+
+ \value MaximumScrollBarDragDistance (int) Determines the value returned by
+ QStyle::pixelMetric(PM_MaximumDragDistance)
+
+ \sa themeHint(), QStyle::pixelMetric()
+*/
+
QPlatformMenu *QPlatformTheme::createPlatformMenu(QMenu *menu) const
{
Q_UNUSED(menu);
@@ -67,4 +95,17 @@ QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(QDialog *dialo
return 0;
}
+QVariant QPlatformTheme::themeHint(ThemeHint hint) const
+{
+ switch (hint) {
+ case TextCursorWidth:
+ return QVariant(1);
+ case DropShadow:
+ return QVariant(false);
+ case MaximumScrollBarDragDistance:
+ return QVariant(-1);
+ }
+ return QVariant();
+}
+
QT_END_NAMESPACE