diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-22 23:06:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-22 23:06:48 +0300 |
commit | 5c53d50e9da718690e3f8d055ecd3bf10a866267 (patch) | |
tree | 21b38383f4f70ce53bf53c62bb65383aecf44d54 /src/gui/widgets | |
parent | 95982ba8c3767f93fc9b8627de3fa5adde26f126 (diff) | |
download | mv-5c53d50e9da718690e3f8d055ecd3bf10a866267.tar.gz mv-5c53d50e9da718690e3f8d055ecd3bf10a866267.tar.bz2 mv-5c53d50e9da718690e3f8d055ecd3bf10a866267.tar.xz mv-5c53d50e9da718690e3f8d055ecd3bf10a866267.zip |
Move ignorechoiceslistmodel into gui/models directory.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/tabs/setup_relations.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/gui/widgets/tabs/setup_relations.cpp b/src/gui/widgets/tabs/setup_relations.cpp index 8fa377e3d..1f85a23b4 100644 --- a/src/gui/widgets/tabs/setup_relations.cpp +++ b/src/gui/widgets/tabs/setup_relations.cpp @@ -26,6 +26,7 @@ #include "being/localplayer.h" +#include "gui/models/ignorechoiceslistmodel.h" #include "gui/models/playerrelationlistmodel.h" #include "gui/widgets/button.h" @@ -178,31 +179,6 @@ protected: PlayerRelationListModel *mListModel; }; -/** - * Class for choosing one of the various `what to do when ignoring a player' options - */ -class IgnoreChoicesListModel final : public ListModel -{ -public: - ~IgnoreChoicesListModel() - { } - - int getNumberOfElements() override final - { - return static_cast<int>(player_relations.getPlayerIgnoreStrategies() - ->size()); - } - - std::string getElementAt(int i) override final - { - if (i >= getNumberOfElements() || i < 0) - return "???"; - - return (*player_relations.getPlayerIgnoreStrategies()) - [i]->mDescription; - } -}; - static const std::string ACTION_DELETE("delete"); static const std::string ACTION_TABLE("table"); static const std::string ACTION_STRATEGY("strategy"); |