From 9744ca10856e3b113231d37baf2e073611c7cc09 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 27 Nov 2015 10:58:55 +0100 Subject: Add QStyleHints::showIsMaximized(). Expose QPlatformIntegration::ShowIsMaximized similarly to QPlatformIntegration::ShowIsFullScreen. This allows for applications to adapt their UI to mobile/desktop accordingly. Change-Id: Ic14d16fde11d7d2740b2f4092ae12e88a2f522fd Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Gunnar Sletta Reviewed-by: Lars Knoll --- src/gui/kernel/qstylehints.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qstylehints.cpp') diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp index 7ff0f9f860..7fc89112e6 100644 --- a/src/gui/kernel/qstylehints.cpp +++ b/src/gui/kernel/qstylehints.cpp @@ -305,13 +305,29 @@ int QStyleHints::cursorFlashTime() const \note The platform may still choose to show certain windows non-fullscreen, such as popups or dialogs. This property only reports the default behavior. - \sa QWindow::show() + \sa QWindow::show(), showIsMaximized() */ bool QStyleHints::showIsFullScreen() const { return hint(QPlatformIntegration::ShowIsFullScreen).toBool(); } +/*! + \property QStyleHints::showIsMaximized + \brief \c true if the platform defaults to windows being maximized, + otherwise \c false. + + \note The platform may still choose to show certain windows non-maximized, + such as popups or dialogs. This property only reports the default behavior. + + \sa QWindow::show(), showIsFullScreen() + \since 5.6 +*/ +bool QStyleHints::showIsMaximized() const +{ + return hint(QPlatformIntegration::ShowIsMaximized).toBool(); +} + /*! \property QStyleHints::passwordMaskDelay \brief the time, in milliseconds, a typed letter is displayed unshrouded -- cgit v1.2.3