From 4a5cdfe19cbb50e3b58149c6e91312366ee4b771 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Sep 2012 02:34:48 +0300 Subject: Add override keyword to most overriden methods. --- src/gui/botcheckerwindow.h | 4 +-- src/gui/buydialog.h | 9 ++--- src/gui/buyselldialog.h | 2 +- src/gui/changeemaildialog.h | 2 +- src/gui/changepassworddialog.h | 2 +- src/gui/charcreatedialog.h | 6 ++-- src/gui/charselectdialog.h | 4 +-- src/gui/chatwindow.h | 23 ++++++------ src/gui/confirmdialog.h | 2 +- src/gui/connectiondialog.h | 4 +-- src/gui/debugwindow.h | 12 +++---- src/gui/didyouknowwindow.h | 5 +-- src/gui/editdialog.h | 2 +- src/gui/editserverdialog.h | 10 +++--- src/gui/equipmentwindow.h | 10 +++--- src/gui/focushandler.h | 4 +-- src/gui/helpwindow.h | 4 +-- src/gui/inventorywindow.h | 17 ++++----- src/gui/itemamountwindow.h | 9 ++--- src/gui/itempopup.h | 2 +- src/gui/killstats.h | 6 ++-- src/gui/logindialog.h | 4 +-- src/gui/minimap.h | 8 ++--- src/gui/ministatuswindow.h | 13 +++---- src/gui/npcdialog.h | 12 +++---- src/gui/npcpostdialog.h | 2 +- src/gui/okdialog.h | 2 +- src/gui/outfitwindow.h | 10 +++--- src/gui/popupmenu.h | 6 ++-- src/gui/questswindow.h | 2 +- src/gui/quitdialog.h | 4 +-- src/gui/registerdialog.h | 6 ++-- src/gui/selldialog.h | 4 +-- src/gui/serverdialog.h | 14 ++++---- src/gui/setup.h | 2 +- src/gui/setup_colors.h | 4 +-- src/gui/setup_input.h | 2 +- src/gui/setup_joystick.h | 2 +- src/gui/setup_relations.h | 2 +- src/gui/setup_theme.h | 2 +- src/gui/setup_video.h | 2 +- src/gui/shopwindow.h | 4 +-- src/gui/shortcutwindow.h | 6 ++-- src/gui/skilldialog.h | 4 +-- src/gui/socialwindow.h | 4 +-- src/gui/specialswindow.h | 4 +-- src/gui/spellpopup.h | 2 +- src/gui/statuspopup.h | 2 -- src/gui/statuswindow.h | 5 +-- src/gui/textcommandeditor.h | 2 +- src/gui/textdialog.h | 2 +- src/gui/textpopup.h | 2 +- src/gui/theme.h | 2 +- src/gui/tradewindow.h | 4 +-- src/gui/unregisterdialog.h | 2 +- src/gui/updaterwindow.h | 9 ++--- src/gui/userpalette.h | 4 +-- src/gui/viewport.h | 12 +++---- src/gui/whoisonline.h | 10 +++--- src/gui/widgets/avatarlistbox.h | 8 ++--- src/gui/widgets/battletab.h | 4 +-- src/gui/widgets/browserbox.h | 8 ++--- src/gui/widgets/button.h | 12 +++---- src/gui/widgets/channeltab.h | 6 ++-- src/gui/widgets/chattab.h | 2 +- src/gui/widgets/checkbox.h | 8 ++--- src/gui/widgets/desktop.h | 4 +-- src/gui/widgets/dropdown.h | 14 ++++---- src/gui/widgets/dropshortcutcontainer.h | 14 ++++---- src/gui/widgets/emoteshortcutcontainer.h | 14 ++++---- src/gui/widgets/extendedlistbox.h | 4 +-- src/gui/widgets/extendednamesmodel.h | 6 ++-- src/gui/widgets/flowcontainer.h | 2 +- src/gui/widgets/guildchattab.h | 15 ++++---- src/gui/widgets/guitable.h | 24 ++++++------- src/gui/widgets/horizontcontainer.h | 2 +- src/gui/widgets/icon.h | 2 +- src/gui/widgets/inttextfield.h | 2 +- src/gui/widgets/itemcontainer.h | 20 +++++------ src/gui/widgets/itemlinkhandler.h | 3 +- src/gui/widgets/itemshortcutcontainer.h | 14 ++++---- src/gui/widgets/label.h | 2 +- src/gui/widgets/layouthelper.h | 2 +- src/gui/widgets/listbox.h | 12 +++---- src/gui/widgets/namesmodel.h | 6 ++-- src/gui/widgets/passwordfield.h | 2 +- src/gui/widgets/playerbox.h | 4 +-- src/gui/widgets/popup.h | 10 +++--- src/gui/widgets/progressbar.h | 8 ++--- src/gui/widgets/progressindicator.h | 6 ++-- src/gui/widgets/radiobutton.h | 10 +++--- src/gui/widgets/radiogroup.h | 2 +- src/gui/widgets/scrollarea.h | 36 +++++++++---------- src/gui/widgets/setupitem.h | 60 ++++++++++++++++---------------- src/gui/widgets/setuptabscroll.h | 8 ++--- src/gui/widgets/shopitems.h | 4 +-- src/gui/widgets/shoplistbox.h | 8 ++--- src/gui/widgets/shortcutcontainer.h | 10 +++--- src/gui/widgets/slider.h | 12 +++---- src/gui/widgets/sliderlist.h | 8 ++--- src/gui/widgets/spellshortcutcontainer.h | 14 ++++---- src/gui/widgets/tab.h | 7 ++-- src/gui/widgets/tabbedarea.h | 18 +++++----- src/gui/widgets/tablemodel.h | 4 +-- src/gui/widgets/tabstrip.h | 4 +-- src/gui/widgets/textbox.h | 4 +-- src/gui/widgets/textfield.h | 6 ++-- src/gui/widgets/textpreview.h | 2 +- src/gui/widgets/tradetab.h | 6 ++-- src/gui/widgets/vertcontainer.h | 2 +- src/gui/widgets/whispertab.h | 14 ++++---- src/gui/widgets/widgetgroup.h | 7 ++-- src/gui/widgets/window.h | 18 +++++----- src/gui/widgets/windowcontainer.h | 2 +- src/gui/windowmenu.h | 12 +++---- src/gui/worldselectdialog.h | 4 +-- 116 files changed, 422 insertions(+), 422 deletions(-) (limited to 'src/gui') diff --git a/src/gui/botcheckerwindow.h b/src/gui/botcheckerwindow.h index 5e6641161..b4159f9fb 100644 --- a/src/gui/botcheckerwindow.h +++ b/src/gui/botcheckerwindow.h @@ -64,7 +64,7 @@ class BotCheckerWindow final : public Window, */ ~BotCheckerWindow(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void update(); @@ -74,7 +74,7 @@ class BotCheckerWindow final : public Window, void reset(); - void optionChanged(const std::string &name); + void optionChanged(const std::string &name) override; private: UsersTableModel *mTableModel; diff --git a/src/gui/buydialog.h b/src/gui/buydialog.h index 91badb30d..95e232acd 100644 --- a/src/gui/buydialog.h +++ b/src/gui/buydialog.h @@ -88,7 +88,7 @@ class BuyDialog final : public Window, public gcn::ActionListener, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Returns the number of items in the shop inventory. @@ -98,12 +98,7 @@ class BuyDialog final : public Window, public gcn::ActionListener, /** * Updates the labels according to the selected item. */ - void valueChanged(const gcn::SelectionEvent &event); - - /** - * Returns the name of item number i in the shop inventory. - */ - std::string getElementAt(int i); + void valueChanged(const gcn::SelectionEvent &event) override; /** * Updates the state of buttons and labels. diff --git a/src/gui/buyselldialog.h b/src/gui/buyselldialog.h index d6fc3daa1..298c292c2 100644 --- a/src/gui/buyselldialog.h +++ b/src/gui/buyselldialog.h @@ -59,7 +59,7 @@ class BuySellDialog final : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Returns true if any instances exist. diff --git a/src/gui/changeemaildialog.h b/src/gui/changeemaildialog.h index 0db1d52df..2110fbed7 100644 --- a/src/gui/changeemaildialog.h +++ b/src/gui/changeemaildialog.h @@ -60,7 +60,7 @@ class ChangeEmailDialog final : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * This is used to pass the pointer to where the new email should be diff --git a/src/gui/changepassworddialog.h b/src/gui/changepassworddialog.h index 348311e48..aeece4d33 100644 --- a/src/gui/changepassworddialog.h +++ b/src/gui/changepassworddialog.h @@ -60,7 +60,7 @@ class ChangePasswordDialog final : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; private: gcn::TextField *mOldPassField; diff --git a/src/gui/charcreatedialog.h b/src/gui/charcreatedialog.h index 6e087d9a7..beedd7a5e 100644 --- a/src/gui/charcreatedialog.h +++ b/src/gui/charcreatedialog.h @@ -61,7 +61,7 @@ class CharCreateDialog final : public Window, */ ~CharCreateDialog(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Unlocks the dialog, enabling the create character button again. @@ -75,11 +75,11 @@ class CharCreateDialog final : public Window, void setFixedGender(const bool fixed, const Gender gender = GENDER_FEMALE); - void logic(); + void logic() override; void updatePlayer(); - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; private: int getDistributedPoints() const; diff --git a/src/gui/charselectdialog.h b/src/gui/charselectdialog.h index a76507f98..7f0ebfb2f 100644 --- a/src/gui/charselectdialog.h +++ b/src/gui/charselectdialog.h @@ -70,9 +70,9 @@ class CharSelectDialog final : public Window, ~CharSelectDialog(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; enum SelectAction { diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h index db3d496c3..012666d97 100644 --- a/src/gui/chatwindow.h +++ b/src/gui/chatwindow.h @@ -144,7 +144,7 @@ class ChatWindow final : public Window, /** * Performs action. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Request focus for typing chat message. @@ -174,7 +174,7 @@ class ChatWindow final : public Window, void localChatInput(const std::string &msg); /** Called when key is pressed */ - void keyPressed(gcn::KeyEvent &event); + void keyPressed(gcn::KeyEvent &event) override; /** Set the chat input as the given text. */ void setInputText(const std::string &text); @@ -191,14 +191,15 @@ class ChatWindow final : public Window, /** * Handles mouse when dragged. */ - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; /** * Handles mouse when pressed. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void processEvent(Channels channel, const DepricatedEvent &event); + void processEvent(Channels channel, + const DepricatedEvent &event) override; /** * Scrolls the chat window @@ -271,21 +272,21 @@ class ChatWindow final : public Window, void copyToClipboard(const int x, const int y) const; - void optionChanged(const std::string &name); + void optionChanged(const std::string &name) override; - void mouseEntered(gcn::MouseEvent& mouseEvent); + void mouseEntered(gcn::MouseEvent& mouseEvent) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; - void mouseExited(gcn::MouseEvent& mouseEvent A_UNUSED); + void mouseExited(gcn::MouseEvent& mouseEvent A_UNUSED) override; - void draw(gcn::Graphics* graphics); + void draw(gcn::Graphics* graphics) override; void updateVisibility(); void unHideWindow(); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; protected: friend class ChatTab; diff --git a/src/gui/confirmdialog.h b/src/gui/confirmdialog.h index f87b61282..fc5e77889 100644 --- a/src/gui/confirmdialog.h +++ b/src/gui/confirmdialog.h @@ -51,7 +51,7 @@ class ConfirmDialog : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; private: TextBox *mTextBox; diff --git a/src/gui/connectiondialog.h b/src/gui/connectiondialog.h index 56923bb7d..eb528868d 100644 --- a/src/gui/connectiondialog.h +++ b/src/gui/connectiondialog.h @@ -51,9 +51,9 @@ class ConnectionDialog final : public Window, private gcn::ActionListener * Called when the user presses Cancel. Restores the global state to * the previous one. */ - void action(const gcn::ActionEvent &); + void action(const gcn::ActionEvent &) override; - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; private: State mCancelState; diff --git a/src/gui/debugwindow.h b/src/gui/debugwindow.h index 4eca9ffae..95c2dd468 100644 --- a/src/gui/debugwindow.h +++ b/src/gui/debugwindow.h @@ -41,7 +41,7 @@ class DebugTab : public Container Container() { } - void logic() = 0; + void logic() override = 0; void resize(const int x, const int y) { setDimension(gcn::Rectangle(0, 0, x, y)); } @@ -56,7 +56,7 @@ class MapDebugTab final : public DebugTab public: MapDebugTab(); - void logic(); + void logic() override; private: Label *mMusicFileLabel; @@ -80,7 +80,7 @@ class TargetDebugTab final : public DebugTab public: TargetDebugTab(); - void logic(); + void logic() override; private: Label *mTargetLabel; @@ -102,7 +102,7 @@ class NetDebugTab final : public DebugTab public: NetDebugTab(); - void logic(); + void logic() override; private: Label *mPingLabel; @@ -130,11 +130,11 @@ class DebugWindow final : public Window */ void slowLogic(); - void draw(gcn::Graphics *g); + void draw(gcn::Graphics *g) override; void setPing(int pingTime); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; private: TabbedArea *mTabs; diff --git a/src/gui/didyouknowwindow.h b/src/gui/didyouknowwindow.h index 737203298..b0850bf64 100644 --- a/src/gui/didyouknowwindow.h +++ b/src/gui/didyouknowwindow.h @@ -54,12 +54,13 @@ class DidYouKnowWindow final : public Window, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Handles link action. */ - void handleLink(const std::string &link, gcn::MouseEvent *event); + void handleLink(const std::string &link, + gcn::MouseEvent *event) override; void loadData(int num = 0); diff --git a/src/gui/editdialog.h b/src/gui/editdialog.h index 94e7aabbf..20c88db19 100644 --- a/src/gui/editdialog.h +++ b/src/gui/editdialog.h @@ -54,7 +54,7 @@ class EditDialog final : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; std::string getMsg() const { return mTextField->getText(); } diff --git a/src/gui/editserverdialog.h b/src/gui/editserverdialog.h index 63631ffef..758a2fbf4 100644 --- a/src/gui/editserverdialog.h +++ b/src/gui/editserverdialog.h @@ -50,7 +50,7 @@ class TypeListModel : public gcn::ListModel /** * Used to get number of line in the list */ - int getNumberOfElements() + int getNumberOfElements() override #ifdef EATHENA_SUPPORT #ifdef MANASERV_SUPPORT { return 4; } @@ -68,7 +68,7 @@ class TypeListModel : public gcn::ListModel /** * Used to get an element from the list */ - std::string getElementAt(int elementIndex); + std::string getElementAt(int elementIndex) override; }; /** @@ -89,11 +89,11 @@ class EditServerDialog final : public Window, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; - void logic(); + void logic() override; private: TextField *mServerAddressField; diff --git a/src/gui/equipmentwindow.h b/src/gui/equipmentwindow.h index ba94006c9..55e13a180 100644 --- a/src/gui/equipmentwindow.h +++ b/src/gui/equipmentwindow.h @@ -82,11 +82,11 @@ class EquipmentWindow final : public Window, public gcn::ActionListener /** * Draws the equipment window. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void mousePressed(gcn::MouseEvent& mouseEvent); + void mousePressed(gcn::MouseEvent& mouseEvent) override; Item* getEquipment(int i) const { return mEquipment ? mEquipment->getEquipment(i) : nullptr; } @@ -97,9 +97,9 @@ class EquipmentWindow final : public Window, public gcn::ActionListener void resetBeing(const Being *const being); - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; private: Item *getItem(const int x, const int y) const; diff --git a/src/gui/focushandler.h b/src/gui/focushandler.h index a2c565ff6..f5aa3e8fb 100644 --- a/src/gui/focushandler.h +++ b/src/gui/focushandler.h @@ -42,14 +42,14 @@ class FocusHandler final : public gcn::FocusHandler * then that widget loses modal focus and will regain it after this * widget releases his modal focus. */ - void requestModalFocus(gcn::Widget *widget); + void requestModalFocus(gcn::Widget *widget) override; /** * Releases modal focus of a widget. When this widget had modal focus * and there are other widgets that had also requested modal focus, * then modal focus will be transfered to the last of those. */ - void releaseModalFocus(gcn::Widget *widget); + void releaseModalFocus(gcn::Widget *widget) override; /** * Removes a widget from the focus handler. Also makes sure no dangling diff --git a/src/gui/helpwindow.h b/src/gui/helpwindow.h index 677079964..1a3d0a6d7 100644 --- a/src/gui/helpwindow.h +++ b/src/gui/helpwindow.h @@ -60,13 +60,13 @@ class HelpWindow final : public Window, public LinkHandler, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Handles link action. */ void handleLink(const std::string &link, - gcn::MouseEvent *event A_UNUSED); + gcn::MouseEvent *event A_UNUSED) override; /** * Loads help in the dialog. diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index f06ee487e..75a5df7ec 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -76,7 +76,7 @@ class InventoryWindow final : public Window, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Returns the selected item. @@ -91,27 +91,27 @@ class InventoryWindow final : public Window, /** * Handles closing of the window */ - void widgetHidden(const gcn::Event &event); + void widgetHidden(const gcn::Event &event) override; /** * Handles the mouse clicks. */ - void mouseClicked(gcn::MouseEvent &event); + void mouseClicked(gcn::MouseEvent &event) override; /** * Handles the key presses. */ - void keyPressed(gcn::KeyEvent &event); + void keyPressed(gcn::KeyEvent &event) override; /** * Handles the key releases. */ - void keyReleased(gcn::KeyEvent &event); + void keyReleased(gcn::KeyEvent &event) override; /** * Updates labels to currently selected item. */ - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; /** * Sets whether the split button should be shown. @@ -137,13 +137,14 @@ class InventoryWindow final : public Window, void updateDropButton(); - void processEvent(Channels channel, const DepricatedEvent &event); + void processEvent(Channels channel, + const DepricatedEvent &event) override; void updateButtons(const Item *item = nullptr); bool isInputFocused() const; - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; static bool isAnyInputFocused(); diff --git a/src/gui/itemamountwindow.h b/src/gui/itemamountwindow.h index fd3ef3ab0..bf8b734fe 100644 --- a/src/gui/itemamountwindow.h +++ b/src/gui/itemamountwindow.h @@ -65,7 +65,7 @@ class ItemAmountWindow final : public Window, /** * Called when receiving actions from widget. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Sets default amount value. @@ -73,15 +73,16 @@ class ItemAmountWindow final : public Window, void resetAmount(); // MouseListener - void mouseMoved(gcn::MouseEvent &event); - void mouseExited(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; + + void mouseExited(gcn::MouseEvent &event) override; /** * Schedules the Item Amount window for deletion. */ void close(); - void keyReleased(gcn::KeyEvent &keyEvent); + void keyReleased(gcn::KeyEvent &keyEvent) override; /** * Creates the dialog, or bypass it if there aren't enough items. diff --git a/src/gui/itempopup.h b/src/gui/itempopup.h index 0bdfcfeb5..47fd8a09f 100644 --- a/src/gui/itempopup.h +++ b/src/gui/itempopup.h @@ -65,7 +65,7 @@ class ItemPopup final : public Popup void setItem(const Item *const item, const bool showImage = false); - void mouseMoved(gcn::MouseEvent &mouseEvent); + void mouseMoved(gcn::MouseEvent &mouseEvent) override; private: gcn::Label *mItemName; diff --git a/src/gui/killstats.h b/src/gui/killstats.h index 1db3a4943..6ae4a6575 100644 --- a/src/gui/killstats.h +++ b/src/gui/killstats.h @@ -55,7 +55,7 @@ class KillStats final : public Window, /** * Stuff. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void gainXp(int Xp); @@ -67,7 +67,7 @@ class KillStats final : public Window, /** * Draw this window */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Updates this dialog @@ -84,7 +84,7 @@ class KillStats final : public Window, void jackoAlive(const int id); void processEvent(Channels channel A_UNUSED, - const DepricatedEvent &event); + const DepricatedEvent &event) override; void resetTimes(); diff --git a/src/gui/logindialog.h b/src/gui/logindialog.h index 9b6ace887..b75c17836 100644 --- a/src/gui/logindialog.h +++ b/src/gui/logindialog.h @@ -67,12 +67,12 @@ class LoginDialog final : public Window, public gcn::ActionListener, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Called when a key is pressed in one of the text fields. */ - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; static std::string savedPasswordKey; static std::string savedPassword; diff --git a/src/gui/minimap.h b/src/gui/minimap.h index 95b29ad89..5dffbb788 100644 --- a/src/gui/minimap.h +++ b/src/gui/minimap.h @@ -57,13 +57,13 @@ class Minimap final : public Window /** * Draws the minimap. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; void screenToMap(int &x, int &y); diff --git a/src/gui/ministatuswindow.h b/src/gui/ministatuswindow.h index bfb14c2b8..58eabcf56 100644 --- a/src/gui/ministatuswindow.h +++ b/src/gui/ministatuswindow.h @@ -59,19 +59,20 @@ class MiniStatusWindow final : public Popup, void drawIcons(Graphics *const graphics); - void processEvent(Channels channel, const DepricatedEvent &event); + void processEvent(Channels channel, + const DepricatedEvent &event) override; void updateStatus(); - void logic(); // Updates icons + void logic() override; // Updates icons - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; - void mouseMoved(gcn::MouseEvent &mouseEvent); + void mouseMoved(gcn::MouseEvent &mouseEvent) override; - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; void showBar(const std::string &name, const bool visible); diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h index 6437311b4..86b6bdabd 100644 --- a/src/gui/npcdialog.h +++ b/src/gui/npcdialog.h @@ -71,7 +71,7 @@ class NpcDialog final : public Window, public gcn::ActionListener, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Sets the text shows in the dialog. @@ -112,17 +112,17 @@ class NpcDialog final : public Window, public gcn::ActionListener, /** * Returns the number of items in the choices list. */ - int getNumberOfElements(); + int getNumberOfElements() override; /** * Returns the name of item number i of the choices list. */ - std::string getElementAt(int i); + std::string getElementAt(int i) override; /** * Returns the image of item number i of the choices list. */ - const Image *getImageAt(int i); + const Image *getImageAt(int i) override; /** * Makes this dialog request a choice selection from the user. @@ -162,7 +162,7 @@ class NpcDialog final : public Window, public gcn::ActionListener, void setVisible(bool visible); - void optionChanged(const std::string &name); + void optionChanged(const std::string &name) override; /** * Returns true if any instances exist. @@ -198,7 +198,7 @@ class NpcDialog final : public Window, public gcn::ActionListener, void setAvatarAction(const int actionId); - void logic(); + void logic() override; void clearRows(); diff --git a/src/gui/npcpostdialog.h b/src/gui/npcpostdialog.h index 96b51fb47..a13a25d2f 100644 --- a/src/gui/npcpostdialog.h +++ b/src/gui/npcpostdialog.h @@ -43,7 +43,7 @@ public: /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void setVisible(bool visible); diff --git a/src/gui/okdialog.h b/src/gui/okdialog.h index 2d2fefee4..4ef32e4e2 100644 --- a/src/gui/okdialog.h +++ b/src/gui/okdialog.h @@ -58,7 +58,7 @@ class OkDialog final : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; private: TextBox *mTextBox; diff --git a/src/gui/outfitwindow.h b/src/gui/outfitwindow.h index a72bf332a..da0dedb59 100644 --- a/src/gui/outfitwindow.h +++ b/src/gui/outfitwindow.h @@ -55,15 +55,15 @@ class OutfitWindow final : public Window, private gcn::ActionListener */ ~OutfitWindow(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; void load(const bool oldConfig = false); diff --git a/src/gui/popupmenu.h b/src/gui/popupmenu.h index 3ce363a34..b797138be 100644 --- a/src/gui/popupmenu.h +++ b/src/gui/popupmenu.h @@ -50,7 +50,7 @@ class RenameListener final : public gcn::ActionListener public: RenameListener(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void setMapItem(MapItem* mapItem) { mMapItem = mapItem; } @@ -68,7 +68,7 @@ class PlayerListener : public gcn::ActionListener public: PlayerListener(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void setNick(std::string name) { mNick = name; } @@ -163,7 +163,7 @@ class PopupMenu final : public Popup, public LinkHandler * Handles link action. */ void handleLink(const std::string &link, - gcn::MouseEvent *event A_UNUSED); + gcn::MouseEvent *event A_UNUSED) override; private: void addPlayerRelation(std::string name); diff --git a/src/gui/questswindow.h b/src/gui/questswindow.h index 017dd43c3..43a3e9758 100644 --- a/src/gui/questswindow.h +++ b/src/gui/questswindow.h @@ -56,7 +56,7 @@ class QuestsWindow final : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void updateQuest(const int var, const int val); diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h index 4c26ee90e..965e50226 100644 --- a/src/gui/quitdialog.h +++ b/src/gui/quitdialog.h @@ -60,9 +60,9 @@ class QuitDialog final : public Window, public gcn::ActionListener, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; private: void placeOption(ContainerPlacer &placer, diff --git a/src/gui/registerdialog.h b/src/gui/registerdialog.h index 6117da102..bc73e3a8d 100644 --- a/src/gui/registerdialog.h +++ b/src/gui/registerdialog.h @@ -50,7 +50,7 @@ class WrongDataNoticeListener final : public gcn::ActionListener public: WrongDataNoticeListener(); void setTarget(gcn::TextField *const textField); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; private: gcn::TextField *mTarget; }; @@ -80,12 +80,12 @@ class RegisterDialog final : public Window, public gcn::ActionListener, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Called when a key is pressed in one of the text fields. */ - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; private: /** diff --git a/src/gui/selldialog.h b/src/gui/selldialog.h index 1fe5e234f..2315a3400 100644 --- a/src/gui/selldialog.h +++ b/src/gui/selldialog.h @@ -84,14 +84,14 @@ class SellDialog final : public Window, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Updates labels according to selected item. * * @see SelectionListener::selectionChanged */ - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; /** * Gives Player's Money amount diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index 1c6e850cb..c5f7d26e8 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -61,12 +61,12 @@ class ServersListModel final : public gcn::ListModel /** * Used to get number of line in the list */ - int getNumberOfElements(); + int getNumberOfElements() override; /** * Used to get an element from the list */ - std::string getElementAt(int elementIndex); + std::string getElementAt(int elementIndex) override; /** * Used to get the corresponding Server struct @@ -111,18 +111,18 @@ class ServerDialog : public Window, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; /** * Called when the selected value changed in the servers list box. */ - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; - void mouseClicked(gcn::MouseEvent &mouseEvent); + void mouseClicked(gcn::MouseEvent &mouseEvent) override; - void logic(); + void logic() override; void updateServer(ServerInfo server, const int index); diff --git a/src/gui/setup.h b/src/gui/setup.h index 5687e8c7e..a33188369 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -55,7 +55,7 @@ class Setup final : public Window, public gcn::ActionListener /** * Event handling method. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Enables the reset button when in game. diff --git a/src/gui/setup_colors.h b/src/gui/setup_colors.h index 3f30d8d4c..3f4c3012a 100644 --- a/src/gui/setup_colors.h +++ b/src/gui/setup_colors.h @@ -51,9 +51,9 @@ class Setup_Colors final : public SetupTab, void apply(); void cancel(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; private: static const std::string rawmsg; diff --git a/src/gui/setup_input.h b/src/gui/setup_input.h index 2346cc67d..c8d863db5 100644 --- a/src/gui/setup_input.h +++ b/src/gui/setup_input.h @@ -53,7 +53,7 @@ class Setup_Input final : public SetupTab void cancel(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Get an update on the assigned key. diff --git a/src/gui/setup_joystick.h b/src/gui/setup_joystick.h index 63d9e7880..b470b3cca 100644 --- a/src/gui/setup_joystick.h +++ b/src/gui/setup_joystick.h @@ -48,7 +48,7 @@ class Setup_Joystick final : public SetupTab void cancel(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void setTempEnabled(const bool sel); diff --git a/src/gui/setup_relations.h b/src/gui/setup_relations.h index d81a80a60..cc296527e 100644 --- a/src/gui/setup_relations.h +++ b/src/gui/setup_relations.h @@ -55,7 +55,7 @@ public: void reset(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; virtual void updatedPlayer(const std::string &name); diff --git a/src/gui/setup_theme.h b/src/gui/setup_theme.h index 53f23d267..35b89ea61 100644 --- a/src/gui/setup_theme.h +++ b/src/gui/setup_theme.h @@ -49,7 +49,7 @@ class Setup_Theme final : public SetupTab void apply(); void cancel(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; private: gcn::Label *mThemeLabel; diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h index fc3f61439..5425e3da2 100644 --- a/src/gui/setup_video.h +++ b/src/gui/setup_video.h @@ -53,7 +53,7 @@ class Setup_Video final : public SetupTab, public gcn::KeyListener void apply(); void cancel(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; virtual void externalUpdated(); diff --git a/src/gui/shopwindow.h b/src/gui/shopwindow.h index 5faaeb8ab..420c3bef7 100644 --- a/src/gui/shopwindow.h +++ b/src/gui/shopwindow.h @@ -73,12 +73,12 @@ class ShopWindow final : public Window, public gcn::ActionListener, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Updates the labels according to the selected item. */ - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; /** * Updates the state of buttons and labels. diff --git a/src/gui/shortcutwindow.h b/src/gui/shortcutwindow.h index 531df51ce..0991bb124 100644 --- a/src/gui/shortcutwindow.h +++ b/src/gui/shortcutwindow.h @@ -57,11 +57,11 @@ class ShortcutWindow final : public Window int getTabIndex() const; - void widgetHidden(const gcn::Event &event); + void widgetHidden(const gcn::Event &event) override; - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; private: ShortcutWindow(); diff --git a/src/gui/skilldialog.h b/src/gui/skilldialog.h index 0fd961e1c..52a9281cf 100644 --- a/src/gui/skilldialog.h +++ b/src/gui/skilldialog.h @@ -91,7 +91,7 @@ class SkillDialog final : public Window, public gcn::ActionListener /** * Called when receiving actions from widget. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Update the given skill's display @@ -115,7 +115,7 @@ class SkillDialog final : public Window, public gcn::ActionListener bool hasSkills() const { return !mSkills.empty(); } - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; void useItem(const int itemId); diff --git a/src/gui/socialwindow.h b/src/gui/socialwindow.h index 0287e9100..863ffdedf 100644 --- a/src/gui/socialwindow.h +++ b/src/gui/socialwindow.h @@ -67,7 +67,7 @@ public: /** * Handle events. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void showGuildInvite(const std::string &guildName, const int guildId, const std::string &inviterName); @@ -119,7 +119,7 @@ public: void updatePickupFilter(); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; protected: friend class SocialTab; diff --git a/src/gui/specialswindow.h b/src/gui/specialswindow.h index a824c4296..56804ce74 100644 --- a/src/gui/specialswindow.h +++ b/src/gui/specialswindow.h @@ -49,9 +49,9 @@ class SpecialsWindow final : public Window, public gcn::ActionListener /** * Called when receiving actions from widget. */ - void action(const gcn::ActionEvent &actionEvent); + void action(const gcn::ActionEvent &actionEvent) override; - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; private: // (re)constructs the list of specials diff --git a/src/gui/spellpopup.h b/src/gui/spellpopup.h index 97266ca9e..ace4dbdf9 100644 --- a/src/gui/spellpopup.h +++ b/src/gui/spellpopup.h @@ -63,7 +63,7 @@ class SpellPopup final : public Popup */ void view(const int x, const int y); - void mouseMoved(gcn::MouseEvent &mouseEvent); + void mouseMoved(gcn::MouseEvent &mouseEvent) override; private: gcn::Label *mItemName; diff --git a/src/gui/statuspopup.h b/src/gui/statuspopup.h index 99ba46792..380e93e48 100644 --- a/src/gui/statuspopup.h +++ b/src/gui/statuspopup.h @@ -60,8 +60,6 @@ class StatusPopup final : public Popup */ void view(const int x, const int y); -// void mouseMoved(gcn::MouseEvent &mouseEvent); - void update(); private: diff --git a/src/gui/statuswindow.h b/src/gui/statuswindow.h index 0d3fefb4b..25b86d505 100644 --- a/src/gui/statuswindow.h +++ b/src/gui/statuswindow.h @@ -57,7 +57,8 @@ class StatusWindow final : public Window, */ StatusWindow(); - void processEvent(Channels channel, const DepricatedEvent &event); + void processEvent(Channels channel, + const DepricatedEvent &event) override; void setPointsNeeded(const int id, const int needed); @@ -83,7 +84,7 @@ class StatusWindow final : public Window, void updateProgressBar(ProgressBar *const bar, const int id, const bool percent = true) const; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void clearAttributes(); diff --git a/src/gui/textcommandeditor.h b/src/gui/textcommandeditor.h index 616c6d627..c715e0faa 100644 --- a/src/gui/textcommandeditor.h +++ b/src/gui/textcommandeditor.h @@ -55,7 +55,7 @@ class TextCommandEditor final : public Window, public gcn::ActionListener */ ~TextCommandEditor(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void update(); diff --git a/src/gui/textdialog.h b/src/gui/textdialog.h index 71cc88bcd..c9f3b150d 100644 --- a/src/gui/textdialog.h +++ b/src/gui/textdialog.h @@ -56,7 +56,7 @@ public: /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Get the text in the textfield diff --git a/src/gui/textpopup.h b/src/gui/textpopup.h index faf61e311..fd901225a 100644 --- a/src/gui/textpopup.h +++ b/src/gui/textpopup.h @@ -73,7 +73,7 @@ class TextPopup final : public Popup void show(const int x, const int y, const std::string &str1, const std::string &str2, const std::string &str3); - void mouseMoved(gcn::MouseEvent &mouseEvent); + void mouseMoved(gcn::MouseEvent &mouseEvent) override; private: gcn::Label *mText1; diff --git a/src/gui/theme.h b/src/gui/theme.h index 86be2e743..a32237be1 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -315,7 +315,7 @@ class Theme final : public Palette, public ConfigListener */ void setMinimumOpacity(const float minimumOpacity); - void optionChanged(const std::string &); + void optionChanged(const std::string &) override; void loadRect(ImageRect &image, const std::string &name, const std::string &name2, const int start = 0, diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h index 0ba3b9043..9785a1344 100644 --- a/src/gui/tradewindow.h +++ b/src/gui/tradewindow.h @@ -111,12 +111,12 @@ class TradeWindow final : public Window, * Updates the labels and makes sure only one item is selected in * either my inventory or partner inventory. */ - void valueChanged(const gcn::SelectionEvent &event); + void valueChanged(const gcn::SelectionEvent &event) override; /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; /** * Closes the Trade Window, as well as telling the server that the diff --git a/src/gui/unregisterdialog.h b/src/gui/unregisterdialog.h index e647b2bb9..28f279444 100644 --- a/src/gui/unregisterdialog.h +++ b/src/gui/unregisterdialog.h @@ -57,7 +57,7 @@ class UnRegisterDialog final : public Window, public gcn::ActionListener /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; private: LoginData *mLoginData; diff --git a/src/gui/updaterwindow.h b/src/gui/updaterwindow.h index 0adadb9ec..2f934aee5 100644 --- a/src/gui/updaterwindow.h +++ b/src/gui/updaterwindow.h @@ -109,13 +109,14 @@ class UpdaterWindow final : public Window, void loadPatch(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; - void logic(); + void logic() override; - void handleLink(const std::string &link, gcn::MouseEvent *event A_UNUSED); + void handleLink(const std::string &link, + gcn::MouseEvent *event A_UNUSED) override; static void loadLocalUpdates(const std::string &dir); diff --git a/src/gui/userpalette.h b/src/gui/userpalette.h index f14c2c10c..2fb9c8904 100644 --- a/src/gui/userpalette.h +++ b/src/gui/userpalette.h @@ -150,7 +150,7 @@ class UserPalette final : public Palette, public gcn::ListModel * * @return the number of colors known */ - inline int getNumberOfElements() + inline int getNumberOfElements() override { return static_cast(mColors.size()); } /** @@ -160,7 +160,7 @@ class UserPalette final : public Palette, public gcn::ListModel * * @return the name of the color */ - std::string getElementAt(int i); + std::string getElementAt(int i) override; /** * Commit the colors diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 4d4c61896..b88702afe 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -83,7 +83,7 @@ class Viewport final : public WindowContainer, /** * Draws the viewport. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Implements player to keep following mouse. @@ -102,22 +102,22 @@ class Viewport final : public WindowContainer, /** * Handles mouse press on map. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; /** * Handles mouse move on map */ - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; /** * Handles mouse button release on map. */ - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; /** * Handles mouse move on map. */ - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; /** * Shows a popup for an item. @@ -189,7 +189,7 @@ class Viewport final : public WindowContainer, /** * A relevant config option changed. */ - void optionChanged(const std::string &name); + void optionChanged(const std::string &name) override; /** * Returns camera x offset in pixels. diff --git a/src/gui/whoisonline.h b/src/gui/whoisonline.h index 35565930e..4e0638ef1 100644 --- a/src/gui/whoisonline.h +++ b/src/gui/whoisonline.h @@ -129,15 +129,15 @@ public: void loadList(std::vector &list); - void handleLink(const std::string& link, gcn::MouseEvent *event); + void handleLink(const std::string& link, gcn::MouseEvent *event) override; - void logic(); + void logic() override; void slowLogic(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; const std::set &getOnlinePlayers() const { return mOnlinePlayers; } @@ -148,7 +148,7 @@ public: void setAllowUpdate(const bool n) { mAllowUpdate = n; } - void optionChanged(const std::string &name); + void optionChanged(const std::string &name) override; void updateList(StringVect &list); diff --git a/src/gui/widgets/avatarlistbox.h b/src/gui/widgets/avatarlistbox.h index 9ab56e9b0..803a80070 100644 --- a/src/gui/widgets/avatarlistbox.h +++ b/src/gui/widgets/avatarlistbox.h @@ -39,7 +39,7 @@ class AvatarListModel : public gcn::ListModel public: virtual Avatar *getAvatarAt(const int i) = 0; - std::string getElementAt(int i) + std::string getElementAt(int i) override { return getAvatarAt(i)->getName(); } }; @@ -53,11 +53,11 @@ public: /** * Draws the list box. */ - void draw(gcn::Graphics *gcnGraphics); + void draw(gcn::Graphics *gcnGraphics) override; - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void optionChanged(const std::string &value); + void optionChanged(const std::string &value) override; private: bool mShowGender; diff --git a/src/gui/widgets/battletab.h b/src/gui/widgets/battletab.h index 12ba23ebf..87b082901 100644 --- a/src/gui/widgets/battletab.h +++ b/src/gui/widgets/battletab.h @@ -35,10 +35,10 @@ class BattleTab final : public ChatTab ~BattleTab(); - int getType() const + int getType() const override { return ChatTab::TAB_BATTLE; } - void saveToLogFile(std::string &msg); + void saveToLogFile(std::string &msg) override; }; extern BattleTab *battleChatTab; diff --git a/src/gui/widgets/browserbox.h b/src/gui/widgets/browserbox.h index e95507c8c..9cf74ef4f 100644 --- a/src/gui/widgets/browserbox.h +++ b/src/gui/widgets/browserbox.h @@ -140,19 +140,17 @@ class BrowserBox final : public gcn::Widget, /** * Handles mouse actions. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; /** * Draws the browser box. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; void updateHeight(); -// void widgetResized(const gcn::Event &event); - /** * BrowserBox modes. */ diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h index fbc040171..36f539b6a 100644 --- a/src/gui/widgets/button.h +++ b/src/gui/widgets/button.h @@ -80,14 +80,14 @@ class Button final : public gcn::Button, public gcn::WidgetListener /** * Draws the button. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Update the alpha value to the button components. */ void updateAlpha(); - virtual void mouseReleased(gcn::MouseEvent& mouseEvent); + virtual void mouseReleased(gcn::MouseEvent& mouseEvent) override; void setDescription(std::string text) { mDescription = text; } @@ -110,9 +110,9 @@ class Button final : public gcn::Button, public gcn::WidgetListener void setPressed(bool b) { mPressed = b; } - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; - void widgetMoved(const gcn::Event &event); + void widgetMoved(const gcn::Event &event) override; void loadImage(const std::string &imageName); @@ -120,9 +120,9 @@ class Button final : public gcn::Button, public gcn::WidgetListener void setCaption(const std::string& caption); - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; - void keyReleased(gcn::KeyEvent &keyEvent); + void keyReleased(gcn::KeyEvent &keyEvent) override; bool isPressed2() const; diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h index 92126e929..96b6dd6ac 100644 --- a/src/gui/widgets/channeltab.h +++ b/src/gui/widgets/channeltab.h @@ -37,10 +37,10 @@ class ChannelTab final : public ChatTab Channel *getChannel() const { return mChannel; } - void showHelp(); + void showHelp() override; bool handleCommand(const std::string &type, - const std::string &args); + const std::string &args) override; protected: friend class Channel; @@ -55,7 +55,7 @@ class ChannelTab final : public ChatTab */ ~ChannelTab(); - void handleInput(const std::string &msg); + void handleInput(const std::string &msg) override; private: Channel *mChannel; diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h index 0b4a287d0..ba6698e50 100644 --- a/src/gui/widgets/chattab.h +++ b/src/gui/widgets/chattab.h @@ -169,7 +169,7 @@ class ChatTab : public Tab friend class ChatWindow; friend class WhisperWindow; - virtual void setCurrent() + virtual void setCurrent() override { setFlash(0); } virtual void handleInput(const std::string &msg); diff --git a/src/gui/widgets/checkbox.h b/src/gui/widgets/checkbox.h index bb3cf751a..54e9a5e0d 100644 --- a/src/gui/widgets/checkbox.h +++ b/src/gui/widgets/checkbox.h @@ -52,7 +52,7 @@ class CheckBox final : public gcn::CheckBox /** * Draws the caption, then calls drawBox to draw the check box. */ - void draw(gcn::Graphics *const graphics); + void draw(gcn::Graphics *const graphics) override; /** * Update the alpha value to the checkbox components. @@ -67,14 +67,14 @@ class CheckBox final : public gcn::CheckBox /** * Called when the mouse enteres the widget area. */ - void mouseEntered(gcn::MouseEvent& event); + void mouseEntered(gcn::MouseEvent& event) override; /** * Called when the mouse leaves the widget area. */ - void mouseExited(gcn::MouseEvent& event); + void mouseExited(gcn::MouseEvent& event) override; - void keyPressed(gcn::KeyEvent& keyEvent); + void keyPressed(gcn::KeyEvent& keyEvent) override; private: static int instances; diff --git a/src/gui/widgets/desktop.h b/src/gui/widgets/desktop.h index 3cff9a75a..d8fa7d36a 100644 --- a/src/gui/widgets/desktop.h +++ b/src/gui/widgets/desktop.h @@ -57,9 +57,9 @@ class Desktop final : public Container, private gcn::WidgetListener */ void reloadWallpaper(); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; private: void setBestFittingWallpaper(); diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index 813a19e5f..f76a38b4d 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -59,25 +59,25 @@ class DropDown final : public gcn::DropDown */ void updateAlpha(); - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; - void drawFrame(gcn::Graphics *graphics); + void drawFrame(gcn::Graphics *graphics) override; // Inherited from FocusListener - void focusLost(const gcn::Event& event); + void focusLost(const gcn::Event& event) override; // Inherited from KeyListener - void keyPressed(gcn::KeyEvent& keyEvent); + void keyPressed(gcn::KeyEvent& keyEvent) override; // Inherited from MouseListener - void mousePressed(gcn::MouseEvent& mouseEvent); + void mousePressed(gcn::MouseEvent& mouseEvent) override; - void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent); + void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent) override; - void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent); + void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent) override; void setSelectedString(std::string str); diff --git a/src/gui/widgets/dropshortcutcontainer.h b/src/gui/widgets/dropshortcutcontainer.h index 0544bf07c..337973412 100644 --- a/src/gui/widgets/dropshortcutcontainer.h +++ b/src/gui/widgets/dropshortcutcontainer.h @@ -52,28 +52,28 @@ class DropShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Handles mouse when dragged. */ - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; /** * Handles mouse when pressed. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; /** * Handles mouse release. */ - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; - void widgetHidden(const gcn::Event &event); + void widgetHidden(const gcn::Event &event) override; - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; private: bool mItemClicked; diff --git a/src/gui/widgets/emoteshortcutcontainer.h b/src/gui/widgets/emoteshortcutcontainer.h index 56a1629d7..736370a93 100644 --- a/src/gui/widgets/emoteshortcutcontainer.h +++ b/src/gui/widgets/emoteshortcutcontainer.h @@ -53,28 +53,28 @@ class EmoteShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Handles mouse when dragged. */ - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; /** * Handles mouse when pressed. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; /** * Handles mouse release. */ - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; - void widgetHidden(const gcn::Event &event); + void widgetHidden(const gcn::Event &event) override; private: std::vector mEmoteImg; diff --git a/src/gui/widgets/extendedlistbox.h b/src/gui/widgets/extendedlistbox.h index 196189674..af3ae64a9 100644 --- a/src/gui/widgets/extendedlistbox.h +++ b/src/gui/widgets/extendedlistbox.h @@ -36,9 +36,9 @@ class ExtendedListBox final : public ListBox /** * Draws the list box. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; - unsigned int getRowHeight() const + unsigned int getRowHeight() const override { return mRowHeight; } void setRowHeight(unsigned int n) diff --git a/src/gui/widgets/extendednamesmodel.h b/src/gui/widgets/extendednamesmodel.h index be59c7e20..a4b6013c2 100644 --- a/src/gui/widgets/extendednamesmodel.h +++ b/src/gui/widgets/extendednamesmodel.h @@ -34,11 +34,11 @@ class ExtendedNamesModel : public ExtendedListModel virtual ~ExtendedNamesModel(); - virtual int getNumberOfElements(); + virtual int getNumberOfElements() override; - virtual std::string getElementAt(int i); + virtual std::string getElementAt(int i) override; - virtual const Image *getImageAt(int i); + virtual const Image *getImageAt(int i) override; StringVect &getNames() { return mNames; } diff --git a/src/gui/widgets/flowcontainer.h b/src/gui/widgets/flowcontainer.h index f0d1d9638..d04dffb23 100644 --- a/src/gui/widgets/flowcontainer.h +++ b/src/gui/widgets/flowcontainer.h @@ -50,7 +50,7 @@ class FlowContainer final : public Container, * Invoked when a widget changes its size. This is used to determine * the new height of the container. */ - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; int getBoxWidth() const { return mBoxWidth; } diff --git a/src/gui/widgets/guildchattab.h b/src/gui/widgets/guildchattab.h index a8f47db25..54dd67a8d 100644 --- a/src/gui/widgets/guildchattab.h +++ b/src/gui/widgets/guildchattab.h @@ -35,21 +35,22 @@ class GuildChatTab final : public ChatTab ~GuildChatTab(); - bool handleCommand(const std::string &type, const std::string &args); + bool handleCommand(const std::string &type, + const std::string &args) override; - void showHelp(); + void showHelp() override; - void saveToLogFile(std::string &msg); + void saveToLogFile(std::string &msg) override; - int getType() const + int getType() const override { return ChatTab::TAB_GUILD; } - void playNewMessageSound(); + void playNewMessageSound() override; protected: - void handleInput(const std::string &msg); + void handleInput(const std::string &msg) override; - void getAutoCompleteList(StringVect &names) const; + void getAutoCompleteList(StringVect &names) const override; }; #endif diff --git a/src/gui/widgets/guitable.h b/src/gui/widgets/guitable.h index af6bedb62..76fdb4b54 100644 --- a/src/gui/widgets/guitable.h +++ b/src/gui/widgets/guitable.h @@ -89,7 +89,7 @@ public: void setWrappingEnabled(bool wrappingEnabled) { mWrappingEnabled = wrappingEnabled; } - gcn::Rectangle getChildrenArea(); + gcn::Rectangle getChildrenArea() override; /** * Toggle whether to use linewise selection mode, in which the table selects @@ -105,18 +105,18 @@ public: void setLinewiseSelection(bool linewise); // Inherited from Widget - virtual void draw(gcn::Graphics* graphics); + virtual void draw(gcn::Graphics* graphics) override; - virtual gcn::Widget *getWidgetAt(int x, int y); + virtual gcn::Widget *getWidgetAt(int x, int y) override; - virtual void moveToTop(gcn::Widget *child); + virtual void moveToTop(gcn::Widget *child) override; - virtual void moveToBottom(gcn::Widget *child); + virtual void moveToBottom(gcn::Widget *child) override; - virtual void _setFocusHandler(gcn::FocusHandler* focusHandler); + virtual void _setFocusHandler(gcn::FocusHandler* focusHandler) override; // Inherited from KeyListener - virtual void keyPressed(gcn::KeyEvent& keyEvent); + virtual void keyPressed(gcn::KeyEvent& keyEvent) override; /** * Sets the table to be opaque, that is sets the table @@ -137,16 +137,16 @@ public: { return mOpaque; } // Inherited from MouseListener - virtual void mousePressed(gcn::MouseEvent& mouseEvent); + virtual void mousePressed(gcn::MouseEvent& mouseEvent) override; - virtual void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent); + virtual void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent) override; - virtual void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent); + virtual void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent) override; - virtual void mouseDragged(gcn::MouseEvent& mouseEvent); + virtual void mouseDragged(gcn::MouseEvent& mouseEvent) override; // Constraints inherited from TableModelListener - virtual void modelUpdated(bool); + virtual void modelUpdated(bool) override; protected: /** Frees all action listeners on inner widgets. */ diff --git a/src/gui/widgets/horizontcontainer.h b/src/gui/widgets/horizontcontainer.h index 736d8fd98..1db5bf7a8 100644 --- a/src/gui/widgets/horizontcontainer.h +++ b/src/gui/widgets/horizontcontainer.h @@ -42,7 +42,7 @@ class HorizontContainer final : public Container, public gcn::WidgetListener virtual void clear(); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; protected: int mSpacing; diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h index 62e8ac1b1..ec9c8319f 100644 --- a/src/gui/widgets/icon.h +++ b/src/gui/widgets/icon.h @@ -59,7 +59,7 @@ class Icon final : public gcn::Widget /** * Draws the Icon. */ - void draw(gcn::Graphics *g); + void draw(gcn::Graphics *g) override; private: Image *mImage; diff --git a/src/gui/widgets/inttextfield.h b/src/gui/widgets/inttextfield.h index a820de8a3..430ae4746 100644 --- a/src/gui/widgets/inttextfield.h +++ b/src/gui/widgets/inttextfield.h @@ -65,7 +65,7 @@ class IntTextField final : public TextField /** * Responds to key presses. */ - void keyPressed(gcn::KeyEvent &event); + void keyPressed(gcn::KeyEvent &event) override; private: int mMin; /**< Minimum value */ diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 40f9a92d7..e7bf11e48 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -73,26 +73,26 @@ class ItemContainer final : public gcn::Widget, /** * Necessary for checking how full the inventory is. */ - void logic(); + void logic() override; /** * Draws the items. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; // KeyListener - void keyPressed(gcn::KeyEvent &event); - void keyReleased(gcn::KeyEvent &event); + void keyPressed(gcn::KeyEvent &event) override; + void keyReleased(gcn::KeyEvent &event) override; // MouseListener - void mousePressed(gcn::MouseEvent &event); - void mouseDragged(gcn::MouseEvent &event); - void mouseReleased(gcn::MouseEvent &event); - void mouseMoved(gcn::MouseEvent &event); - void mouseExited(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; + void mouseDragged(gcn::MouseEvent &event) override; + void mouseReleased(gcn::MouseEvent &event) override; + void mouseMoved(gcn::MouseEvent &event) override; + void mouseExited(gcn::MouseEvent &event) override; // WidgetListener - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; /** * Returns the selected item. diff --git a/src/gui/widgets/itemlinkhandler.h b/src/gui/widgets/itemlinkhandler.h index 5deb76c73..35415a010 100644 --- a/src/gui/widgets/itemlinkhandler.h +++ b/src/gui/widgets/itemlinkhandler.h @@ -34,7 +34,8 @@ class ItemLinkHandler final : public LinkHandler ~ItemLinkHandler(); - void handleLink(const std::string &link, gcn::MouseEvent *event); + void handleLink(const std::string &link, + gcn::MouseEvent *event) override; private: ItemPopup *mItemPopup; diff --git a/src/gui/widgets/itemshortcutcontainer.h b/src/gui/widgets/itemshortcutcontainer.h index 92866b10d..e7a13b45f 100644 --- a/src/gui/widgets/itemshortcutcontainer.h +++ b/src/gui/widgets/itemshortcutcontainer.h @@ -53,28 +53,28 @@ class ItemShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Handles mouse when dragged. */ - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; /** * Handles mouse when pressed. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; /** * Handles mouse release. */ - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; - void widgetHidden(const gcn::Event &event); + void widgetHidden(const gcn::Event &event) override; - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; private: bool mItemClicked; diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h index b9845ef0a..fc82fa900 100644 --- a/src/gui/widgets/label.h +++ b/src/gui/widgets/label.h @@ -47,7 +47,7 @@ class Label final : public gcn::Label /** * Draws the label. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; }; #endif diff --git a/src/gui/widgets/layouthelper.h b/src/gui/widgets/layouthelper.h index 518168a80..2285e15cd 100644 --- a/src/gui/widgets/layouthelper.h +++ b/src/gui/widgets/layouthelper.h @@ -76,7 +76,7 @@ class LayoutHelper final : public gcn::WidgetListener /** * Called whenever the managed container changes size. */ - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; private: Layout mLayout; /**< Layout handler */ diff --git a/src/gui/widgets/listbox.h b/src/gui/widgets/listbox.h index fdb6350c5..efe6da57d 100644 --- a/src/gui/widgets/listbox.h +++ b/src/gui/widgets/listbox.h @@ -47,7 +47,7 @@ class ListBox : public gcn::ListBox /** * Draws the list box. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Update the alpha value to the graphic components. @@ -56,17 +56,17 @@ class ListBox : public gcn::ListBox // Inherited from KeyListener - void keyPressed(gcn::KeyEvent& keyEvent); + void keyPressed(gcn::KeyEvent& keyEvent) override; // Inherited from MouseListener - void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent); + void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent) override; - void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent); + void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent) override; - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; void refocus(); diff --git a/src/gui/widgets/namesmodel.h b/src/gui/widgets/namesmodel.h index 1064a8875..69d9f3c56 100644 --- a/src/gui/widgets/namesmodel.h +++ b/src/gui/widgets/namesmodel.h @@ -25,6 +25,8 @@ #include +#include "localconsts.h" + class NamesModel : public gcn::ListModel { public: @@ -32,9 +34,9 @@ class NamesModel : public gcn::ListModel virtual ~NamesModel(); - virtual int getNumberOfElements(); + virtual int getNumberOfElements() override; - virtual std::string getElementAt(int i); + virtual std::string getElementAt(int i) override; StringVect &getNames() { return mNames; } diff --git a/src/gui/widgets/passwordfield.h b/src/gui/widgets/passwordfield.h index ceb88876e..0444427ee 100644 --- a/src/gui/widgets/passwordfield.h +++ b/src/gui/widgets/passwordfield.h @@ -41,7 +41,7 @@ class PasswordField final : public TextField /** * Draws the password field. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; }; #endif diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h index dbf104de0..3b3116294 100644 --- a/src/gui/widgets/playerbox.h +++ b/src/gui/widgets/playerbox.h @@ -67,12 +67,12 @@ class PlayerBox final : public gcn::ScrollArea /** * Draws the scroll area. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Draws the background and border of the scroll area. */ - void drawFrame(gcn::Graphics *graphics); + void drawFrame(gcn::Graphics *graphics) override; Being *getBeing() { return mBeing; } diff --git a/src/gui/widgets/popup.h b/src/gui/widgets/popup.h index 2442aa220..af7c8d5bd 100644 --- a/src/gui/widgets/popup.h +++ b/src/gui/widgets/popup.h @@ -73,7 +73,7 @@ class Popup : public Container, public gcn::MouseListener, /** * Draws the popup. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Sets the size of this popup. @@ -85,7 +85,7 @@ class Popup : public Container, public gcn::MouseListener, */ void setLocationRelativeTo(const gcn::Widget *const widget); - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; /** * Sets the minimum width of the popup. @@ -149,7 +149,7 @@ class Popup : public Container, public gcn::MouseListener, // Inherited from BasicContainer - virtual gcn::Rectangle getChildrenArea(); + virtual gcn::Rectangle getChildrenArea() override; /** * Sets the location to display the popup. Tries to horizontally center @@ -161,9 +161,9 @@ class Popup : public Container, public gcn::MouseListener, void hide(); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; - void widgetMoved(const gcn::Event &event); + void widgetMoved(const gcn::Event &event) override; private: std::string mPopupName; /**< Name of the popup */ diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h index 11c8069a3..e163fe66c 100644 --- a/src/gui/widgets/progressbar.h +++ b/src/gui/widgets/progressbar.h @@ -53,7 +53,7 @@ class ProgressBar final : public gcn::Widget, public gcn::WidgetListener /** * Performs progress bar logic (fading colors) */ - void logic(); + void logic() override; /** * Update the alpha value to the graphic components. @@ -63,7 +63,7 @@ class ProgressBar final : public gcn::Widget, public gcn::WidgetListener /** * Draws the progress bar. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Sets the current progress. @@ -132,9 +132,9 @@ class ProgressBar final : public gcn::Widget, public gcn::WidgetListener const gcn::Color &color, const float progress, const std::string &text = ""); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; - void widgetMoved(const gcn::Event &event); + void widgetMoved(const gcn::Event &event) override; private: float mProgress; diff --git a/src/gui/widgets/progressindicator.h b/src/gui/widgets/progressindicator.h index 4046f21d9..2db3fe8b9 100644 --- a/src/gui/widgets/progressindicator.h +++ b/src/gui/widgets/progressindicator.h @@ -34,10 +34,12 @@ class ProgressIndicator final : public gcn::Widget { public: ProgressIndicator(); + ~ProgressIndicator(); - void logic(); - void draw(gcn::Graphics *graphics); + void logic() override; + + void draw(gcn::Graphics *graphics) override; private: SimpleAnimation *mIndicator; diff --git a/src/gui/widgets/radiobutton.h b/src/gui/widgets/radiobutton.h index ae846bc77..cc0ff7734 100644 --- a/src/gui/widgets/radiobutton.h +++ b/src/gui/widgets/radiobutton.h @@ -47,25 +47,25 @@ class RadioButton final : public gcn::RadioButton /** * Draws the radiobutton, not the caption. */ - void drawBox(gcn::Graphics* graphics); + void drawBox(gcn::Graphics* graphics) override; /** * Implementation of the draw methods. * Thus, avoiding the rhomb around the radio button. */ - void draw(gcn::Graphics* graphics); + void draw(gcn::Graphics* graphics) override; /** * Called when the mouse enteres the widget area. */ - void mouseEntered(gcn::MouseEvent& event); + void mouseEntered(gcn::MouseEvent& event) override; /** * Called when the mouse leaves the widget area. */ - void mouseExited(gcn::MouseEvent& event); + void mouseExited(gcn::MouseEvent& event) override; - void keyPressed(gcn::KeyEvent& keyEvent); + void keyPressed(gcn::KeyEvent& keyEvent) override; private: static int instances; diff --git a/src/gui/widgets/radiogroup.h b/src/gui/widgets/radiogroup.h index 19e67d09d..370d46436 100644 --- a/src/gui/widgets/radiogroup.h +++ b/src/gui/widgets/radiogroup.h @@ -31,7 +31,7 @@ class RadioGroup final : public WidgetGroup RadioGroup(const std::string &group, const int height, const int spacing); - gcn::Widget *createWidget(const std::string &name); + gcn::Widget *createWidget(const std::string &name) override; }; #endif diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h index 064bfdeb0..7a1a3b076 100644 --- a/src/gui/widgets/scrollarea.h +++ b/src/gui/widgets/scrollarea.h @@ -65,7 +65,7 @@ class ScrollArea final : public gcn::ScrollArea, public gcn::WidgetListener * Logic function optionally adapts width or height of contents. This * depends on the scrollbar settings. */ - void logic(); + void logic() override; /** * Update the alpha value to the graphic components. @@ -75,12 +75,12 @@ class ScrollArea final : public gcn::ScrollArea, public gcn::WidgetListener /** * Draws the scroll area. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Draws the background and border of the scroll area. */ - void drawFrame(gcn::Graphics *graphics); + void drawFrame(gcn::Graphics *graphics) override; /** * Sets whether the widget should draw its background or not. @@ -96,25 +96,25 @@ class ScrollArea final : public gcn::ScrollArea, public gcn::WidgetListener /** * Called when the mouse moves in the widget area. */ - void mouseMoved(gcn::MouseEvent& event); + void mouseMoved(gcn::MouseEvent& event) override; /** * Called when the mouse enteres the widget area. */ - void mouseEntered(gcn::MouseEvent& event); + void mouseEntered(gcn::MouseEvent& event) override; /** * Called when the mouse leaves the widget area. */ - void mouseExited(gcn::MouseEvent& event); + void mouseExited(gcn::MouseEvent& event) override; - void mousePressed(gcn::MouseEvent& event); + void mousePressed(gcn::MouseEvent& event) override; - void mouseReleased(gcn::MouseEvent& event); + void mouseReleased(gcn::MouseEvent& event) override; - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; - void widgetMoved(const gcn::Event &event); + void widgetMoved(const gcn::Event &event) override; protected: enum BUTTON_DIR @@ -132,14 +132,14 @@ class ScrollArea final : public gcn::ScrollArea, public gcn::WidgetListener void init(std::string skinName); void drawButton(gcn::Graphics *const graphics, const BUTTON_DIR dir); - void drawUpButton(gcn::Graphics *const graphics); - void drawDownButton(gcn::Graphics *const graphics); - void drawLeftButton(gcn::Graphics *const graphics); - void drawRightButton(gcn::Graphics *const graphics); - void drawVBar(gcn::Graphics *const graphics); - void drawHBar(gcn::Graphics *const graphics); - void drawVMarker(gcn::Graphics *const graphics); - void drawHMarker(gcn::Graphics *const graphics); + void drawUpButton(gcn::Graphics *const graphics) override; + void drawDownButton(gcn::Graphics *const graphics) override; + void drawLeftButton(gcn::Graphics *const graphics) override; + void drawRightButton(gcn::Graphics *const graphics) override; + void drawVBar(gcn::Graphics *const graphics) override; + void drawHBar(gcn::Graphics *const graphics) override; + void drawVMarker(gcn::Graphics *const graphics) override; + void drawHMarker(gcn::Graphics *const graphics) override; static int instances; static float mAlpha; diff --git a/src/gui/widgets/setupitem.h b/src/gui/widgets/setupitem.h index d8affadd1..f36dc2534 100644 --- a/src/gui/widgets/setupitem.h +++ b/src/gui/widgets/setupitem.h @@ -88,7 +88,7 @@ class SetupItem : public gcn::ActionListener virtual std::string getActionEventId(); - virtual void action(const gcn::ActionEvent &event); + virtual void action(const gcn::ActionEvent &event) override; virtual void action(); @@ -145,9 +145,9 @@ class SetupItemCheckBox final : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; protected: CheckBox *mCheckBox; @@ -170,13 +170,13 @@ class SetupItemTextField final : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void apply(std::string eventName); + void apply(std::string eventName) override; protected: HorizontContainer *mHorizont; @@ -207,13 +207,13 @@ class SetupItemIntTextField final : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void apply(std::string eventName); + void apply(std::string eventName) override; protected: HorizontContainer *mHorizont; @@ -236,13 +236,13 @@ class SetupItemLabel final : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void apply(std::string eventName); + void apply(std::string eventName) override; protected: Label *mLabel; @@ -266,9 +266,9 @@ class SetupItemDropDown final : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; protected: HorizontContainer *mHorizont; @@ -299,11 +299,11 @@ class SetupItemSlider final : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void apply(std::string eventName); @@ -346,13 +346,13 @@ class SetupItemSlider2 final : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void apply(std::string eventName); + void apply(std::string eventName) override; void setInvertValue(const int v); @@ -394,13 +394,13 @@ class SetupItemSliderList : public SetupItem void createControls(); - void fromWidget(); + void fromWidget() override; - void toWidget(); + void toWidget() override; - virtual void action(const gcn::ActionEvent &event); + virtual void action(const gcn::ActionEvent &event) override; - void apply(std::string eventName); + void apply(std::string eventName) override; virtual void addMoreControls() = 0; @@ -422,9 +422,9 @@ class SetupItemSound final : public SetupItemSliderList const int width = 150, const bool onTheFly = false, const bool mainConfig = true); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void addMoreControls(); + void addMoreControls() override; protected: Button *mButton; diff --git a/src/gui/widgets/setuptabscroll.h b/src/gui/widgets/setuptabscroll.h index 77103323a..947ca2b26 100644 --- a/src/gui/widgets/setuptabscroll.h +++ b/src/gui/widgets/setuptabscroll.h @@ -46,13 +46,13 @@ class SetupTabScroll : public SetupTab VertContainer *getContainer() const { return mContainer; } - virtual void apply(); + virtual void apply() override; - virtual void cancel(); + virtual void cancel() override; - virtual void externalUpdated(); + virtual void externalUpdated() override; - virtual void action(const gcn::ActionEvent &event A_UNUSED) + virtual void action(const gcn::ActionEvent &event A_UNUSED) override { } int getPreferredFirstItemSize() diff --git a/src/gui/widgets/shopitems.h b/src/gui/widgets/shopitems.h index 978926420..840be4267 100644 --- a/src/gui/widgets/shopitems.h +++ b/src/gui/widgets/shopitems.h @@ -79,7 +79,7 @@ class ShopItems final : public gcn::ListModel /** * Returns the number of items in the shop. */ - int getNumberOfElements() + int getNumberOfElements() override { return static_cast(mShopItems.size()); } bool empty() const @@ -90,7 +90,7 @@ class ShopItems final : public gcn::ListModel * * @param i the index to retrieve */ - std::string getElementAt(int i); + std::string getElementAt(int i) override; /** * Returns the item number i in the shop. diff --git a/src/gui/widgets/shoplistbox.h b/src/gui/widgets/shoplistbox.h index ed5bfa003..906c6b3d3 100644 --- a/src/gui/widgets/shoplistbox.h +++ b/src/gui/widgets/shoplistbox.h @@ -52,12 +52,12 @@ class ShopListBox final : public ListBox /** * Draws the list box. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Returns the height of a row. */ - unsigned int getRowHeight() const + unsigned int getRowHeight() const override { return mRowHeight; } /** @@ -76,9 +76,9 @@ class ShopListBox final : public ListBox */ void setPriceCheck(const bool check); - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; - void mouseExited(gcn::MouseEvent& mouseEvent); + void mouseExited(gcn::MouseEvent& mouseEvent) override; private: void init(); diff --git a/src/gui/widgets/shortcutcontainer.h b/src/gui/widgets/shortcutcontainer.h index 6de2d1963..2551bdb17 100644 --- a/src/gui/widgets/shortcutcontainer.h +++ b/src/gui/widgets/shortcutcontainer.h @@ -55,28 +55,28 @@ class ShortcutContainer : public gcn::Widget, /** * Draws the shortcuts */ - virtual void draw(gcn::Graphics *graphics) = 0; + virtual void draw(gcn::Graphics *graphics) override = 0; /** * Invoked when a widget changes its size. This is used to determine * the new height of the container. */ - virtual void widgetResized(const gcn::Event &event); + virtual void widgetResized(const gcn::Event &event) override; /** * Handles mouse when dragged. */ - virtual void mouseDragged(gcn::MouseEvent &event) = 0; + virtual void mouseDragged(gcn::MouseEvent &event) override = 0; /** * Handles mouse when pressed. */ - virtual void mousePressed(gcn::MouseEvent &event) = 0; + virtual void mousePressed(gcn::MouseEvent &event) override = 0; /** * Handles mouse release. */ - virtual void mouseReleased(gcn::MouseEvent &event) = 0; + virtual void mouseReleased(gcn::MouseEvent &event) override = 0; int getMaxItems() const { return mMaxItems; } diff --git a/src/gui/widgets/slider.h b/src/gui/widgets/slider.h index 494039c73..3d304ad3a 100644 --- a/src/gui/widgets/slider.h +++ b/src/gui/widgets/slider.h @@ -59,7 +59,7 @@ class Slider final : public gcn::Slider /** * Draws the slider. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Draws the marker. @@ -69,14 +69,14 @@ class Slider final : public gcn::Slider /** * Called when the mouse enteres the widget area. */ - void mouseEntered(gcn::MouseEvent& event); + void mouseEntered(gcn::MouseEvent& event) override; /** * Called when the mouse leaves the widget area. */ - void mouseExited(gcn::MouseEvent& event); + void mouseExited(gcn::MouseEvent& event) override; - void keyPressed(gcn::KeyEvent& keyEvent); + void keyPressed(gcn::KeyEvent& keyEvent) override; enum SLIDER_ENUM { @@ -98,10 +98,6 @@ class Slider final : public gcn::Slider void init(); static ImageRect buttons[2]; - //*hStart, *hMid, *hEnd, *hGrip; -// static Image *vStart, *vMid, *vEnd, *vGrip; -// static Image *hStartHi, *hMidHi, *hEndHi, *hGripHi; -// static Image *vStartHi, *vMidHi, *vEndHi, *vGripHi; bool mHasMouse; static float mAlpha; static int mInstances; diff --git a/src/gui/widgets/sliderlist.h b/src/gui/widgets/sliderlist.h index 76dbc012c..f310ea27a 100644 --- a/src/gui/widgets/sliderlist.h +++ b/src/gui/widgets/sliderlist.h @@ -45,15 +45,15 @@ class SliderList final : public Container, void updateAlpha(); - void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent); + void mouseWheelMovedUp(gcn::MouseEvent& mouseEvent) override; - void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent); + void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent) override; void resize(); - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; void setSelectedString(std::string str); diff --git a/src/gui/widgets/spellshortcutcontainer.h b/src/gui/widgets/spellshortcutcontainer.h index 570b8b263..09c60624a 100644 --- a/src/gui/widgets/spellshortcutcontainer.h +++ b/src/gui/widgets/spellshortcutcontainer.h @@ -52,28 +52,28 @@ class SpellShortcutContainer final : public ShortcutContainer /** * Draws the items. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Handles mouse when dragged. */ - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; /** * Handles mouse when pressed. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; /** * Handles mouse release. */ - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; - void widgetHidden(const gcn::Event &event); + void widgetHidden(const gcn::Event &event) override; - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; private: bool mSpellClicked; diff --git a/src/gui/widgets/tab.h b/src/gui/widgets/tab.h index a8ff5eb3d..6519d5847 100644 --- a/src/gui/widgets/tab.h +++ b/src/gui/widgets/tab.h @@ -49,7 +49,7 @@ class Tab : public gcn::Tab, public gcn::WidgetListener /** * Draw the tabbed area. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Set the normal color for the tab's text. @@ -90,9 +90,9 @@ class Tab : public gcn::Tab, public gcn::WidgetListener int getFlash() const { return mFlash; } - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; - void widgetMoved(const gcn::Event &event); + void widgetMoved(const gcn::Event &event) override; void setLabelFont(gcn::Font *const font); @@ -101,6 +101,7 @@ class Tab : public gcn::Tab, public gcn::WidgetListener protected: friend class TabbedArea; + virtual void setCurrent() { } diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index a616a9935..65eb09447 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -50,7 +50,7 @@ class TabbedArea final : public gcn::TabbedArea, public gcn::WidgetListener /** * Draw the tabbed area. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Return how many tabs have been created. @@ -84,7 +84,7 @@ class TabbedArea final : public gcn::TabbedArea, public gcn::WidgetListener * @param tab The tab widget for the tab. * @param widget The widget to view when the tab is selected. */ - void addTab(gcn::Tab* tab, gcn::Widget* widget); + void addTab(gcn::Tab* tab, gcn::Widget* widget) override; /** * Add a tab. Overridden since it needs to create an instance of Tab @@ -98,25 +98,25 @@ class TabbedArea final : public gcn::TabbedArea, public gcn::WidgetListener /** * Overload the remove tab function as it's broken in guichan 0.8. */ - void removeTab(gcn::Tab *tab); + void removeTab(gcn::Tab *tab) override; void removeAll(); /** * Overload the logic function since it's broken in guichan 0.8. */ - void logic(); + void logic() override; int getContainerHeight() const { return mWidgetContainer->getHeight(); } - void setSelectedTab(gcn::Tab *tab); + void setSelectedTab(gcn::Tab *tab) override; void setSelectedTabByPos(int tab); void setSelectedTabByName(const std::string &name); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; /* void moveLeft(gcn::Tab *tab); @@ -125,11 +125,11 @@ class TabbedArea final : public gcn::TabbedArea, public gcn::WidgetListener */ void adjustTabPositions(); - void action(const gcn::ActionEvent& actionEvent); + void action(const gcn::ActionEvent& actionEvent) override; // Inherited from MouseListener - void mousePressed(gcn::MouseEvent &mouseEvent); + void mousePressed(gcn::MouseEvent &mouseEvent) override; void enableScrollButtons(const bool enable); @@ -148,7 +148,7 @@ class TabbedArea final : public gcn::TabbedArea, public gcn::WidgetListener void fixSize() { adjustSize(); } - void keyPressed(gcn::KeyEvent& keyEvent); + void keyPressed(gcn::KeyEvent& keyEvent) override; void setBlockSwitching(bool b) { mBlockSwitching = b; } diff --git a/src/gui/widgets/tablemodel.h b/src/gui/widgets/tablemodel.h index 4e3938038..6af6d2425 100644 --- a/src/gui/widgets/tablemodel.h +++ b/src/gui/widgets/tablemodel.h @@ -142,11 +142,11 @@ public: virtual int getRows() const; virtual int getColumns() const; - virtual int getRowHeight() const; + virtual int getRowHeight() const override; virtual int getWidth() const; virtual int getHeight() const; virtual int getColumnWidth(int index) const; - virtual gcn::Widget *getElementAt(int row, int column) const; + virtual gcn::Widget *getElementAt(int row, int column) const override; protected: int mRows, mColumns; diff --git a/src/gui/widgets/tabstrip.h b/src/gui/widgets/tabstrip.h index fac0fc502..efdeda657 100644 --- a/src/gui/widgets/tabstrip.h +++ b/src/gui/widgets/tabstrip.h @@ -34,9 +34,9 @@ class TabStrip final : public WidgetGroup TabStrip(const int height, const int spacing = 0); - gcn::Widget *createWidget(const std::string &name); + gcn::Widget *createWidget(const std::string &name) override; - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; }; #endif diff --git a/src/gui/widgets/textbox.h b/src/gui/widgets/textbox.h index a95fd118a..61cf6f665 100644 --- a/src/gui/widgets/textbox.h +++ b/src/gui/widgets/textbox.h @@ -57,14 +57,14 @@ class TextBox final : public gcn::TextBox /** * Draws the text. */ - inline void draw(gcn::Graphics *graphics) + inline void draw(gcn::Graphics *graphics) override { if (mTextColor) mForegroundColor = *mTextColor; gcn::TextBox::draw(graphics); } - void keyPressed(gcn::KeyEvent& keyEvent); + void keyPressed(gcn::KeyEvent& keyEvent) override; private: int mMinWidth; diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index 12a101b0e..72d679052 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -52,7 +52,7 @@ class TextField : public gcn::TextField /** * Draws the text field. */ - virtual void draw(gcn::Graphics *graphics); + virtual void draw(gcn::Graphics *graphics) override; /** * Update the alpha value to the graphic components. @@ -62,7 +62,7 @@ class TextField : public gcn::TextField /** * Draws the background and border. */ - void drawFrame(gcn::Graphics *graphics); + void drawFrame(gcn::Graphics *graphics) override; /** * Determine whether the field should be numeric or not @@ -81,7 +81,7 @@ class TextField : public gcn::TextField /** * Processes one keypress. */ - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; /** * Set the minimum value for a range diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h index e116e939b..0c127cba0 100644 --- a/src/gui/widgets/textpreview.h +++ b/src/gui/widgets/textpreview.h @@ -97,7 +97,7 @@ class TextPreview final : public gcn::Widget * * @param graphics graphics to draw into */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Set opacity for this widget (whether or not to show the background diff --git a/src/gui/widgets/tradetab.h b/src/gui/widgets/tradetab.h index a31376263..55e6550cb 100644 --- a/src/gui/widgets/tradetab.h +++ b/src/gui/widgets/tradetab.h @@ -35,13 +35,13 @@ class TradeTab final : public ChatTab ~TradeTab(); - int getType() const + int getType() const override { return ChatTab::TAB_TRADE; } - void saveToLogFile(std::string &msg); + void saveToLogFile(std::string &msg) override; protected: - void handleInput(const std::string &msg); + void handleInput(const std::string &msg) override; }; extern TradeTab *tradeChatTab; diff --git a/src/gui/widgets/vertcontainer.h b/src/gui/widgets/vertcontainer.h index 2c9087db2..e8c1da82f 100644 --- a/src/gui/widgets/vertcontainer.h +++ b/src/gui/widgets/vertcontainer.h @@ -46,7 +46,7 @@ class VertContainer final : public Container, public gcn::WidgetListener virtual void clear(); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; private: std::vector mResizableWidgets; diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h index 2a8ca1ab0..502d20efe 100644 --- a/src/gui/widgets/whispertab.h +++ b/src/gui/widgets/whispertab.h @@ -36,15 +36,15 @@ class WhisperTab final : public ChatTab const std::string &getNick() const { return mNick; } - void showHelp(); + void showHelp() override; bool handleCommand(const std::string &type, - const std::string &args); + const std::string &args) override; - int getType() const + int getType() const override { return ChatTab::TAB_WHISPER; } - void saveToLogFile(std::string &msg); + void saveToLogFile(std::string &msg) override; void setWhisperTabColors(); @@ -53,7 +53,7 @@ class WhisperTab final : public ChatTab protected: friend class ChatWindow; - void getAutoCompleteList(StringVect &names) const; + void getAutoCompleteList(StringVect &names) const override; /** * Constructor. * @@ -63,9 +63,9 @@ class WhisperTab final : public ChatTab ~WhisperTab(); - void handleInput(const std::string &msg); + void handleInput(const std::string &msg) override; - void handleCommand(const std::string &msg); + void handleCommand(const std::string &msg) override; private: std::string mNick; diff --git a/src/gui/widgets/widgetgroup.h b/src/gui/widgets/widgetgroup.h index ad2ee4e64..27d1a7357 100644 --- a/src/gui/widgets/widgetgroup.h +++ b/src/gui/widgets/widgetgroup.h @@ -38,13 +38,14 @@ class WidgetGroup : public Container, virtual void addButton(std::string text, std::string tag); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - virtual void add(gcn::Widget *const widget, const int spacing); + virtual void add(gcn::Widget *const widget, + const int spacing); virtual void clear(); - void widgetResized(const gcn::Event &event); + void widgetResized(const gcn::Event &event) override; virtual Widget *createWidget(const std::string &name) = 0; diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index fdcfc23de..7ffa1eb2d 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -74,7 +74,7 @@ class Window : public gcn::Window, private gcn::WidgetListener /** * Draws the window. */ - void draw(gcn::Graphics *graphics); + void draw(gcn::Graphics *graphics) override; /** * Sets the size of this window. @@ -108,14 +108,14 @@ class Window : public gcn::Window, private gcn::WidgetListener /** * Called whenever the widget changes size. */ - virtual void widgetResized(const gcn::Event &event); + virtual void widgetResized(const gcn::Event &event) override; - virtual void widgetMoved(const gcn::Event& event); + virtual void widgetMoved(const gcn::Event& event) override; /** * Called whenever the widget is hidden. */ - virtual void widgetHidden(const gcn::Event &event); + virtual void widgetHidden(const gcn::Event &event) override; /** * Sets whether or not the window has a close button. @@ -247,31 +247,31 @@ class Window : public gcn::Window, private gcn::WidgetListener /** * Starts window resizing when appropriate. */ - void mousePressed(gcn::MouseEvent &event); + void mousePressed(gcn::MouseEvent &event) override; /** * Implements window resizing and makes sure the window is not * dragged/resized outside of the screen. */ - void mouseDragged(gcn::MouseEvent &event); + void mouseDragged(gcn::MouseEvent &event) override; /** * Implements custom cursor image changing context, based on mouse * relative position. */ - void mouseMoved(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; /** * When the mouse button has been let go, this ensures that the mouse * custom cursor is restored back to it's standard image. */ - void mouseReleased(gcn::MouseEvent &event); + void mouseReleased(gcn::MouseEvent &event) override; /** * When the mouse leaves the window this ensures that the custom cursor * is restored back to it's standard image. */ - void mouseExited(gcn::MouseEvent &event); + void mouseExited(gcn::MouseEvent &event) override; /** * Sets the name of the window. This is not the window title. diff --git a/src/gui/widgets/windowcontainer.h b/src/gui/widgets/windowcontainer.h index a2d560cbb..e1b74be1c 100644 --- a/src/gui/widgets/windowcontainer.h +++ b/src/gui/widgets/windowcontainer.h @@ -40,7 +40,7 @@ class WindowContainer : public Container * Do GUI logic. This functions adds automatic deletion of objects that * volunteered to be deleted. */ - void logic(); + void logic() override; /** * Schedule a widget for deletion. It will be deleted at the start of diff --git a/src/gui/windowmenu.h b/src/gui/windowmenu.h index 1a2956df1..1a869c41b 100644 --- a/src/gui/windowmenu.h +++ b/src/gui/windowmenu.h @@ -55,15 +55,13 @@ class WindowMenu final : public Container, ~WindowMenu(); - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; -// void valueChanged(const gcn::SelectionEvent &event); + void mousePressed(gcn::MouseEvent &event) override; - void mousePressed(gcn::MouseEvent &event); + void mouseMoved(gcn::MouseEvent &event) override; - void mouseMoved(gcn::MouseEvent &event); - - void mouseExited(gcn::MouseEvent& mouseEvent A_UNUSED); + void mouseExited(gcn::MouseEvent& mouseEvent A_UNUSED) override; std::map &getButtonNames() { return mButtonNames; } @@ -77,7 +75,7 @@ class WindowMenu final : public Container, void saveButtons(); - void optionChanged(const std::string &name); + void optionChanged(const std::string &name) override; protected: void drawChildren(gcn::Graphics* graphics); diff --git a/src/gui/worldselectdialog.h b/src/gui/worldselectdialog.h index 30500d311..ba1a41056 100644 --- a/src/gui/worldselectdialog.h +++ b/src/gui/worldselectdialog.h @@ -66,9 +66,9 @@ class WorldSelectDialog final : public Window, public gcn::ActionListener, /** * Called when receiving actions from the widgets. */ - void action(const gcn::ActionEvent &event); + void action(const gcn::ActionEvent &event) override; - void keyPressed(gcn::KeyEvent &keyEvent); + void keyPressed(gcn::KeyEvent &keyEvent) override; private: WorldListModel *mWorldListModel; -- cgit v1.2.3-70-g09d2