Commit e3d06664 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 94b746b4
......@@ -76,7 +76,7 @@ public:
* This function is used to determinate collision between items
* @return QPainterPath the new shape of the Bomb
*/
QPainterPath shape() const;
QPainterPath shape() const Q_DECL_OVERRIDE;
/**
* @return the explosion ID
......
......@@ -75,7 +75,7 @@ public:
* This function is used to determinate collision between items
* @return QPainterPath the new shape of the Bomb
*/
QPainterPath shape() const;
QPainterPath shape() const Q_DECL_OVERRIDE;
/**
* Pauses the BombItem animation.
......@@ -94,7 +94,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;
private slots:
/**
......
......@@ -47,7 +47,7 @@ public:
* Computes an action on a collision with the Player.
* @param p_player the Player instance that collides with the Bonus
*/
void doActionOnCollision(Player* p_player);
void doActionOnCollision(Player* p_player) Q_DECL_OVERRIDE;
Granatier::Bonus::Type getBonusType() const;
......
......@@ -54,7 +54,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:
......@@ -63,7 +63,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;
/**
* Sets the character dead.
......
......@@ -73,13 +73,13 @@ protected:
* 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;
/**
* Resizes the items when the view is showed.
* @param p_event the resize event
*/
void showEvent(QShowEvent* p_event);
void showEvent(QShowEvent* p_event) Q_DECL_OVERRIDE;
private:
class Private;
......
......@@ -47,9 +47,9 @@ class PlayerSelectorDelegate : public QStyledItemDelegate
{
public:
explicit PlayerSelectorDelegate(QObject* parent = nullptr);
virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE;
///@note The implementation is independent of @a option and @a index.
virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const Q_DECL_OVERRIDE;
};
//BEGIN PlayerSelector
......
......@@ -67,7 +67,7 @@ public:
/**
* Reimplement QGraphicsItem::shape() to return an ellipse to improve collisions.
*/
QPainterPath shape() const;
QPainterPath shape() const Q_DECL_OVERRIDE;
public slots:
......
......@@ -50,7 +50,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:
......@@ -58,19 +58,19 @@ 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;
/**
* Manages the player actions by hanlding the key release events.
* @param p_event the key release event
*/
void keyReleaseEvent(QKeyEvent* p_event);
void keyReleaseEvent(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:
......
......@@ -56,17 +56,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;
};
......
......@@ -155,22 +155,22 @@ public:
/**
* Makes the Player ask to go up
*/
void goUp();
void goUp() Q_DECL_OVERRIDE;
/**
* Makes the Player ask to go down
*/
void goDown();
void goDown() Q_DECL_OVERRIDE;
/**
* Makes the Player ask to go to the right
*/
void goRight();
void goRight() Q_DECL_OVERRIDE;
/**
* Makes the Player ask to go to the left
*/
void goLeft();
void goLeft() Q_DECL_OVERRIDE;
/**
* Moves the Player function of its current coordinates and speed.
......@@ -180,7 +180,7 @@ public:
/**
* Updates the Player move
*/
void updateMove();
void updateMove() Q_DECL_OVERRIDE;
/**
* @return the asked x speed value
......
......@@ -74,7 +74,7 @@ public slots:
*/
void updateDirection();
void updateGraphics(qreal svgScaleFactor);
void updateGraphics(qreal svgScaleFactor) Q_DECL_OVERRIDE;
/**
* Manages the collisions with any Element.
......@@ -86,7 +86,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 PlayerItem animation.
......@@ -122,7 +122,7 @@ public slots:
/**
* Implements the CharacterItem method.
*/
void setDead();
void setDead() Q_DECL_OVERRIDE;
/**
* resurrects the playeritem
......
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