summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-24 12:15:03 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-24 12:15:03 +0300
commit67a349cefcb72c7770b98bf645a7eca35695bb2b (patch)
tree07dbd166893ef783e56e361ed5be7559fef7a2a4 /src/gui/widgets/tabs
parent7d57a3aaa1fec1f28fa8c65e6e5ca56b97871cc2 (diff)
downloadmv-67a349cefcb72c7770b98bf645a7eca35695bb2b.tar.gz
mv-67a349cefcb72c7770b98bf645a7eca35695bb2b.tar.bz2
mv-67a349cefcb72c7770b98bf645a7eca35695bb2b.tar.xz
mv-67a349cefcb72c7770b98bf645a7eca35695bb2b.zip
add final keyword to widgets files.
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r--src/gui/widgets/tabs/battletab.h4
-rw-r--r--src/gui/widgets/tabs/chattab.h2
-rw-r--r--src/gui/widgets/tabs/gmtab.h10
-rw-r--r--src/gui/widgets/tabs/guildchattab.h12
-rw-r--r--src/gui/widgets/tabs/langtab.h4
-rw-r--r--src/gui/widgets/tabs/setup_audio.h2
-rw-r--r--src/gui/widgets/tabs/setup_chat.h4
-rw-r--r--src/gui/widgets/tabs/setup_colors.h8
-rw-r--r--src/gui/widgets/tabs/setup_input.cpp4
-rw-r--r--src/gui/widgets/tabs/setup_input.h6
-rw-r--r--src/gui/widgets/tabs/setup_joystick.h6
-rw-r--r--src/gui/widgets/tabs/setup_other.h4
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp18
-rw-r--r--src/gui/widgets/tabs/setup_relations.h8
-rw-r--r--src/gui/widgets/tabs/setup_theme.cpp10
-rw-r--r--src/gui/widgets/tabs/setup_theme.h6
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp6
-rw-r--r--src/gui/widgets/tabs/setup_video.h6
-rw-r--r--src/gui/widgets/tabs/setup_visual.h2
-rw-r--r--src/gui/widgets/tabs/setuptabscroll.h7
-rw-r--r--src/gui/widgets/tabs/tab.h10
-rw-r--r--src/gui/widgets/tabs/tradetab.h6
-rw-r--r--src/gui/widgets/tabs/whispertab.h14
23 files changed, 80 insertions, 79 deletions
diff --git a/src/gui/widgets/tabs/battletab.h b/src/gui/widgets/tabs/battletab.h
index 1624094aa..54f7f2b30 100644
--- a/src/gui/widgets/tabs/battletab.h
+++ b/src/gui/widgets/tabs/battletab.h
@@ -37,10 +37,10 @@ class BattleTab final : public ChatTab
~BattleTab();
- int getType() const override A_WARN_UNUSED
+ int getType() const override final A_WARN_UNUSED
{ return ChatTab::TAB_BATTLE; }
- void saveToLogFile(const std::string &msg) const override;
+ void saveToLogFile(const std::string &msg) const override final;
};
extern BattleTab *battleChatTab;
diff --git a/src/gui/widgets/tabs/chattab.h b/src/gui/widgets/tabs/chattab.h
index 91dee8148..b9f0dff10 100644
--- a/src/gui/widgets/tabs/chattab.h
+++ b/src/gui/widgets/tabs/chattab.h
@@ -183,7 +183,7 @@ class ChatTab : public Tab
friend class ChatWindow;
friend class WhisperWindow;
- virtual void setCurrent() override
+ virtual void setCurrent() override final
{ setFlash(0); }
virtual void handleInput(const std::string &msg);
diff --git a/src/gui/widgets/tabs/gmtab.h b/src/gui/widgets/tabs/gmtab.h
index 85f6cad89..b3fd601d6 100644
--- a/src/gui/widgets/tabs/gmtab.h
+++ b/src/gui/widgets/tabs/gmtab.h
@@ -35,17 +35,17 @@ class GmTab final : public ChatTab
~GmTab();
- int getType() const override A_WARN_UNUSED
+ int getType() const override final A_WARN_UNUSED
{ return ChatTab::TAB_GM; }
- void saveToLogFile(const std::string &msg) const override;
+ void saveToLogFile(const std::string &msg) const override final;
protected:
- void getAutoCompleteList(StringVect &names) const override;
+ void getAutoCompleteList(StringVect &names) const override final;
- void handleInput(const std::string &msg) override;
+ void handleInput(const std::string &msg) override final;
- void handleCommand(const std::string &msg) override;
+ void handleCommand(const std::string &msg) override final;
};
extern GmTab *gmChatTab;
diff --git a/src/gui/widgets/tabs/guildchattab.h b/src/gui/widgets/tabs/guildchattab.h
index 9739f5958..469a10936 100644
--- a/src/gui/widgets/tabs/guildchattab.h
+++ b/src/gui/widgets/tabs/guildchattab.h
@@ -38,23 +38,23 @@ class GuildChatTab final : public ChatTab, public ConfigListener
~GuildChatTab();
bool handleCommand(const std::string &type,
- const std::string &args) override;
+ const std::string &args) override final;
void showHelp() override;
- void saveToLogFile(const std::string &msg) const override;
+ void saveToLogFile(const std::string &msg) const override final;
int getType() const override A_WARN_UNUSED
{ return ChatTab::TAB_GUILD; }
- void playNewMessageSound() const override;
+ void playNewMessageSound() const override final;
- void optionChanged(const std::string &value) override;
+ void optionChanged(const std::string &value) override final;
protected:
- void handleInput(const std::string &msg) override;
+ void handleInput(const std::string &msg) override final;
- void getAutoCompleteList(StringVect &names) const override;
+ void getAutoCompleteList(StringVect &names) const override final;
};
#endif // GUI_WIDGETS_TABS_GUILDCHATTAB_H
diff --git a/src/gui/widgets/tabs/langtab.h b/src/gui/widgets/tabs/langtab.h
index 8f2d0dfed..bef59792f 100644
--- a/src/gui/widgets/tabs/langtab.h
+++ b/src/gui/widgets/tabs/langtab.h
@@ -32,10 +32,10 @@ class LangTab final : public ChatTab
~LangTab();
- int getType() const override A_WARN_UNUSED
+ int getType() const override final A_WARN_UNUSED
{ return ChatTab::TAB_LANG; }
- void saveToLogFile(const std::string &msg) const override;
+ void saveToLogFile(const std::string &msg) const override final;
};
extern LangTab *langChatTab;
diff --git a/src/gui/widgets/tabs/setup_audio.h b/src/gui/widgets/tabs/setup_audio.h
index 1054f250b..ef8ab04f7 100644
--- a/src/gui/widgets/tabs/setup_audio.h
+++ b/src/gui/widgets/tabs/setup_audio.h
@@ -34,7 +34,7 @@ class Setup_Audio final : public SetupTabScroll
~Setup_Audio();
- void apply() override;
+ void apply() override final;
private:
gcn::ListModel *mSoundModel;
diff --git a/src/gui/widgets/tabs/setup_chat.h b/src/gui/widgets/tabs/setup_chat.h
index aa151e6f0..2a465673f 100644
--- a/src/gui/widgets/tabs/setup_chat.h
+++ b/src/gui/widgets/tabs/setup_chat.h
@@ -32,9 +32,9 @@ class Setup_Chat final : public SetupTabScroll
A_DELETE_COPY(Setup_Chat)
- void apply() override;
+ void apply() override final;
- void externalUpdated() override;
+ void externalUpdated() override final;
};
#endif // GUI_WIDGETS_TABS_SETUP_CHAT_H
diff --git a/src/gui/widgets/tabs/setup_colors.h b/src/gui/widgets/tabs/setup_colors.h
index 347c43cab..ba8dfa03e 100644
--- a/src/gui/widgets/tabs/setup_colors.h
+++ b/src/gui/widgets/tabs/setup_colors.h
@@ -46,13 +46,13 @@ class Setup_Colors final : public SetupTab,
~Setup_Colors();
- void apply() override;
+ void apply() override final;
- void cancel() override;
+ void cancel() override final;
- void action(const gcn::ActionEvent &event) override;
+ void action(const gcn::ActionEvent &event) override final;
- void valueChanged(const gcn::SelectionEvent &event) override;
+ void valueChanged(const gcn::SelectionEvent &event) override final;
private:
static const char *const rawmsg;
diff --git a/src/gui/widgets/tabs/setup_input.cpp b/src/gui/widgets/tabs/setup_input.cpp
index 3d4203244..9df05582f 100644
--- a/src/gui/widgets/tabs/setup_input.cpp
+++ b/src/gui/widgets/tabs/setup_input.cpp
@@ -64,13 +64,13 @@ class KeyListModel final : public gcn::ListModel
/**
* Returns the number of elements in container.
*/
- int getNumberOfElements() override
+ int getNumberOfElements() override final
{ return mSize; }
/**
* Returns element from container.
*/
- std::string getElementAt(int i) override
+ std::string getElementAt(int i) override final
{ return setupActionData[selectedData][i].text; }
/**
diff --git a/src/gui/widgets/tabs/setup_input.h b/src/gui/widgets/tabs/setup_input.h
index 72ea08f31..9ed9d3d47 100644
--- a/src/gui/widgets/tabs/setup_input.h
+++ b/src/gui/widgets/tabs/setup_input.h
@@ -51,11 +51,11 @@ class Setup_Input final : public SetupTab
*/
~Setup_Input();
- void apply() override;
+ void apply() override final;
- void cancel() override;
+ void cancel() override final;
- void action(const gcn::ActionEvent &event) override;
+ void action(const gcn::ActionEvent &event) override final;
/**
* Get an update on the assigned key.
diff --git a/src/gui/widgets/tabs/setup_joystick.h b/src/gui/widgets/tabs/setup_joystick.h
index 4254dac81..a9109e0f6 100644
--- a/src/gui/widgets/tabs/setup_joystick.h
+++ b/src/gui/widgets/tabs/setup_joystick.h
@@ -40,11 +40,11 @@ class Setup_Joystick final : public SetupTab
~Setup_Joystick();
- void apply() override;
+ void apply() override final;
- void cancel() override;
+ void cancel() override final;
- void action(const gcn::ActionEvent &event) override;
+ void action(const gcn::ActionEvent &event) override final;
void setTempEnabled(const bool sel);
diff --git a/src/gui/widgets/tabs/setup_other.h b/src/gui/widgets/tabs/setup_other.h
index e914dca37..a3801b21d 100644
--- a/src/gui/widgets/tabs/setup_other.h
+++ b/src/gui/widgets/tabs/setup_other.h
@@ -36,9 +36,9 @@ class Setup_Other final : public SetupTabScroll
~Setup_Other();
- void apply() override;
+ void apply() override final;
- void externalUpdated() override;
+ void externalUpdated() override final;
protected:
NamesModel *mProxyTypeList;
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp
index c837f1cf7..c06ec6c49 100644
--- a/src/gui/widgets/tabs/setup_relations.cpp
+++ b/src/gui/widgets/tabs/setup_relations.cpp
@@ -84,12 +84,12 @@ public:
~PlayerRelationListModel()
{ }
- int getNumberOfElements() override
+ int getNumberOfElements() override final
{
return PlayerRelation::RELATIONS_NR;
}
- std::string getElementAt(int i) override
+ std::string getElementAt(int i) override final
{
if (i >= getNumberOfElements() || i < 0)
return "";
@@ -121,7 +121,7 @@ public:
mPlayers = nullptr;
}
- int getRows() const override
+ int getRows() const override final
{
if (mPlayers)
return static_cast<int>(mPlayers->size());
@@ -129,17 +129,17 @@ public:
return 0;
}
- int getColumns() const override
+ int getColumns() const override final
{
return COLUMNS_NR;
}
- int getRowHeight() const override
+ int getRowHeight() const override final
{
return ROW_HEIGHT;
}
- int getColumnWidth(const int index) const override
+ int getColumnWidth(const int index) const override final
{
if (index == NAME_COLUMN)
return NAME_COLUMN_WIDTH;
@@ -186,7 +186,7 @@ public:
}
- gcn::Widget *getElementAt(int row, int column) const override
+ gcn::Widget *getElementAt(int row, int column) const override final
{
return mWidgets[WIDGET_AT(row, column)];
}
@@ -222,13 +222,13 @@ public:
~IgnoreChoicesListModel()
{ }
- int getNumberOfElements() override
+ int getNumberOfElements() override final
{
return static_cast<int>(player_relations.getPlayerIgnoreStrategies()
->size());
}
- std::string getElementAt(int i) override
+ std::string getElementAt(int i) override final
{
if (i >= getNumberOfElements() || i < 0)
return "???";
diff --git a/src/gui/widgets/tabs/setup_relations.h b/src/gui/widgets/tabs/setup_relations.h
index b5c99934a..092c9bb5d 100644
--- a/src/gui/widgets/tabs/setup_relations.h
+++ b/src/gui/widgets/tabs/setup_relations.h
@@ -50,19 +50,19 @@ public:
~Setup_Relations();
- void apply() override;
+ void apply() override final;
- void cancel() override;
+ void cancel() override final;
void reset();
- void action(const gcn::ActionEvent &event) override;
+ void action(const gcn::ActionEvent &event) override final;
void updatedPlayer(const std::string &name);
void updateAll();
- void externalUpdated() override;
+ void externalUpdated() override final;
private:
StaticTableModel *mPlayerTableTitleModel;
diff --git a/src/gui/widgets/tabs/setup_theme.cpp b/src/gui/widgets/tabs/setup_theme.cpp
index 109666bb1..65bb059bc 100644
--- a/src/gui/widgets/tabs/setup_theme.cpp
+++ b/src/gui/widgets/tabs/setup_theme.cpp
@@ -118,10 +118,10 @@ public:
~FontSizeChoiceListModel()
{ }
- int getNumberOfElements() override A_WARN_UNUSED
+ int getNumberOfElements() override final A_WARN_UNUSED
{ return maxFontSizes; }
- std::string getElementAt(int i) override A_WARN_UNUSED
+ std::string getElementAt(int i) override final A_WARN_UNUSED
{
if (i >= getNumberOfElements() || i < 0)
return "???";
@@ -202,10 +202,10 @@ public:
}
}
- int getNumberOfElements() override A_WARN_UNUSED
+ int getNumberOfElements() override final A_WARN_UNUSED
{ return langs_count; }
- std::string getElementAt(int i) override A_WARN_UNUSED
+ std::string getElementAt(int i) override final A_WARN_UNUSED
{
if (i >= getNumberOfElements() || i < 0)
return "???";
@@ -213,7 +213,7 @@ public:
return gettext(LANG_NAME[i].name.c_str());
}
- const Image *getImageAt(int i) override A_WARN_UNUSED
+ const Image *getImageAt(int i) override final A_WARN_UNUSED
{
if (i >= getNumberOfElements() || i < 0)
return nullptr;
diff --git a/src/gui/widgets/tabs/setup_theme.h b/src/gui/widgets/tabs/setup_theme.h
index e6cf63d17..41c49e18c 100644
--- a/src/gui/widgets/tabs/setup_theme.h
+++ b/src/gui/widgets/tabs/setup_theme.h
@@ -42,11 +42,11 @@ class Setup_Theme final : public SetupTab
~Setup_Theme();
- void apply() override;
+ void apply() override final;
- void cancel() override;
+ void cancel() override final;
- void action(const gcn::ActionEvent &event) override;
+ void action(const gcn::ActionEvent &event) override final;
void updateInfo();
diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp
index 7ce063746..2eb0e4ef0 100644
--- a/src/gui/widgets/tabs/setup_video.cpp
+++ b/src/gui/widgets/tabs/setup_video.cpp
@@ -67,7 +67,7 @@ class ModeListModel final : public gcn::ListModel
/**
* Returns the number of elements in container.
*/
- int getNumberOfElements() override
+ int getNumberOfElements() override final
{ return static_cast<int>(mVideoModes.size()); }
/**
@@ -161,10 +161,10 @@ public:
~OpenGLListModel()
{ }
- int getNumberOfElements() override
+ int getNumberOfElements() override final
{ return renderModesListSize; }
- std::string getElementAt(int i) override
+ std::string getElementAt(int i) override final
{
if (i >= getNumberOfElements() || i < 0)
return "???";
diff --git a/src/gui/widgets/tabs/setup_video.h b/src/gui/widgets/tabs/setup_video.h
index f98b1478b..9421017ca 100644
--- a/src/gui/widgets/tabs/setup_video.h
+++ b/src/gui/widgets/tabs/setup_video.h
@@ -46,11 +46,11 @@ class Setup_Video final : public SetupTab, public gcn::KeyListener
~Setup_Video();
- void apply() override;
+ void apply() override final;
- void cancel() override;
+ void cancel() override final;
- void action(const gcn::ActionEvent &event) override;
+ void action(const gcn::ActionEvent &event) override final;
private:
bool mFullScreenEnabled;
diff --git a/src/gui/widgets/tabs/setup_visual.h b/src/gui/widgets/tabs/setup_visual.h
index 92c8147ef..371657956 100644
--- a/src/gui/widgets/tabs/setup_visual.h
+++ b/src/gui/widgets/tabs/setup_visual.h
@@ -35,7 +35,7 @@ class Setup_Visual final : public SetupTabScroll
~Setup_Visual();
- void apply() override;
+ void apply() override final;
private:
NamesModel *mSpeachList;
diff --git a/src/gui/widgets/tabs/setuptabscroll.h b/src/gui/widgets/tabs/setuptabscroll.h
index 16ded3ab3..3d77b716d 100644
--- a/src/gui/widgets/tabs/setuptabscroll.h
+++ b/src/gui/widgets/tabs/setuptabscroll.h
@@ -50,17 +50,18 @@ class SetupTabScroll : public SetupTab
virtual void apply() override;
- virtual void cancel() override;
+ virtual void cancel() override final;
virtual void externalUpdated() override;
- virtual void action(const gcn::ActionEvent &event A_UNUSED) override
+ virtual void action(const gcn::ActionEvent &event A_UNUSED)
+ override final
{ }
int getPreferredFirstItemSize() A_WARN_UNUSED
{ return mPreferredFirstItemSize; }
- void widgetResized(const gcn::Event &event) override;
+ void widgetResized(const gcn::Event &event) override final;
void reread(const std::string &name);
diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h
index 1c5f349e4..0dd5478ce 100644
--- a/src/gui/widgets/tabs/tab.h
+++ b/src/gui/widgets/tabs/tab.h
@@ -68,7 +68,7 @@ class Tab : public gcn::BasicContainer,
/**
* Draw the tabbed area.
*/
- void draw(gcn::Graphics *graphics) override;
+ void draw(gcn::Graphics *graphics) override final;
/**
* Set the normal color for the tab's text.
@@ -129,9 +129,9 @@ class Tab : public gcn::BasicContainer,
int getFlash() const A_WARN_UNUSED
{ return mFlash; }
- void widgetResized(const gcn::Event &event) override;
+ void widgetResized(const gcn::Event &event) override final;
- void widgetMoved(const gcn::Event &event) override;
+ void widgetMoved(const gcn::Event &event) override final;
void setLabelFont(gcn::Font *const font);
@@ -148,9 +148,9 @@ class Tab : public gcn::BasicContainer,
const std::string &getCaption() const A_WARN_UNUSED;
- void mouseEntered(gcn::MouseEvent &mouseEvent) override;
+ void mouseEntered(gcn::MouseEvent &mouseEvent) override final;
- void mouseExited(gcn::MouseEvent &mouseEvent) override;
+ void mouseExited(gcn::MouseEvent &mouseEvent) override final;
void setImage(Image *const image);
diff --git a/src/gui/widgets/tabs/tradetab.h b/src/gui/widgets/tabs/tradetab.h
index d868c5a26..c0670adc4 100644
--- a/src/gui/widgets/tabs/tradetab.h
+++ b/src/gui/widgets/tabs/tradetab.h
@@ -37,13 +37,13 @@ class TradeTab final : public ChatTab
~TradeTab();
- int getType() const override A_WARN_UNUSED
+ int getType() const override final A_WARN_UNUSED
{ return ChatTab::TAB_TRADE; }
- void saveToLogFile(const std::string &msg) const override;
+ void saveToLogFile(const std::string &msg) const override final;
protected:
- void handleInput(const std::string &msg) override;
+ void handleInput(const std::string &msg) override final;
};
extern TradeTab *tradeChatTab;
diff --git a/src/gui/widgets/tabs/whispertab.h b/src/gui/widgets/tabs/whispertab.h
index d6d8b2a47..db7233525 100644
--- a/src/gui/widgets/tabs/whispertab.h
+++ b/src/gui/widgets/tabs/whispertab.h
@@ -36,15 +36,15 @@ class WhisperTab final : public ChatTab
const std::string &getNick() const A_WARN_UNUSED
{ return mNick; }
- void showHelp() override;
+ void showHelp() override final;
bool handleCommand(const std::string &type,
- const std::string &args) override;
+ const std::string &args) override final;
- int getType() const override A_WARN_UNUSED
+ int getType() const override final A_WARN_UNUSED
{ return ChatTab::TAB_WHISPER; }
- void saveToLogFile(const std::string &msg) const override;
+ void saveToLogFile(const std::string &msg) const override final;
void setWhisperTabColors();
@@ -53,7 +53,7 @@ class WhisperTab final : public ChatTab
protected:
friend class ChatWindow;
- void getAutoCompleteList(StringVect &names) const override;
+ void getAutoCompleteList(StringVect &names) const override final;
/**
* Constructor.
*
@@ -63,9 +63,9 @@ class WhisperTab final : public ChatTab
~WhisperTab();
- void handleInput(const std::string &msg) override;
+ void handleInput(const std::string &msg) override final;
- void handleCommand(const std::string &msg) override;
+ void handleCommand(const std::string &msg) override final;
private:
std::string mNick;