diff options
Diffstat (limited to 'src/gui/kernel/qwindow.h')
-rw-r--r-- | src/gui/kernel/qwindow.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 2e2f12a8ab..4b8f0ca3e7 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -59,8 +59,6 @@ #include <QtGui/qcursor.h> #endif -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE @@ -93,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. @@ -111,9 +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); @@ -124,6 +134,9 @@ public: bool isVisible() const; + Visibility visibility() const; + void setVisibility(Visibility v); + void create(); WId winId() const; @@ -148,6 +161,8 @@ public: QString title() const; void setOpacity(qreal level); + qreal opacity() const; + void requestActivate(); bool isActive() const; @@ -283,10 +298,13 @@ Q_SIGNALS: void maximumHeightChanged(int arg); void visibleChanged(bool arg); + void visibilityChanged(QWindow::Visibility visibility); void contentOrientationChanged(Qt::ScreenOrientation orientation); void focusObjectChanged(QObject *object); + void opacityChanged(qreal opacity); + private Q_SLOTS: void screenDestroyed(QObject *screen); @@ -330,6 +348,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QWINDOW_H |