diff options
Diffstat (limited to 'src/gui/kernel/qwindow.h')
-rw-r--r-- | src/gui/kernel/qwindow.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index e304fd4c4f..4b8f0ca3e7 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -91,6 +91,8 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface Q_OBJECT Q_DECLARE_PRIVATE(QWindow) + Q_ENUMS(Visibility) + // All properties which are declared here are inherited by QQuickWindow and therefore available in QML. // So please think carefully about what it does to the QML namespace if you add any new ones, // particularly the possible meanings these names might have in any specializations of Window. @@ -109,10 +111,19 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged) Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged) Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) + Q_PROPERTY(Visibility visibility READ visibility WRITE setVisibility NOTIFY visibilityChanged) Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation WRITE reportContentOrientationChange NOTIFY contentOrientationChanged) Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) public: + enum Visibility { + Hidden = 0, + AutomaticVisibility, + Windowed, + Minimized, + Maximized, + FullScreen + }; explicit QWindow(QScreen *screen = 0); explicit QWindow(QWindow *parent); @@ -123,6 +134,9 @@ public: bool isVisible() const; + Visibility visibility() const; + void setVisibility(Visibility v); + void create(); WId winId() const; @@ -284,6 +298,7 @@ Q_SIGNALS: void maximumHeightChanged(int arg); void visibleChanged(bool arg); + void visibilityChanged(QWindow::Visibility visibility); void contentOrientationChanged(Qt::ScreenOrientation orientation); void focusObjectChanged(QObject *object); |