Commit 90df59d4 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent 0e25804b
......@@ -49,7 +49,7 @@ public:
* Computes an action on a collision with the Kapman.
* @param p_kapman the Kapman instance that collides with the Bonus
*/
void doActionOnCollision(Kapman *p_kapman);
void doActionOnCollision(Kapman *p_kapman) Q_DECL_OVERRIDE;
/**
* Sets the given value to the Bonus.
......
......@@ -57,7 +57,7 @@ public:
* This function is used to determinate collision between items
* @return QPainterPath the new shape of the Character
*/
QPainterPath shape() const;
QPainterPath shape() const Q_DECL_OVERRIDE;
public slots:
......@@ -66,7 +66,7 @@ public slots:
* @param p_x the new x-coordinate
* @param p_y the new y-coordinate
*/
virtual void update(qreal p_x, qreal p_y);
void update(qreal p_x, qreal p_y) Q_DECL_OVERRIDE;
/**
* Starts the character blinking.
......
......@@ -61,7 +61,7 @@ public:
/**
* Reimplement QGraphicsItem::shape() to return an ellipse to improve collisions.
*/
QPainterPath shape() const;
QPainterPath shape() const Q_DECL_OVERRIDE;
public slots:
......
......@@ -61,7 +61,7 @@ public:
* Computes an action on a collision with the Kapman.
* @param p_kapman the instance of Kapman which collides with the Energyzer
*/
void doActionOnCollision(Kapman *p_kapman);
void doActionOnCollision(Kapman *p_kapman) Q_DECL_OVERRIDE;
};
#endif
......
......@@ -49,7 +49,7 @@ public:
* Resizes the items when the view is resized.
* @param p_event the resize event
*/
void resizeEvent(QResizeEvent *p_event);
void resizeEvent(QResizeEvent *p_event) Q_DECL_OVERRIDE;
protected:
......@@ -57,13 +57,13 @@ protected:
* Manages the player actions by hanlding the key press events.
* @param p_event the key press event
*/
void keyPressEvent(QKeyEvent *p_event);
void keyPressEvent(QKeyEvent *p_event) Q_DECL_OVERRIDE;
/**
* Pauses the game on focus lost.
* @param p_event the focus event
*/
void focusOutEvent(QFocusEvent *p_event);
void focusOutEvent(QFocusEvent *p_event) Q_DECL_OVERRIDE;
signals:
......
......@@ -75,7 +75,7 @@ public:
/**
* Updates the Ghost move.
*/
void updateMove();
void updateMove() Q_DECL_OVERRIDE;
/**
* Updates the Ghost with a direction to follow.
......@@ -106,34 +106,34 @@ public:
* Manages the collison with the Kapman.
* @param p_kapman the instance of Kapman which collides with the Ghost
*/
void doActionOnCollision(Kapman *p_kapman);
void doActionOnCollision(Kapman *p_kapman) Q_DECL_OVERRIDE;
/**
* Initializes the Ghost speed from the Character speed.
*/
void initSpeedInc();
void initSpeedInc() Q_DECL_OVERRIDE;
private:
/**
* Makes the Ghost go up.
*/
void goUp();
void goUp() Q_DECL_OVERRIDE;
/**
* Makes the Ghost go down.
*/
void goDown();
void goDown() Q_DECL_OVERRIDE;
/**
* Makes the Ghost go to the right.
*/
void goRight();
void goRight() Q_DECL_OVERRIDE;
/**
* Makes the Ghost go to the left.
*/
void goLeft();
void goLeft() Q_DECL_OVERRIDE;
signals:
......
......@@ -60,7 +60,7 @@ public slots:
* @param p_x the new x-coordinate
* @param p_y the new y-coordinate
*/
void update(qreal p_x, qreal p_y);
void update(qreal p_x, qreal p_y) Q_DECL_OVERRIDE;
/**
* Update the image function of the Ghost state.
......@@ -70,7 +70,7 @@ public slots:
/**
* Implements the CharacterItem method.
*/
void blink();
void blink() Q_DECL_OVERRIDE;
};
#endif
......
......@@ -59,27 +59,27 @@ public:
/**
* Makes the Kapman ask to go up
*/
void goUp();
void goUp() Q_DECL_OVERRIDE;
/**
* Makes the Kapman ask to go down
*/
void goDown();
void goDown() Q_DECL_OVERRIDE;
/**
* Makes the Kapman ask to go to the right
*/
void goRight();
void goRight() Q_DECL_OVERRIDE;
/**
* Makes the Kapman ask to go to the left
*/
void goLeft();
void goLeft() Q_DECL_OVERRIDE;
/**
* Updates the Kapman move
*/
void updateMove();
void updateMove() Q_DECL_OVERRIDE;
/**
* @return the asked x speed value
......@@ -110,7 +110,7 @@ public:
/**
* Initializes the Kapman speed from the Character speed.
*/
void initSpeedInc();
void initSpeedInc() Q_DECL_OVERRIDE;
private:
......
......@@ -77,7 +77,7 @@ public slots:
* @param p_x the new x-coordinate
* @param p_y the new y-coordinate
*/
void update(qreal p_x, qreal p_y);
void update(qreal p_x, qreal p_y) Q_DECL_OVERRIDE;
/**
* Starts the KapmanItem animation.
......@@ -108,12 +108,12 @@ public slots:
/**
* Implements the CharacterItem method.
*/
void startBlinking();
void startBlinking() Q_DECL_OVERRIDE;
/**
* Implements the CharacterItem method.
*/
void blink();
void blink() Q_DECL_OVERRIDE;
/**
* Set if the KapmanItem should be rotated (set by theme flag RotateKapman).
......
......@@ -55,17 +55,17 @@ public:
/**
* Implement QXmlDefaultHandler::characters
*/
bool characters(const QString &ch);
bool characters(const QString &ch) Q_DECL_OVERRIDE;
/**
* Implements QXmlDefaultHandler::startElement()
*/
bool startElement(const QString &, const QString &, const QString &p_qName, const QXmlAttributes &p_atts);
bool startElement(const QString &, const QString &, const QString &p_qName, const QXmlAttributes &p_atts) Q_DECL_OVERRIDE;
/**
* Implements QXmlDefaultHandler::endElement()
*/
bool endElement(const QString &, const QString &, const QString &p_qName);
bool endElement(const QString &, const QString &, const QString &p_qName) Q_DECL_OVERRIDE;
};
......
......@@ -49,7 +49,7 @@ public:
* Computes an action on a collision with the Kapman.
* @param p_kapman the instance of Kapman which collides with the Pill
*/
void doActionOnCollision(Kapman *p_kapman);
void doActionOnCollision(Kapman *p_kapman) Q_DECL_OVERRIDE;
};
#endif
......
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