Commit 91fa377d authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 470d26d6
......@@ -47,13 +47,13 @@ public:
* Allow or disallow input with this device
* @param allowed True if input is allowed
*/
void setInputAllowed(bool allowed);
void setInputAllowed(bool allowed) Q_DECL_OVERRIDE;
/**
* Retrieve the type of device.
* @return The device type.
*/
virtual InputDevice::InputDeviceType type() {return InputDevice::TypeAiInput;}
InputDevice::InputDeviceType type() Q_DECL_OVERRIDE {return InputDevice::TypeAiInput;}
public slots:
/**
......
......@@ -58,7 +58,7 @@ public:
* a new theme or a theme size change occurs. This object needs to
* resize and redraw then.
*/
virtual void changeTheme();
void changeTheme() Q_DECL_OVERRIDE;
/**
* Display the card front pixmap image
......@@ -74,7 +74,7 @@ public:
* Standard advance method
* @param phase Advance phase
*/
virtual void advance(int phase);
void advance(int phase) Q_DECL_OVERRIDE;
/**
* Stop all movement and animation.
......
......@@ -61,12 +61,12 @@ public:
* Main theme function. Called by the theme manager. Redraw and resize
* display.
*/
virtual void changeTheme();
void changeTheme() Q_DECL_OVERRIDE;
/**
* Start the intro.
*/
void start();
void start() Q_DECL_OVERRIDE;
/*
* Deal cards - unused.
......@@ -78,24 +78,24 @@ public:
/**
* Play a card on the display - unsused.
*/
void play(int /*cardNumber*/, int /*playerNumber*/, int /*phase*/) {}
void play(int /*cardNumber*/, int /*playerNumber*/, int /*phase*/) Q_DECL_OVERRIDE {}
/**
* Turn a card on the display - unused.
*/
void turn(int /*cardNumber*/) {}
void turn(int /*cardNumber*/) Q_DECL_OVERRIDE {}
/**
* Remove the given card from the display - unused.
*/
void remove(int /*winnerPosition*/, int /*cardNumber*/, int /*delta*/) {}
void remove(int /*winnerPosition*/, int /*cardNumber*/, int /*delta*/) Q_DECL_OVERRIDE {}
public slots:
/**
* Convert the position of a mouse click to a logical
* game position - unused.
*/
void convertMousePress(const QPoint &/*mouse*/, int &/*playerNumber*/, int &/*cardNumber*/) {}
void convertMousePress(const QPoint &/*mouse*/, int &/*playerNumber*/, int &/*cardNumber*/) Q_DECL_OVERRIDE {}
/**
* Animation loop. Called by timer.
......
......@@ -61,13 +61,13 @@ public:
/**
* Start the display.
*/
void start();
void start() Q_DECL_OVERRIDE;
/**
* Main theme function. Called by the theme manager. Redraw and resize
* display.
*/
virtual void changeTheme();
void changeTheme() Q_DECL_OVERRIDE;
/**
* Init a player on a given position. Create sprites etc.
......@@ -83,14 +83,14 @@ public:
* @param playerNumber The player number (0-1)
* @param phase Movement phase (1st part, 2nd part, etc) [optional]
*/
void play(int cardNumber, int playerNumber, int phase);
void play(int cardNumber, int playerNumber, int phase) Q_DECL_OVERRIDE;
/**
* Turn a card on the display. The card is flipped backside
* to frontside.
* @param cardNumber The card number (0-31)
*/
void turn(int cardNumber);
void turn(int cardNumber) Q_DECL_OVERRIDE;
/**
* Remove the given card from the display.
......@@ -98,7 +98,7 @@ public:
* @param cardNumber The number of the card
* @param delta Card offset from target position (0,1,2,...)
*/
void remove(int winnerPosition, int cardNumber, int delta);
void remove(int winnerPosition, int cardNumber, int delta) Q_DECL_OVERRIDE;
/**
* Display the score on the game board.
......@@ -128,7 +128,7 @@ public slots:
* @param playerNumber The resulting player number [0-1]
* @param cardNumber The resulting card number [0-7]
*/
void convertMousePress(const QPoint &mouse, int &playerNumber, int &cardNumber);
void convertMousePress(const QPoint &mouse, int &playerNumber, int &cardNumber) Q_DECL_OVERRIDE;
/**
* Connect a player with the score widget by setting the player properties
......
......@@ -61,12 +61,12 @@ public:
* @param trump The trump suite.
* @param startPlayer The start player
*/
virtual void startGame(Suite trump, int startPlayer);
void startGame(Suite trump, int startPlayer) Q_DECL_OVERRIDE;
/**
* Stop a game.
*/
virtual void stopGame();
void stopGame() Q_DECL_OVERRIDE;
/**
* Retrieve the current move phase.
......@@ -94,7 +94,7 @@ public slots:
* @param playerNumber The player number [0-1]
* @param cardNumber The card number [0-7]
*/
virtual void playerInput(int inputId, int playerNumber, int cardNumber);
void playerInput(int inputId, int playerNumber, int cardNumber) Q_DECL_OVERRIDE;
/**
* Check whether the two cards played are legal, supposed the
......
......@@ -62,7 +62,7 @@ public:
void setSize(const QSize &s);
void setDeckName(const QString &frontTheme);
void setElementsToLoad(const QStringList &elements);
void run();
void run() Q_DECL_OVERRIDE;
void kill();
private:
KCardCachePrivate *d;
......
......@@ -66,7 +66,7 @@ protected:
* React to mouse clicks.
* @param event The mouse event
*/
void mouseReleaseEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
public slots:
/**
......@@ -93,18 +93,18 @@ protected:
* We adapt the canvas then.
* @param e The resize event
*/
void resizeEvent(QResizeEvent *e);
void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
/**
* Paint function for the widget, temporary fix while we wait for QGV 4.3
* @param event The paint event
*/
void paintEvent(QPaintEvent *event);
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
/**
* Overwritten Qt function.
*/
virtual void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[]);
void drawItems(QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[]) Q_DECL_OVERRIDE;
private:
// Theme manager
......
......@@ -173,7 +173,7 @@ protected:
/**
* Called by KMainWindow when closing the window.
*/
void closeEvent(QCloseEvent *event);
void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
/**
* Retrieve the theme file from the theme index number give.
......
......@@ -48,7 +48,7 @@ public:
* Retrieve the type of device.
* @return The device type.
*/
virtual InputDevice::InputDeviceType type() {return InputDevice::TypeMouseInput;}
InputDevice::InputDeviceType type() Q_DECL_OVERRIDE {return InputDevice::TypeMouseInput;}
public slots:
/**
......
......@@ -62,13 +62,13 @@ public:
* Standard QGI advance function.
* @param phase The advance phase
*/
virtual void advance(int phase);
void advance(int phase) Q_DECL_OVERRIDE;
/**
* Retrieve the type of QGI. This item is UserType+3
* @return The type of item.
*/
virtual int type() const {return QGraphicsItem::UserType + 3;}
int type() const Q_DECL_OVERRIDE {return QGraphicsItem::UserType + 3;}
/**
* Retrieve the user defined sprite number (i.e. which PixmapSprite)
......@@ -81,7 +81,7 @@ public:
* a new theme or a theme size change occurs. This object needs to
* resize and redraw then.
*/
virtual void changeTheme();
void changeTheme() Q_DECL_OVERRIDE;
/**
* Choose a pixmap frame of this sprite. If the setting is forced a
......
......@@ -55,19 +55,19 @@ public:
* Standard QGI advance function.
* @param phase The advance phase
*/
virtual void advance(int phase);
void advance(int phase) Q_DECL_OVERRIDE;
/**
* Retrieve the type of QGI. This item is UserType+10
* @return The type of item.
*/
virtual int type() const {return QGraphicsItem::UserType + 10;}
int type() const Q_DECL_OVERRIDE {return QGraphicsItem::UserType + 10;}
/**
* Main theme change function. On call of this the item needs to redraw and
* resize.
*/
virtual void changeTheme();
void changeTheme() Q_DECL_OVERRIDE;
/**
* Store the player name.
......
......@@ -61,7 +61,7 @@ public:
* theme or a theme size change occurs. This object needs to resize and
* redraw then.
*/
virtual void changeTheme();
void changeTheme() 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