diff options
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsview.h')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsview.h | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.h b/src/widgets/graphicsview/qgraphicsview.h index b681551fe7..d426273d97 100644 --- a/src/widgets/graphicsview/qgraphicsview.h +++ b/src/widgets/graphicsview/qgraphicsview.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$ @@ -54,7 +54,6 @@ class Q_WIDGETS_EXPORT QGraphicsView : public QAbstractScrollArea { Q_OBJECT Q_FLAGS(QPainter::RenderHints CacheMode OptimizationFlags) - Q_ENUMS(ViewportAnchor DragMode ViewportUpdateMode) Q_PROPERTY(QBrush backgroundBrush READ backgroundBrush WRITE setBackgroundBrush) Q_PROPERTY(QBrush foregroundBrush READ foregroundBrush WRITE setForegroundBrush) Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive) @@ -77,6 +76,7 @@ public: AnchorViewCenter, AnchorUnderMouse }; + Q_ENUM(ViewportAnchor) enum CacheModeFlag { CacheNone = 0x0, @@ -89,6 +89,7 @@ public: ScrollHandDrag, RubberBandDrag }; + Q_ENUM(DragMode) enum ViewportUpdateMode { FullViewportUpdate, @@ -97,6 +98,7 @@ public: NoViewportUpdate, BoundingRectViewportUpdate }; + Q_ENUM(ViewportUpdateMode) enum OptimizationFlag { DontClipPainter = 0x1, // obsolete @@ -110,7 +112,7 @@ public: QGraphicsView(QGraphicsScene *scene, QWidget *parent = 0); ~QGraphicsView(); - QSize sizeHint() const; + QSize sizeHint() const Q_DECL_OVERRIDE; QPainter::RenderHints renderHints() const; void setRenderHint(QPainter::RenderHint hint, bool enabled = true); @@ -206,7 +208,7 @@ public: inline QPoint mapFromScene(qreal x, qreal y) const; inline QPolygon mapFromScene(qreal x, qreal y, qreal w, qreal h) const; - QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE; QBrush backgroundBrush() const; void setBackgroundBrush(const QBrush &brush); @@ -225,37 +227,37 @@ Q_SIGNALS: #endif protected Q_SLOTS: - void setupViewport(QWidget *widget); + void setupViewport(QWidget *widget) Q_DECL_OVERRIDE; protected: QGraphicsView(QGraphicsViewPrivate &, QWidget *parent = 0); - bool event(QEvent *event); - bool viewportEvent(QEvent *event); + bool event(QEvent *event) Q_DECL_OVERRIDE; + bool viewportEvent(QEvent *event) Q_DECL_OVERRIDE; #ifndef QT_NO_CONTEXTMENU - void contextMenuEvent(QContextMenuEvent *event); + void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE; #endif - void dragEnterEvent(QDragEnterEvent *event); - void dragLeaveEvent(QDragLeaveEvent *event); - void dragMoveEvent(QDragMoveEvent *event); - void dropEvent(QDropEvent *event); - void focusInEvent(QFocusEvent *event); - bool focusNextPrevChild(bool next); - void focusOutEvent(QFocusEvent *event); - void keyPressEvent(QKeyEvent *event); - void keyReleaseEvent(QKeyEvent *event); - void mouseDoubleClickEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); + void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE; + void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE; + void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE; + void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE; + void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE; + bool focusNextPrevChild(bool next) Q_DECL_OVERRIDE; + void focusOutEvent(QFocusEvent *event) Q_DECL_OVERRIDE; + void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE; #ifndef QT_NO_WHEELEVENT - void wheelEvent(QWheelEvent *event); + void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; #endif - void paintEvent(QPaintEvent *event); - void resizeEvent(QResizeEvent *event); - void scrollContentsBy(int dx, int dy); - void showEvent(QShowEvent *event); - void inputMethodEvent(QInputMethodEvent *event); + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE; + void scrollContentsBy(int dx, int dy) Q_DECL_OVERRIDE; + void showEvent(QShowEvent *event) Q_DECL_OVERRIDE; + void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE; virtual void drawBackground(QPainter *painter, const QRectF &rect); virtual void drawForeground(QPainter *painter, const QRectF &rect); |