Commit 97f04223 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 818c0d81
......@@ -38,9 +38,9 @@ Q_OBJECT
public:
explicit PauseAnimation(int time);
virtual void start(int t);
virtual bool step(int t);
virtual void stop() { }
void start(int t) Q_DECL_OVERRIDE;
bool step(int t) Q_DECL_OVERRIDE;
void stop() Q_DECL_OVERRIDE { }
};
class FadeAnimation : public Animation
......@@ -56,9 +56,9 @@ Q_OBJECT
public:
FadeAnimation(const SpritePtr& sprite, double from, double to, int time);
virtual void start(int t);
virtual bool step(int t);
virtual void stop();
void start(int t) Q_DECL_OVERRIDE;
bool step(int t) Q_DECL_OVERRIDE;
void stop() Q_DECL_OVERRIDE;
};
class MovementAnimation : public Animation
......@@ -73,9 +73,9 @@ public:
MovementAnimation(const SpritePtr& sprite, const QPointF& from,
const QPointF& velocity, int time);
virtual void start(int t);
virtual bool step(int t);
virtual void stop();
void start(int t) Q_DECL_OVERRIDE;
bool step(int t) Q_DECL_OVERRIDE;
void stop() Q_DECL_OVERRIDE;
};
......@@ -90,9 +90,9 @@ public:
void add(Animation* animation);
virtual void start(int t);
virtual bool step(int t);
virtual void stop();
void start(int t) Q_DECL_OVERRIDE;
bool step(int t) Q_DECL_OVERRIDE;
void stop() Q_DECL_OVERRIDE;
};
class AnimationSequence : public Animation
......@@ -105,9 +105,9 @@ public:
void add(Animation* animation);
virtual void start(int t);
virtual bool step(int t);
virtual void stop();
void start(int t) Q_DECL_OVERRIDE;
bool step(int t) Q_DECL_OVERRIDE;
void stop() Q_DECL_OVERRIDE;
};
#endif // ANIMATION_H
......
......@@ -23,14 +23,14 @@ class Ball : public KGameRenderedItem, public Sprite
public:
Ball(KGameRenderer* renderer, const QString& id, int size);
virtual void setOpacityF(qreal opacity);
virtual qreal opacityF() const;
void setOpacityF(qreal opacity) Q_DECL_OVERRIDE;
qreal opacityF() const Q_DECL_OVERRIDE;
virtual void setVelocity(const QPointF& vel);
virtual QPointF velocity() const;
void setVelocity(const QPointF& vel) Q_DECL_OVERRIDE;
QPointF velocity() const Q_DECL_OVERRIDE;
virtual void setPosition(const QPointF& pos);
virtual QPointF position() const;
void setPosition(const QPointF& pos) Q_DECL_OVERRIDE;
QPointF position() const Q_DECL_OVERRIDE;
qreal radius() const;
};
......
......@@ -96,8 +96,8 @@ Q_OBJECT
void onDeath();
void setManPosition(const QPointF& p);
protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent* e);
virtual void focusOutEvent(QFocusEvent*);
void mousePressEvent(QGraphicsSceneMouseEvent* e) Q_DECL_OVERRIDE;
void focusOutEvent(QFocusEvent*) Q_DECL_OVERRIDE;
public:
MainArea();
void start();
......
......@@ -20,14 +20,14 @@ class Message : public QGraphicsTextItem, public Sprite
public:
Message(const QString& text, const QFont& font, int maxwidth);
virtual void setOpacityF(qreal opacity);
virtual qreal opacityF() const;
void setOpacityF(qreal opacity) Q_DECL_OVERRIDE;
qreal opacityF() const Q_DECL_OVERRIDE;
virtual void setVelocity(const QPointF& vel);
virtual QPointF velocity() const;
void setVelocity(const QPointF& vel) Q_DECL_OVERRIDE;
QPointF velocity() const Q_DECL_OVERRIDE;
virtual void setPosition(const QPointF& pos);
virtual QPointF position() const;
void setPosition(const QPointF& pos) Q_DECL_OVERRIDE;
QPointF position() const Q_DECL_OVERRIDE;
int height() const;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment