From 541949aed23ea14a71a7d4391bac244b623add0a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 21 Feb 2012 15:36:01 +0100 Subject: Add further theme hints to QPlatformTheme. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add hints for QDialog/QDialogButtonBox. - Add hint for available popup-menu area. - Add keyboard scheme hint replacing QGuiApplicationPrivate::currentKeyPlatform() Reviewed-by: Samuel Rødal Reviewed-by: Morten Johan Sørvig Task-number: QTBUG-24204 Task-number: QTBUG-24315 Change-Id: I6653786b0dcb49a6fc264d3b9891dbfee502bd3e Reviewed-by: Friedemann Kleint --- src/gui/kernel/qplatformtheme_qpa.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/gui/kernel/qplatformtheme_qpa.cpp') 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(); } -- cgit v1.2.3