summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-06-01 22:54:36 +0200
committerMontel Laurent <[email protected]>2017-06-01 22:54:36 +0200
commit01a9ec90fffa1480cab754cacd208cd5d5dbbf37 (patch)
treedebc13de3db8632091635f5cd8c2806bd72828aa
parent0e097a5a376f07d4074711d706aceaf15181aee9 (diff)
Use Q_DECLARE_OVERRIDE
-rw-r--r--ball.h10
-rw-r--r--canvasitem.h10
-rw-r--r--external/Box2D/Collision/Shapes/b2CircleShape.h12
-rw-r--r--external/Box2D/Collision/Shapes/b2EdgeShape.h12
-rw-r--r--external/Box2D/Collision/Shapes/b2LoopShape.h12
-rw-r--r--external/Box2D/Collision/Shapes/b2PolygonShape.h12
-rw-r--r--external/Box2D/Dynamics/Contacts/b2CircleContact.h2
-rw-r--r--external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h2
-rw-r--r--external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h2
-rw-r--r--external/Box2D/Dynamics/Contacts/b2LoopAndCircleContact.h2
-rw-r--r--external/Box2D/Dynamics/Contacts/b2LoopAndPolygonContact.h2
-rw-r--r--external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h2
-rw-r--r--external/Box2D/Dynamics/Contacts/b2PolygonContact.h2
-rw-r--r--external/Box2D/Dynamics/Joints/b2DistanceJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2FrictionJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2GearJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2LineJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2MouseJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2PrismaticJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2PulleyJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2RevoluteJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2RopeJoint.h14
-rw-r--r--external/Box2D/Dynamics/Joints/b2WeldJoint.h14
-rw-r--r--game.cpp2
-rw-r--r--game.h28
-rw-r--r--kolf.h2
-rw-r--r--landscape.h40
-rw-r--r--objects.h22
-rw-r--r--obstacles.h64
-rw-r--r--overlay.h24
-rw-r--r--shape.h12
-rw-r--r--tagaro/board.h8
-rw-r--r--tagaro/scene.h2
-rw-r--r--tagaro/scene_p.h2
-rw-r--r--tagaro/spriteobjectitem.cpp8
-rw-r--r--tagaro/spriteobjectitem.h14
-rw-r--r--utils-animateditem.h4
37 files changed, 227 insertions, 227 deletions
diff --git a/ball.h b/ball.h
index 660b1b2..08aff4c 100644
--- a/ball.h
+++ b/ball.h
@@ -32,7 +32,7 @@ public:
BallState currentState();
- virtual void moveBy(double dx, double dy);
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
BallState curState() const { return state; }
void setState(BallState newState);
@@ -55,12 +55,12 @@ public:
bool forceStillGoing() const { return m_forceStillGoing; }
void setForceStillGoing(bool yes) { m_forceStillGoing = yes; }
- void shotStarted() { maxBumperBounceSpeed = 8; }
+ void shotStarted() Q_DECL_OVERRIDE { maxBumperBounceSpeed = 8; }
void setDoDetect(bool yes) { m_doDetect = yes; }
bool doDetect() const { return m_doDetect; }
- virtual QList<QGraphicsItem*> infoItems() const;
+ QList<QGraphicsItem*> infoItems() const Q_DECL_OVERRIDE;
virtual void setName(const QString &);
virtual void setVisible(bool yes);
@@ -71,8 +71,8 @@ public slots:
void update() { }
protected:
- virtual Kolf::Overlay* createOverlay();
- virtual void endSimulation();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
+ void endSimulation() Q_DECL_OVERRIDE;
private:
BallState state;
diff --git a/canvasitem.h b/canvasitem.h
index 91c9869..a8a95c9 100644
--- a/canvasitem.h
+++ b/canvasitem.h
@@ -178,21 +178,21 @@ class EllipticalCanvasItem : public Tagaro::SpriteObjectItem, public CanvasItem
EllipticalCanvasItem(bool withEllipse, const QString& spriteKey, QGraphicsItem* parent, b2World* world);
QGraphicsEllipseItem* ellipseItem() const { return m_ellipseItem; }
- virtual bool contains(const QPointF& point) const;
- virtual QPainterPath shape() const;
+ bool contains(const QPointF& point) const Q_DECL_OVERRIDE;
+ QPainterPath shape() const Q_DECL_OVERRIDE;
QRectF rect() const;
double width() const { return Tagaro::SpriteObjectItem::size().width(); }
double height() const { return Tagaro::SpriteObjectItem::size().height(); }
- virtual void setSize(const QSizeF& size);
+ void setSize(const QSizeF& size) Q_DECL_OVERRIDE;
void setSize(qreal width, qreal height) { setSize(QSizeF(width, height)); }
- virtual void moveBy(double x, double y);
+ void moveBy(double x, double y) Q_DECL_OVERRIDE;
void saveSize(KConfigGroup* group);
void loadSize(KConfigGroup* group);
- virtual QPointF getPosition() const { return QGraphicsItem::pos(); }
+ QPointF getPosition() const Q_DECL_OVERRIDE { return QGraphicsItem::pos(); }
private:
QGraphicsEllipseItem* m_ellipseItem;
Kolf::EllipseShape* m_shape;
diff --git a/external/Box2D/Collision/Shapes/b2CircleShape.h b/external/Box2D/Collision/Shapes/b2CircleShape.h
index d87ca2a..38d4d53 100644
--- a/external/Box2D/Collision/Shapes/b2CircleShape.h
+++ b/external/Box2D/Collision/Shapes/b2CircleShape.h
@@ -28,23 +28,23 @@ public:
b2CircleShape();
/// Implement b2Shape.
- b2Shape* Clone(b2BlockAllocator* allocator) const;
+ b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
/// @see b2Shape::GetChildCount
- int32 GetChildCount() const;
+ int32 GetChildCount() const Q_DECL_OVERRIDE;
/// Implement b2Shape.
- bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
+ bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
- const b2Transform& transform, int32 childIndex) const;
+ const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// @see b2Shape::ComputeAABB
- void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;
+ void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// @see b2Shape::ComputeMass
- void ComputeMass(b2MassData* massData, qreal density) const;
+ void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
/// Get the supporting vertex index in the given direction.
int32 GetSupport(const b2Vec2& d) const;
diff --git a/external/Box2D/Collision/Shapes/b2EdgeShape.h b/external/Box2D/Collision/Shapes/b2EdgeShape.h
index bf38682..3ade82f 100644
--- a/external/Box2D/Collision/Shapes/b2EdgeShape.h
+++ b/external/Box2D/Collision/Shapes/b2EdgeShape.h
@@ -33,23 +33,23 @@ public:
void Set(const b2Vec2& v1, const b2Vec2& v2);
/// Implement b2Shape.
- b2Shape* Clone(b2BlockAllocator* allocator) const;
+ b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
/// @see b2Shape::GetChildCount
- int32 GetChildCount() const;
+ int32 GetChildCount() const Q_DECL_OVERRIDE;
/// @see b2Shape::TestPoint
- bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
+ bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
- const b2Transform& transform, int32 childIndex) const;
+ const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// @see b2Shape::ComputeAABB
- void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;
+ void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// @see b2Shape::ComputeMass
- void ComputeMass(b2MassData* massData, qreal density) const;
+ void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
/// These are the edge vertices
b2Vec2 m_vertex1, m_vertex2;
diff --git a/external/Box2D/Collision/Shapes/b2LoopShape.h b/external/Box2D/Collision/Shapes/b2LoopShape.h
index 11d2e10..10de105 100644
--- a/external/Box2D/Collision/Shapes/b2LoopShape.h
+++ b/external/Box2D/Collision/Shapes/b2LoopShape.h
@@ -40,28 +40,28 @@ public:
void Create(const b2Vec2* vertices, int32 count);
/// Implement b2Shape. Vertices are cloned using b2Alloc.
- b2Shape* Clone(b2BlockAllocator* allocator) const;
+ b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
/// @see b2Shape::GetChildCount
- int32 GetChildCount() const;
+ int32 GetChildCount() const Q_DECL_OVERRIDE;
/// Get a child edge.
void GetChildEdge(b2EdgeShape* edge, int32 index) const;
/// This always return false.
/// @see b2Shape::TestPoint
- bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
+ bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
- const b2Transform& transform, int32 childIndex) const;
+ const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// @see b2Shape::ComputeAABB
- void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;
+ void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// Chains have zero mass.
/// @see b2Shape::ComputeMass
- void ComputeMass(b2MassData* massData, qreal density) const;
+ void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
/// Get the number of vertices.
int32 GetCount() const { return m_count; }
diff --git a/external/Box2D/Collision/Shapes/b2PolygonShape.h b/external/Box2D/Collision/Shapes/b2PolygonShape.h
index b699f2d..1263660 100644
--- a/external/Box2D/Collision/Shapes/b2PolygonShape.h
+++ b/external/Box2D/Collision/Shapes/b2PolygonShape.h
@@ -31,10 +31,10 @@ public:
b2PolygonShape();
/// Implement b2Shape.
- b2Shape* Clone(b2BlockAllocator* allocator) const;
+ b2Shape* Clone(b2BlockAllocator* allocator) const Q_DECL_OVERRIDE;
/// @see b2Shape::GetChildCount
- int32 GetChildCount() const;
+ int32 GetChildCount() const Q_DECL_OVERRIDE;
/// Copy vertices. This assumes the vertices define a convex polygon.
/// It is assumed that the exterior is the the right of each edge.
@@ -54,17 +54,17 @@ public:
void SetAsBox(qreal hx, qreal hy, const b2Vec2& center, qreal angle);
/// @see b2Shape::TestPoint
- bool TestPoint(const b2Transform& transform, const b2Vec2& p) const;
+ bool TestPoint(const b2Transform& transform, const b2Vec2& p) const Q_DECL_OVERRIDE;
/// Implement b2Shape.
bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
- const b2Transform& transform, int32 childIndex) const;
+ const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// @see b2Shape::ComputeAABB
- void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const;
+ void ComputeAABB(b2AABB* aabb, const b2Transform& transform, int32 childIndex) const Q_DECL_OVERRIDE;
/// @see b2Shape::ComputeMass
- void ComputeMass(b2MassData* massData, qreal density) const;
+ void ComputeMass(b2MassData* massData, qreal density) const Q_DECL_OVERRIDE;
/// Get the vertex count.
int32 GetVertexCount() const { return m_vertexCount; }
diff --git a/external/Box2D/Dynamics/Contacts/b2CircleContact.h b/external/Box2D/Dynamics/Contacts/b2CircleContact.h
index 59552eb..fdf1ffc 100644
--- a/external/Box2D/Dynamics/Contacts/b2CircleContact.h
+++ b/external/Box2D/Dynamics/Contacts/b2CircleContact.h
@@ -33,7 +33,7 @@ public:
b2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2CircleContact() {}
- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);
+ void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
};
#endif
diff --git a/external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h b/external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h
index 12e94f1..356b564 100644
--- a/external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h
+++ b/external/Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h
@@ -33,7 +33,7 @@ public:
b2EdgeAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2EdgeAndCircleContact() {}
- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);
+ void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
};
#endif
diff --git a/external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h b/external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h
index bd3b364..953cd61 100644
--- a/external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h
+++ b/external/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.h
@@ -33,7 +33,7 @@ public:
b2EdgeAndPolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2EdgeAndPolygonContact() {}
- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);
+ void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
};
#endif
diff --git a/external/Box2D/Dynamics/Contacts/b2LoopAndCircleContact.h b/external/Box2D/Dynamics/Contacts/b2LoopAndCircleContact.h
index 55e915a..99418b1 100644
--- a/external/Box2D/Dynamics/Contacts/b2LoopAndCircleContact.h
+++ b/external/Box2D/Dynamics/Contacts/b2LoopAndCircleContact.h
@@ -33,7 +33,7 @@ public:
b2LoopAndCircleContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB);
~b2LoopAndCircleContact() {}
- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);
+ void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
};
#endif
diff --git a/external/Box2D/Dynamics/Contacts/b2LoopAndPolygonContact.h b/external/Box2D/Dynamics/Contacts/b2LoopAndPolygonContact.h
index 080bb1c..038b539 100644
--- a/external/Box2D/Dynamics/Contacts/b2LoopAndPolygonContact.h
+++ b/external/Box2D/Dynamics/Contacts/b2LoopAndPolygonContact.h
@@ -33,7 +33,7 @@ public:
b2LoopAndPolygonContact(b2Fixture* fixtureA, int32 indexA, b2Fixture* fixtureB, int32 indexB);
~b2LoopAndPolygonContact() {}
- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);
+ void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
};
#endif
diff --git a/external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h b/external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h
index d8a638f..d6e51fd 100644
--- a/external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h
+++ b/external/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h
@@ -32,7 +32,7 @@ public:
b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2PolygonAndCircleContact() {}
- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);
+ void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
};
#endif
diff --git a/external/Box2D/Dynamics/Contacts/b2PolygonContact.h b/external/Box2D/Dynamics/Contacts/b2PolygonContact.h
index 99078aa..5574d4f 100644
--- a/external/Box2D/Dynamics/Contacts/b2PolygonContact.h
+++ b/external/Box2D/Dynamics/Contacts/b2PolygonContact.h
@@ -33,7 +33,7 @@ public:
b2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB);
~b2PolygonContact() {}
- void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB);
+ void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) Q_DECL_OVERRIDE;
};
#endif
diff --git a/external/Box2D/Dynamics/Joints/b2DistanceJoint.h b/external/Box2D/Dynamics/Joints/b2DistanceJoint.h
index d35795f..f35ce12 100644
--- a/external/Box2D/Dynamics/Joints/b2DistanceJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2DistanceJoint.h
@@ -67,16 +67,16 @@ class b2DistanceJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
/// Get the reaction force given the inverse time step.
/// Unit is N.
- b2Vec2 GetReactionForce(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Get the reaction torque given the inverse time step.
/// Unit is N*m. This is always zero for a distance joint.
- qreal GetReactionTorque(qreal inv_dt) const;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Set/get the natural length.
/// Manipulating the length can lead to non-physical behavior when the frequency is zero.
@@ -96,9 +96,9 @@ protected:
friend class b2Joint;
b2DistanceJoint(const b2DistanceJointDef* data);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_localAnchor1;
b2Vec2 m_localAnchor2;
diff --git a/external/Box2D/Dynamics/Joints/b2FrictionJoint.h b/external/Box2D/Dynamics/Joints/b2FrictionJoint.h
index a789239..d3c7ace 100644
--- a/external/Box2D/Dynamics/Joints/b2FrictionJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2FrictionJoint.h
@@ -55,11 +55,11 @@ struct b2FrictionJointDef : public b2JointDef
class b2FrictionJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
- b2Vec2 GetReactionForce(qreal inv_dt) const;
- qreal GetReactionTorque(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Set the maximum friction force in N.
void SetMaxForce(qreal force);
@@ -79,9 +79,9 @@ protected:
b2FrictionJoint(const b2FrictionJointDef* def);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_localAnchorA;
b2Vec2 m_localAnchorB;
diff --git a/external/Box2D/Dynamics/Joints/b2GearJoint.h b/external/Box2D/Dynamics/Joints/b2GearJoint.h
index 0c9d5e4..1e87796 100644
--- a/external/Box2D/Dynamics/Joints/b2GearJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2GearJoint.h
@@ -60,11 +60,11 @@ struct b2GearJointDef : public b2JointDef
class b2GearJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
- b2Vec2 GetReactionForce(qreal inv_dt) const;
- qreal GetReactionTorque(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Set/Get the gear ratio.
void SetRatio(qreal ratio);
@@ -75,9 +75,9 @@ protected:
friend class b2Joint;
b2GearJoint(const b2GearJointDef* data);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Body* m_ground1;
b2Body* m_ground2;
diff --git a/external/Box2D/Dynamics/Joints/b2LineJoint.h b/external/Box2D/Dynamics/Joints/b2LineJoint.h
index 3425b81..d246524 100644
--- a/external/Box2D/Dynamics/Joints/b2LineJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2LineJoint.h
@@ -82,11 +82,11 @@ struct b2LineJointDef : public b2JointDef
class b2LineJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
- b2Vec2 GetReactionForce(qreal inv_dt) const;
- qreal GetReactionTorque(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Get the current joint translation, usually in meters.
qreal GetJointTranslation() const;
@@ -133,9 +133,9 @@ protected:
friend class b2Joint;
b2LineJoint(const b2LineJointDef* def);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_localAnchor1;
b2Vec2 m_localAnchor2;
diff --git a/external/Box2D/Dynamics/Joints/b2MouseJoint.h b/external/Box2D/Dynamics/Joints/b2MouseJoint.h
index 2626b87..4d8e0e3 100644
--- a/external/Box2D/Dynamics/Joints/b2MouseJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2MouseJoint.h
@@ -62,16 +62,16 @@ class b2MouseJoint : public b2Joint
public:
/// Implements b2Joint.
- b2Vec2 GetAnchorA() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
/// Implements b2Joint.
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
/// Implements b2Joint.
- b2Vec2 GetReactionForce(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Implements b2Joint.
- qreal GetReactionTorque(qreal inv_dt) const;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Use this to update the target point.
void SetTarget(const b2Vec2& target);
@@ -94,9 +94,9 @@ protected:
b2MouseJoint(const b2MouseJointDef* def);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte) { B2_NOT_USED(baumgarte); return true; }
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE { B2_NOT_USED(baumgarte); return true; }
b2Vec2 m_localAnchor;
b2Vec2 m_target;
diff --git a/external/Box2D/Dynamics/Joints/b2PrismaticJoint.h b/external/Box2D/Dynamics/Joints/b2PrismaticJoint.h
index 20d5d0b..73848af 100644
--- a/external/Box2D/Dynamics/Joints/b2PrismaticJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2PrismaticJoint.h
@@ -87,11 +87,11 @@ struct b2PrismaticJointDef : public b2JointDef
class b2PrismaticJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
- b2Vec2 GetReactionForce(qreal inv_dt) const;
- qreal GetReactionTorque(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Get the current joint translation, usually in meters.
qreal GetJointTranslation() const;
@@ -137,9 +137,9 @@ protected:
friend class b2GearJoint;
b2PrismaticJoint(const b2PrismaticJointDef* def);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_localAnchor1;
b2Vec2 m_localAnchor2;
diff --git a/external/Box2D/Dynamics/Joints/b2PulleyJoint.h b/external/Box2D/Dynamics/Joints/b2PulleyJoint.h
index c826e91..4e1148c 100644
--- a/external/Box2D/Dynamics/Joints/b2PulleyJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2PulleyJoint.h
@@ -86,11 +86,11 @@ struct b2PulleyJointDef : public b2JointDef
class b2PulleyJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
- b2Vec2 GetReactionForce(qreal inv_dt) const;
- qreal GetReactionTorque(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Get the first ground anchor.
b2Vec2 GetGroundAnchorA() const;
@@ -112,9 +112,9 @@ protected:
friend class b2Joint;
b2PulleyJoint(const b2PulleyJointDef* data);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_groundAnchor1;
b2Vec2 m_groundAnchor2;
diff --git a/external/Box2D/Dynamics/Joints/b2RevoluteJoint.h b/external/Box2D/Dynamics/Joints/b2RevoluteJoint.h
index d77a34f..6bf0477 100644
--- a/external/Box2D/Dynamics/Joints/b2RevoluteJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2RevoluteJoint.h
@@ -90,8 +90,8 @@ struct b2RevoluteJointDef : public b2JointDef
class b2RevoluteJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
/// Get the current joint angle in radians.
qreal GetJointAngle() const;
@@ -131,11 +131,11 @@ public:
/// Get the reaction force given the inverse time step.
/// Unit is N.
- b2Vec2 GetReactionForce(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Get the reaction torque due to the joint limit given the inverse time step.
/// Unit is N*m.
- qreal GetReactionTorque(qreal inv_dt) const;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Get the current motor torque given the inverse time step.
/// Unit is N*m.
@@ -148,10 +148,10 @@ protected:
b2RevoluteJoint(const b2RevoluteJointDef* def);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
- bool SolvePositionConstraints(qreal baumgarte);
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_localAnchor1; // relative
b2Vec2 m_localAnchor2;
diff --git a/external/Box2D/Dynamics/Joints/b2RopeJoint.h b/external/Box2D/Dynamics/Joints/b2RopeJoint.h
index 6e742dd..d4fb2ec 100644
--- a/external/Box2D/Dynamics/Joints/b2RopeJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2RopeJoint.h
@@ -58,11 +58,11 @@ struct b2RopeJointDef : public b2JointDef
class b2RopeJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
- b2Vec2 GetReactionForce(qreal inv_dt) const;
- qreal GetReactionTorque(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
/// Get the maximum length of the rope.
qreal GetMaxLength() const;
@@ -74,9 +74,9 @@ protected:
friend class b2Joint;
b2RopeJoint(const b2RopeJointDef* data);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
- bool SolvePositionConstraints(qreal baumgarte);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_localAnchorA;
b2Vec2 m_localAnchorB;
diff --git a/external/Box2D/Dynamics/Joints/b2WeldJoint.h b/external/Box2D/Dynamics/Joints/b2WeldJoint.h
index 7cb282a..e2300ef 100644
--- a/external/Box2D/Dynamics/Joints/b2WeldJoint.h
+++ b/external/Box2D/Dynamics/Joints/b2WeldJoint.h
@@ -53,11 +53,11 @@ struct b2WeldJointDef : public b2JointDef
class b2WeldJoint : public b2Joint
{
public:
- b2Vec2 GetAnchorA() const;
- b2Vec2 GetAnchorB() const;
+ b2Vec2 GetAnchorA() const Q_DECL_OVERRIDE;
+ b2Vec2 GetAnchorB() const Q_DECL_OVERRIDE;
- b2Vec2 GetReactionForce(qreal inv_dt) const;
- qreal GetReactionTorque(qreal inv_dt) const;
+ b2Vec2 GetReactionForce(qreal inv_dt) const Q_DECL_OVERRIDE;
+ qreal GetReactionTorque(qreal inv_dt) const Q_DECL_OVERRIDE;
protected:
@@ -65,10 +65,10 @@ protected:
b2WeldJoint(const b2WeldJointDef* def);
- void InitVelocityConstraints(const b2TimeStep& step);
- void SolveVelocityConstraints(const b2TimeStep& step);
+ void InitVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
+ void SolveVelocityConstraints(const b2TimeStep& step) Q_DECL_OVERRIDE;
- bool SolvePositionConstraints(qreal baumgarte);
+ bool SolvePositionConstraints(qreal baumgarte) Q_DECL_OVERRIDE;
b2Vec2 m_localAnchorA;
b2Vec2 m_localAnchorB;
diff --git a/game.cpp b/game.cpp
index 4da1909..d4114e5 100644
--- a/game.cpp
+++ b/game.cpp
@@ -59,7 +59,7 @@ inline QString makeStateGroup(int id, const QString &name)
class KolfContactListener : public b2ContactListener
{
public:
- virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold)
+ void PreSolve(b2Contact* contact, const b2Manifold* oldManifold) Q_DECL_OVERRIDE
{
Q_UNUSED(oldManifold)
CanvasItem* citemA = static_cast<CanvasItem*>(contact->GetFixtureA()->GetBody()->GetUserData());
diff --git a/game.h b/game.h
index e552c2f..2f81445 100644
--- a/game.h
+++ b/game.h
@@ -132,10 +132,10 @@ public:
void saveAngle(Ball *ball) { angleMap[ball] = angle; }
void setAngle(Ball *ball);
void resetAngles() { angleMap.clear(); setZValue(999999); }
- virtual void moveBy(double dx, double dy);
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
void setShowGuideLine(bool yes);
- virtual QPointF getPosition() const { return QGraphicsItem::pos(); }
+ QPointF getPosition() const Q_DECL_OVERRIDE { return QGraphicsItem::pos(); }
private:
QPointF midPoint;
double maxAngle;
@@ -185,11 +185,11 @@ public:
QString name() const { return m_name; }
QString untranslatedName() const { return m_untranslatedName; }
- virtual Config *config(QWidget *parent) { return new HoleConfig(this, parent); }
+ Config *config(QWidget *parent) Q_DECL_OVERRIDE { return new HoleConfig(this, parent); }
void borderWallsChanged(bool yes);
bool borderWalls() const { return m_borderWalls; }
- virtual QPointF getPosition() const { return QPointF(); }
+ QPointF getPosition() const Q_DECL_OVERRIDE { return QPointF(); }
private:
QString m_author;
QString m_name;
@@ -213,9 +213,9 @@ public:
double thickness() const;
double width() const;
double height() const;
- virtual void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
- virtual QRectF boundingRect() const;
- virtual bool collidesWithItem(const QGraphicsItem*, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
+ void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) Q_DECL_OVERRIDE;
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ bool collidesWithItem(const QGraphicsItem*, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const Q_DECL_OVERRIDE;
private:
double dvalue, dmax;
@@ -331,20 +331,20 @@ private slots:
void emitMax();
protected:
- void mouseMoveEvent(QMouseEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
- void mouseDoubleClickEvent(QMouseEvent *e);
+ void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void mouseDoubleClickEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
void handleMousePressEvent(QMouseEvent *e);
void handleMouseDoubleClickEvent(QMouseEvent *e);
void handleMouseMoveEvent(QMouseEvent *e);
void handleMouseReleaseEvent(QMouseEvent *e);
- void keyPressEvent(QKeyEvent *e);
- void keyReleaseEvent(QKeyEvent *e);
+ void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
+ void keyReleaseEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
//resizes view to make sure it is square and calls resizeAllItems
- void resizeEvent(QResizeEvent *);
+ void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
QPoint viewportToViewport(const QPoint &p);
diff --git a/kolf.h b/kolf.h
index 3d61991..5af2218 100644
--- a/kolf.h
+++ b/kolf.h
@@ -49,7 +49,7 @@ public slots:
void updateModified(bool);
protected:
- virtual bool queryClose();
+ bool queryClose() Q_DECL_OVERRIDE;
protected slots:
void startNewGame();
diff --git a/landscape.h b/landscape.h
index f244738..edeab9d 100644
--- a/landscape.h
+++ b/landscape.h
@@ -36,17 +36,17 @@ namespace Kolf
bool isBlinkEnabled() const;
int blinkInterval() const;
- virtual void advance(int phase);
+ void advance(int phase) Q_DECL_OVERRIDE;
- virtual void load(KConfigGroup* group);
- virtual void save(KConfigGroup* group);
+ void load(KConfigGroup* group) Q_DECL_OVERRIDE;
+ void save(KConfigGroup* group) Q_DECL_OVERRIDE;
- virtual Config* config(QWidget* parent);
+ Config* config(QWidget* parent) Q_DECL_OVERRIDE;
public Q_SLOTS:
void setBlinkEnabled(bool blinkEnabled);
void setBlinkInterval(int blinkInterval);
protected:
- virtual Kolf::Overlay* createOverlay();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
private:
bool m_blinkEnabled;
int m_blinkInterval, m_blinkFrame;
@@ -57,7 +57,7 @@ namespace Kolf
Q_OBJECT
public:
LandscapeOverlay(Kolf::LandscapeItem* item);
- virtual void update();
+ void update() Q_DECL_OVERRIDE;
private Q_SLOTS:
//interface to handles
void moveHandle(const QPointF& handleScenePos);
@@ -80,14 +80,14 @@ namespace Kolf
{
public:
Puddle(QGraphicsItem* parent, b2World* world);
- virtual bool collision(Ball* ball);
+ bool collision(Ball* ball) Q_DECL_OVERRIDE;
};
class Sand : public Kolf::LandscapeItem
{
public:
Sand(QGraphicsItem* parent, b2World* world);
- virtual bool collision(Ball* ball);
+ bool collision(Ball* ball) Q_DECL_OVERRIDE;
};
enum SlopeType
@@ -110,25 +110,25 @@ namespace Kolf
Kolf::SlopeType slopeType() const;
bool isStuckOnGround() const;
- virtual QPainterPath shape() const;
- virtual void setSize(const QSizeF& size);
- virtual QPointF getPosition() const;
- virtual void moveBy(double dx, double dy);
+ QPainterPath shape() const Q_DECL_OVERRIDE;
+ void setSize(const QSizeF& size) Q_DECL_OVERRIDE;
+ QPointF getPosition() const Q_DECL_OVERRIDE;
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
- virtual void load(KConfigGroup* group);
- virtual void save(KConfigGroup* group);
+ void load(KConfigGroup* group) Q_DECL_OVERRIDE;
+ void save(KConfigGroup* group) Q_DECL_OVERRIDE;
- virtual bool collision(Ball* ball);
- virtual bool terrainCollisions() const;
- virtual QList<QGraphicsItem*> infoItems() const;
- virtual Config* config(QWidget* parent);
+ bool collision(Ball* ball) Q_DECL_OVERRIDE;
+ bool terrainCollisions() const Q_DECL_OVERRIDE;
+ QList<QGraphicsItem*> infoItems() const Q_DECL_OVERRIDE;
+ Config* config(QWidget* parent) Q_DECL_OVERRIDE;
public Q_SLOTS:
void setGrade(double grade);
void setReversed(bool reversed);
void setSlopeType(int type);
void setStuckOnGround(bool stuckOnGround);
protected:
- virtual Kolf::Overlay* createOverlay();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
private:
void updateAppearance();
void updateInfo();
@@ -152,7 +152,7 @@ namespace Kolf
Q_OBJECT
public:
SlopeOverlay(Kolf::Slope* slope);
- virtual void update();
+ void update() Q_DECL_OVERRIDE;
private Q_SLOTS:
//interface to handles
void moveHandle(const QPointF& handleScenePos);
diff --git a/objects.h b/objects.h
index 98583f6..affcc66 100644
--- a/objects.h
+++ b/objects.h
@@ -39,10 +39,10 @@ namespace Kolf
~BlackHole();
//FIXME: strutted moving of exit is broken since refactoring.
- virtual QList<QGraphicsItem*> infoItems() const;
- virtual void save(KConfigGroup* cfgGroup);
- virtual void load(KConfigGroup* cfgGroup);
- virtual Config* config(QWidget* parent);
+ QList<QGraphicsItem*> infoItems() const Q_DECL_OVERRIDE;
+ void save(KConfigGroup* cfgGroup) Q_DECL_OVERRIDE;
+ void load(KConfigGroup* cfgGroup) Q_DECL_OVERRIDE;
+ Config* config(QWidget* parent) Q_DECL_OVERRIDE;
double minSpeed() const;
double maxSpeed() const;
void setMinSpeed(double news);
@@ -56,15 +56,15 @@ namespace Kolf
void updateInfo();
- virtual void moveBy(double dx, double dy);
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
- virtual void shotStarted();
- virtual bool collision(Ball* ball);
+ void shotStarted() Q_DECL_OVERRIDE;
+ bool collision(Ball* ball) Q_DECL_OVERRIDE;
public Q_SLOTS:
void eject(Ball* ball, double speed);
void halfway();
protected:
- virtual Kolf::Overlay* createOverlay();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
private:
double m_minSpeed, m_maxSpeed;
int m_runs, m_exitDeg;
@@ -106,7 +106,7 @@ namespace Kolf
Q_OBJECT
public:
BlackHoleOverlay(Kolf::BlackHole* blackHole);
- virtual void update();
+ void update() Q_DECL_OVERRIDE;
private Q_SLOTS:
//interface to handles
void moveHandle(const QPointF& handleScenePos);
@@ -121,8 +121,8 @@ namespace Kolf
public:
Cup(QGraphicsItem* parent, b2World* world);
- virtual Kolf::Overlay* createOverlay();
- virtual bool collision(Ball* ball);
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
+ bool collision(Ball* ball) Q_DECL_OVERRIDE;
};
}
diff --git a/obstacles.h b/obstacles.h
index f47fe96..579653c 100644
--- a/obstacles.h
+++ b/obstacles.h
@@ -42,9 +42,9 @@ namespace Kolf
public:
Bumper(QGraphicsItem* parent, b2World* world);
- virtual bool collision(Ball* ball);
+ bool collision(Ball* ball) Q_DECL_OVERRIDE;
protected:
- virtual Kolf::Overlay* createOverlay();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
public Q_SLOTS:
void turnBumperOff();
};
@@ -54,15 +54,15 @@ namespace Kolf
public:
Wall(QGraphicsItem* parent, b2World* world);
- virtual void load(KConfigGroup* cfgGroup);
- virtual void save(KConfigGroup* cfgGroup);
+ void load(KConfigGroup* cfgGroup) Q_DECL_OVERRIDE;
+ void save(KConfigGroup* cfgGroup) Q_DECL_OVERRIDE;
void setVisible(bool visible);
virtual void setLine(const QLineF& line);
- virtual void moveBy(double dx, double dy);
- virtual QPointF getPosition() const;
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
+ QPointF getPosition() const Q_DECL_OVERRIDE;
protected:
- virtual Kolf::Overlay* createOverlay();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
private:
Kolf::LineShape* m_shape;
};
@@ -72,7 +72,7 @@ namespace Kolf
Q_OBJECT
public:
WallOverlay(Kolf::Wall* wall);
- virtual void update();
+ void update() Q_DECL_OVERRIDE;
private Q_SLOTS:
//interface to handles
void moveHandle(const QPointF& handleScenePos);
@@ -101,21 +101,21 @@ namespace Kolf
bool isWallAllowed(Kolf::WallIndex index) const;
void setWall(Kolf::WallIndex index, bool hasWall);
void setWallAllowed(Kolf::WallIndex index, bool wallAllowed);
- virtual void setSize(const QSizeF& size);
- virtual QPointF getPosition() const;
- virtual void moveBy(double dx, double dy);
+ void setSize(const QSizeF& size) Q_DECL_OVERRIDE;
+ QPointF getPosition() const Q_DECL_OVERRIDE;
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
void setWallColor(const QColor& color);
void applyWallStyle(Kolf::Wall* wall, bool adjustPainting = true);
- virtual void load(KConfigGroup* group);
- virtual void save(KConfigGroup* group);
+ void load(KConfigGroup* group) Q_DECL_OVERRIDE;
+ void save(KConfigGroup* group) Q_DECL_OVERRIDE;
- virtual Config* config(QWidget* parent);
+ Config* config(QWidget* parent) Q_DECL_OVERRIDE;
Q_SIGNALS:
void wallChanged(Kolf::WallIndex index, bool hasWall, bool wallAllowed);
protected:
- virtual Kolf::Overlay* createOverlay();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
virtual void updateWallPosition();
private:
QPen m_wallPen;
@@ -129,7 +129,7 @@ namespace Kolf
Q_OBJECT
public:
RectangleOverlay(Kolf::RectangleItem* item);
- virtual void update();
+ void update() Q_DECL_OVERRIDE;
private Q_SLOTS:
//interface to handles
void moveHandle(const QPointF& handleScenePos);
@@ -155,7 +155,7 @@ namespace Kolf
{
public:
Bridge(QGraphicsItem* parent, b2World* world);
- virtual bool collision(Ball* ball);
+ bool collision(Ball* ball) Q_DECL_OVERRIDE;
};
class Floater : public Kolf::RectangleItem
@@ -163,20 +163,20 @@ namespace Kolf
Q_OBJECT
public:
Floater(QGraphicsItem* parent, b2World* world);
- virtual void editModeChanged(bool changed);
- virtual void moveBy(double dx, double dy);
+ void editModeChanged(bool changed) Q_DECL_OVERRIDE;
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
QLineF motionLine() const;
void setMotionLine(const QLineF& motionLine);
int speed() const;
- virtual void advance(int phase);
+ void advance(int phase) Q_DECL_OVERRIDE;
- virtual void load(KConfigGroup* group);
- virtual void save(KConfigGroup* group);
+ void load(KConfigGroup* group) Q_DECL_OVERRIDE;
+ void save(KConfigGroup* group) Q_DECL_OVERRIDE;
public Q_SLOTS:
void setSpeed(int speed);
protected:
- virtual Kolf::Overlay* createOverlay();
+ Kolf::Overlay* createOverlay() Q_DECL_OVERRIDE;
private:
void setMlPosition(qreal position);
@@ -192,7 +192,7 @@ namespace Kolf
Q_OBJECT
public:
FloaterOverlay(Kolf::Floater* floater);
- virtual void update();
+ void update() Q_DECL_OVERRIDE;
private Q_SLOTS:
//interface to handles
void moveMotionLineHandle(const QPointF& handleScenePos);
@@ -209,10 +209,10 @@ namespace Kolf
Sign(QGraphicsItem* parent, b2World* world);
QString text() const;
- virtual void setSize(const QSizeF& size);
+ void setSize(const QSizeF& size) Q_DECL_OVERRIDE;
- virtual void load(KConfigGroup* group);
- virtual void save(KConfigGroup* group);
+ void load(KConfigGroup* group) Q_DECL_OVERRIDE;
+ void save(KConfigGroup* group) Q_DECL_OVERRIDE;
public Q_SLOTS:
void setText(const QString& text);
private:
@@ -229,16 +229,16 @@ namespace Kolf
bool guardAtTop() const;
int speed() const;
- virtual void advance(int phase);
- virtual void moveBy(double dx, double dy);
+ void advance(int phase) Q_DECL_OVERRIDE;
+ void moveBy(double dx, double dy) Q_DECL_OVERRIDE;
- virtual void load(KConfigGroup* group);
- virtual void save(KConfigGroup* group);
+ void load(KConfigGroup* group) Q_DECL_OVERRIDE;
+ void save(KConfigGroup* group) Q_DECL_OVERRIDE;
public Q_SLOTS:
void setGuardAtTop(bool guardAtTop);
void setSpeed(int speed);
protected:
- virtual void updateWallPosition();
+ void updateWallPosition() Q_DECL_OVERRIDE;
private:
Kolf::Wall* m_leftWall;
Kolf::Wall* m_rightWall;
diff --git a/overlay.h b/overlay.h
index 2b99413..af26cc3 100644
--- a/overlay.h
+++ b/overlay.h
@@ -48,11 +48,11 @@ namespace Kolf
void moveRequest(const QPointF& targetScenePos);
void moveEnded();
protected:
- virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
- virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
- virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
+ void hoverEnterEvent(QGraphicsSceneHoverEvent* event) Q_DECL_OVERRIDE;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
};
//This is used by Kolf::Overlay to paint the various outlines of an item.
@@ -75,11 +75,11 @@ namespace Kolf
void hoverEntered();
void hoverLeft();
protected:
- virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
- virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
- virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
- virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* event);
- virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
+ void hoverEnterEvent(QGraphicsSceneHoverEvent* event) Q_DECL_OVERRIDE;
+ void hoverLeaveEvent(QGraphicsSceneHoverEvent* event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) Q_DECL_OVERRIDE;
private:
Features m_features;
};
@@ -124,8 +124,8 @@ namespace Kolf
///Overlays should not allow to decrease an object's dimensions below this level, for the sake of usability.
static const qreal MinimumObjectDimension;
- virtual QRectF boundingRect() const;
- virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE;
Q_SIGNALS:
///This signal is emitted if the overlay's state changes.
void stateChanged();
diff --git a/shape.h b/shape.h
index 7c9a902..af9ceff 100644
--- a/shape.h
+++ b/shape.h
@@ -110,8 +110,8 @@ namespace Kolf
QRectF rect() const;
void setRect(const QRectF& rect);
protected:
- virtual b2Shape* createShape();
- virtual void createOutlines(QPainterPath& activationOutline, QPainterPath& interactionOutline);
+ b2Shape* createShape() Q_DECL_OVERRIDE;
+ void createOutlines(QPainterPath& activationOutline, QPainterPath& interactionOutline) Q_DECL_OVERRIDE;
private:
QRectF m_rect;
};
@@ -124,8 +124,8 @@ namespace Kolf
QRectF rect() const;
void setRect(const QRectF& rect);
protected:
- virtual b2Shape* createShape();
- virtual void createOutlines(QPainterPath& activationOutline, QPainterPath& interactionOutline);
+ b2Shape* createShape() Q_DECL_OVERRIDE;
+ void createOutlines(QPainterPath& activationOutline, QPainterPath& interactionOutline) Q_DECL_OVERRIDE;
private:
QRectF m_rect;
};
@@ -138,8 +138,8 @@ namespace Kolf
QLineF line() const;
void setLine(const QLineF& line);
protected:
- virtual b2Shape* createShape();
- virtual void createOutlines(QPainterPath& activationOutline, QPainterPath& interactionOutline);
+ b2Shape* createShape() Q_DECL_OVERRIDE;
+ void createOutlines(QPainterPath& activationOutline, QPainterPath& interactionOutline) Q_DECL_OVERRIDE;
private:
QLineF m_line;
};
diff --git a/tagaro/board.h b/tagaro/board.h
index ecdf9df..5cdc632 100644
--- a/tagaro/board.h
+++ b/tagaro/board.h
@@ -93,11 +93,11 @@ class Board : public QGraphicsObject
///@note The flag Qt::AlignJustify is not interpreted.
void setAlignment(Qt::Alignment alignment);
- virtual QRectF boundingRect() const;
- virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE;
protected:
- virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value);
- virtual void timerEvent(QTimerEvent* event);
+ QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent* event) Q_DECL_OVERRIDE;
private:
class Private;
Private* const d;
diff --git a/tagaro/scene.h b/tagaro/scene.h
index 65df2bd..d6d4e9d 100644
--- a/tagaro/scene.h
+++ b/tagaro/scene.h
@@ -79,7 +79,7 @@ class Scene : public QGraphicsScene
///size from the sceneRect().
void setBackgroundBrushRenderSize(const QSize& size);
protected:
- virtual bool eventFilter(QObject* watched, QEvent* event);
+ bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;
private:
class Private;
Private* const d;
diff --git a/tagaro/scene_p.h b/tagaro/scene_p.h
index 904108c..8e94dce 100644
--- a/tagaro/scene_p.h
+++ b/tagaro/scene_p.h
@@ -37,7 +37,7 @@ struct Tagaro::Scene::Private : public KGameRendererClient
QSize m_renderSize;
bool m_adjustingSceneRect;
protected:
- virtual void receivePixmap(const QPixmap& pixmap);
+ void receivePixmap(const QPixmap& pixmap) Q_DECL_OVERRIDE;
};
#endif // TAGARO_SCENE_P_H
diff --git a/tagaro/spriteobjectitem.cpp b/tagaro/spriteobjectitem.cpp
index 04dabdc..fba9518 100644
--- a/tagaro/spriteobjectitem.cpp
+++ b/tagaro/spriteobjectitem.cpp
@@ -44,10 +44,10 @@ class Tagaro::SpriteObjectItem::Private : public QGraphicsPixmapItem
inline void updateTransform();
//QGraphicsItem reimplementations (see comment below for why we need all of this)
- virtual bool contains(const QPointF& point) const;
- virtual bool isObscuredBy(const QGraphicsItem* item) const;
- virtual QPainterPath opaqueArea() const;
- virtual QPainterPath shape() const;
+ bool contains(const QPointF& point) const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem* item) const Q_DECL_OVERRIDE;
+ QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ QPainterPath shape() const Q_DECL_OVERRIDE;
};
Tagaro::SpriteObjectItem::Private::Private(QGraphicsItem* parent)
diff --git a/tagaro/spriteobjectitem.h b/tagaro/spriteobjectitem.h
index 781daee..3243d74 100644
--- a/tagaro/spriteobjectitem.h
+++ b/tagaro/spriteobjectitem.h
@@ -75,18 +75,18 @@ class SpriteObjectItem : public QGraphicsObject, public KGameRendererClient
inline void setSize(qreal width, qreal height);
//QGraphicsItem reimplementations (see comment in source file for why we need all of this)
- virtual QRectF boundingRect() const;
- virtual bool contains(const QPointF& point) const;
- virtual bool isObscuredBy(const QGraphicsItem* item) const;
- virtual QPainterPath opaqueArea() const;
- virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
- virtual QPainterPath shape() const;
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ bool contains(const QPointF& point) const Q_DECL_OVERRIDE;
+ bool isObscuredBy(const QGraphicsItem* item) const Q_DECL_OVERRIDE;
+ QPainterPath opaqueArea() const Q_DECL_OVERRIDE;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE;
+ QPainterPath shape() const Q_DECL_OVERRIDE;
Q_SIGNALS:
///This signal is emitted when the size of the item's bounding rect
///changes.
void sizeChanged(const QSizeF& size);
protected:
- virtual void receivePixmap(const QPixmap& pixmap);
+ void receivePixmap(const QPixmap& pixmap) Q_DECL_OVERRIDE;
private:
class Private;
Private* const d;
diff --git a/utils-animateditem.h b/utils-animateditem.h
index 98daa06..907e085 100644
--- a/utils-animateditem.h
+++ b/utils-animateditem.h
@@ -46,8 +46,8 @@ namespace Utils
///\warning Always use this instead of QGraphicsItem::setOpacity for direct opacity adjustments.
void setOpacity(qreal opacity);
- virtual QRectF boundingRect() const;
- virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+ QRectF boundingRect() const Q_DECL_OVERRIDE;
+ void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0) Q_DECL_OVERRIDE;
private:
int m_animationTime;
bool m_hideWhenInvisible;