summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformtheme_qpa.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-21 15:36:01 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-22 17:28:51 +0100
commit541949aed23ea14a71a7d4391bac244b623add0a (patch)
treef123b0cfb7d4c42f7b83a378ae670c8b51003057 /src/gui/kernel/qplatformtheme_qpa.cpp
parent53bb87d1d274a80b94595f6cd31bfa7a8ae81dc3 (diff)
Add further theme hints to QPlatformTheme.
- Add hints for QDialog/QDialogButtonBox. - Add hint for available popup-menu area. - Add keyboard scheme hint replacing QGuiApplicationPrivate::currentKeyPlatform() Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Task-number: QTBUG-24204 Task-number: QTBUG-24315 Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/gui/kernel/qplatformtheme_qpa.cpp')
-rw-r--r--src/gui/kernel/qplatformtheme_qpa.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformtheme_qpa.cpp b/src/gui/kernel/qplatformtheme_qpa.cpp
index aec465f0ff..3f6b69b902 100644
--- a/src/gui/kernel/qplatformtheme_qpa.cpp
+++ b/src/gui/kernel/qplatformtheme_qpa.cpp
@@ -84,6 +84,20 @@ QT_BEGIN_NAMESPACE
\value StyleNames (QStringList) A list of preferred style names.
+ \value WindowAutoPlacement (bool) A boolean value indicating whether Windows
+ (particularly dialogs) are placed by the system
+ (see _NET_WM_FULL_PLACEMENT in X11).
+
+ \value DialogButtonBoxLayout (int) An integer representing a
+ QDialogButtonBox::ButtonLayout value.
+
+ \value DialogButtonBoxButtonsHaveIcons (bool) A boolean value indicating whether
+ the buttons of a QDialogButtonBox should have icons.
+
+ \value UseFullScreenForPopupMenu (bool) Pop menus can cover the full screen including task bar.
+
+ \value KeyboardScheme (int) An integer value (enum KeyboardSchemes) specifying the
+ keyboard scheme.
\sa themeHint(), QStyle::pixelMetric()
*/
@@ -121,6 +135,14 @@ const QPalette *QPlatformTheme::palette(Palette type) const
QVariant QPlatformTheme::themeHint(ThemeHint hint) const
{
switch (hint) {
+ case QPlatformTheme::UseFullScreenForPopupMenu:
+ return QVariant(false);
+ case QPlatformTheme::WindowAutoPlacement:
+ return QVariant(false);
+ case QPlatformTheme::DialogButtonBoxLayout:
+ return QVariant(int(0));
+ case QPlatformTheme::DialogButtonBoxButtonsHaveIcons:
+ return QVariant(false);
case QPlatformTheme::ItemViewActivateItemOnSingleClick:
return QVariant(false);
case QPlatformTheme::ToolButtonStyle:
@@ -140,6 +162,8 @@ QVariant QPlatformTheme::themeHint(ThemeHint hint) const
return QVariant(false);
case MaximumScrollBarDragDistance:
return QVariant(-1);
+ case KeyboardScheme:
+ return QVariant(int(WindowsKeyboardScheme));
}
return QVariant();
}