diff options
Diffstat (limited to 'examples/widgets/graphicsview/elasticnodes')
-rw-r--r-- | examples/widgets/graphicsview/elasticnodes/edge.h | 6 | ||||
-rw-r--r-- | examples/widgets/graphicsview/elasticnodes/graphwidget.h | 8 | ||||
-rw-r--r-- | examples/widgets/graphicsview/elasticnodes/node.h | 14 |
3 files changed, 14 insertions, 14 deletions
diff --git a/examples/widgets/graphicsview/elasticnodes/edge.h b/examples/widgets/graphicsview/elasticnodes/edge.h index 6ab71e3478..8a3cb7b19a 100644 --- a/examples/widgets/graphicsview/elasticnodes/edge.h +++ b/examples/widgets/graphicsview/elasticnodes/edge.h @@ -57,11 +57,11 @@ public: void adjust(); enum { Type = UserType + 2 }; - int type() const { return Type; } + int type() const Q_DECL_OVERRIDE { return Type; } protected: - QRectF boundingRect() const; - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + QRectF boundingRect() const Q_DECL_OVERRIDE; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE; private: Node *source, *dest; diff --git a/examples/widgets/graphicsview/elasticnodes/graphwidget.h b/examples/widgets/graphicsview/elasticnodes/graphwidget.h index 301a02dd25..a7480945e3 100644 --- a/examples/widgets/graphicsview/elasticnodes/graphwidget.h +++ b/examples/widgets/graphicsview/elasticnodes/graphwidget.h @@ -61,12 +61,12 @@ public slots: void zoomOut(); protected: - void keyPressEvent(QKeyEvent *event); - void timerEvent(QTimerEvent *event); + void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE; + void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE; #ifndef QT_NO_WHEELEVENT - void wheelEvent(QWheelEvent *event); + void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE; #endif - void drawBackground(QPainter *painter, const QRectF &rect); + void drawBackground(QPainter *painter, const QRectF &rect) Q_DECL_OVERRIDE; void scaleView(qreal scaleFactor); diff --git a/examples/widgets/graphicsview/elasticnodes/node.h b/examples/widgets/graphicsview/elasticnodes/node.h index 813dbb1c54..2d18a64654 100644 --- a/examples/widgets/graphicsview/elasticnodes/node.h +++ b/examples/widgets/graphicsview/elasticnodes/node.h @@ -60,20 +60,20 @@ public: QList<Edge *> edges() const; enum { Type = UserType + 1 }; - int type() const { return Type; } + int type() const Q_DECL_OVERRIDE { return Type; } void calculateForces(); bool advance(); - QRectF boundingRect() const; - QPainterPath shape() const; - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + QRectF boundingRect() const Q_DECL_OVERRIDE; + QPainterPath shape() const Q_DECL_OVERRIDE; + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) Q_DECL_OVERRIDE; protected: - QVariant itemChange(GraphicsItemChange change, const QVariant &value); + QVariant itemChange(GraphicsItemChange change, const QVariant &value) Q_DECL_OVERRIDE; - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; private: QList<Edge *> edgeList; |