Commit 01a9ec90 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 0e097a5a
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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; }
......
......@@ -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; }
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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());
......
......@@ -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;