diff options
Diffstat (limited to 'src/widgets/kernel/qlayout.h')
-rw-r--r-- | src/widgets/kernel/qlayout.h | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/src/widgets/kernel/qlayout.h b/src/widgets/kernel/qlayout.h index 38568e434c..62a05906e0 100644 --- a/src/widgets/kernel/qlayout.h +++ b/src/widgets/kernel/qlayout.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 QtWidgets 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$ @@ -56,7 +56,6 @@ class Q_WIDGETS_EXPORT QLayout : public QObject, public QLayoutItem Q_OBJECT Q_DECLARE_PRIVATE(QLayout) - Q_ENUMS(SizeConstraint) Q_PROPERTY(int margin READ margin WRITE setMargin) Q_PROPERTY(int spacing READ spacing WRITE setSpacing) Q_PROPERTY(SizeConstraint sizeConstraint READ sizeConstraint WRITE setSizeConstraint) @@ -69,6 +68,7 @@ public: SetMaximumSize, SetMinAndMaxSize }; + Q_ENUM(SizeConstraint) QLayout(QWidget *parent); QLayout(); @@ -88,11 +88,7 @@ public: bool setAlignment(QWidget *w, Qt::Alignment alignment); bool setAlignment(QLayout *l, Qt::Alignment alignment); -#ifdef Q_NO_USING_KEYWORD - inline void setAlignment(Qt::Alignment alignment) { QLayoutItem::setAlignment(alignment); } -#else using QLayoutItem::setAlignment; -#endif void setSizeConstraint(SizeConstraint); SizeConstraint sizeConstraint() const; @@ -101,8 +97,8 @@ public: QWidget *parentWidget() const; - void invalidate(); - QRect geometry() const; + void invalidate() Q_DECL_OVERRIDE; + QRect geometry() const Q_DECL_OVERRIDE; bool activate(); void update(); @@ -112,16 +108,16 @@ public: void removeWidget(QWidget *w); void removeItem(QLayoutItem *); - Qt::Orientations expandingDirections() const; - QSize minimumSize() const; - QSize maximumSize() const; - virtual void setGeometry(const QRect&); + Qt::Orientations expandingDirections() const Q_DECL_OVERRIDE; + QSize minimumSize() const Q_DECL_OVERRIDE; + QSize maximumSize() const Q_DECL_OVERRIDE; + virtual void setGeometry(const QRect&) Q_DECL_OVERRIDE; virtual QLayoutItem *itemAt(int index) const = 0; virtual QLayoutItem *takeAt(int index) = 0; virtual int indexOf(QWidget *) const; virtual int count() const = 0; - bool isEmpty() const; - QSizePolicy::ControlTypes controlTypes() const; + bool isEmpty() const Q_DECL_OVERRIDE; + QSizePolicy::ControlTypes controlTypes() const Q_DECL_OVERRIDE; // ### Qt 6 make this function virtual QLayoutItem *replaceWidget(QWidget *from, QWidget *to, Qt::FindChildOptions options = Qt::FindChildrenRecursively); @@ -130,7 +126,7 @@ public: QSize totalMinimumSize() const; QSize totalMaximumSize() const; QSize totalSizeHint() const; - QLayout *layout(); + QLayout *layout() Q_DECL_OVERRIDE; void setEnabled(bool); bool isEnabled() const; @@ -140,7 +136,7 @@ public: protected: void widgetEvent(QEvent *); - void childEvent(QChildEvent *e); + void childEvent(QChildEvent *e) Q_DECL_OVERRIDE; void addChildLayout(QLayout *l); void addChildWidget(QWidget *w); bool adoptLayout(QLayout *layout); |