diff options
Diffstat (limited to 'src/gui/kernel/qwindow.h')
-rw-r--r-- | src/gui/kernel/qwindow.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 473d275b56..f9fe37718c 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the QtGui module of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -84,8 +84,6 @@ 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. @@ -122,13 +120,14 @@ public: Maximized, FullScreen }; + Q_ENUM(Visibility) explicit QWindow(QScreen *screen = 0); explicit QWindow(QWindow *parent); virtual ~QWindow(); void setSurfaceType(SurfaceType surfaceType); - SurfaceType surfaceType() const; + SurfaceType surfaceType() const Q_DECL_OVERRIDE; bool isVisible() const; @@ -149,7 +148,7 @@ public: void setModality(Qt::WindowModality modality); void setFormat(const QSurfaceFormat &format); - QSurfaceFormat format() const; + QSurfaceFormat format() const Q_DECL_OVERRIDE; QSurfaceFormat requestedFormat() const; void setFlags(Qt::WindowFlags flags); @@ -216,7 +215,7 @@ public: inline int x() const { return geometry().x(); } inline int y() const { return geometry().y(); } - inline QSize size() const { return geometry().size(); } + QSize size() const Q_DECL_OVERRIDE { return geometry().size(); } inline QPoint position() const { return geometry().topLeft(); } void setPosition(const QPoint &pt); @@ -286,6 +285,8 @@ public Q_SLOTS: Q_REVISION(1) void alert(int msec); + Q_REVISION(3) void requestUpdate(); + Q_SIGNALS: void screenChanged(QScreen *screen); void modalityChanged(Qt::WindowModality modality); @@ -312,9 +313,6 @@ Q_SIGNALS: Q_REVISION(1) void opacityChanged(qreal opacity); -private Q_SLOTS: - void screenDestroyed(QObject *screen); - protected: virtual void exposeEvent(QExposeEvent *); virtual void resizeEvent(QResizeEvent *); @@ -326,7 +324,7 @@ protected: virtual void hideEvent(QHideEvent *); // TODO Qt 6 - add closeEvent virtual handler - virtual bool event(QEvent *); + virtual bool event(QEvent *) Q_DECL_OVERRIDE; virtual void keyPressEvent(QKeyEvent *); virtual void keyReleaseEvent(QKeyEvent *); virtual void mousePressEvent(QMouseEvent *); @@ -346,7 +344,7 @@ protected: private: Q_PRIVATE_SLOT(d_func(), void _q_clearAlert()) - QPlatformSurface *surfaceHandle() const; + QPlatformSurface *surfaceHandle() const Q_DECL_OVERRIDE; Q_DISABLE_COPY(QWindow) |