From 5c53d50e9da718690e3f8d055ecd3bf10a866267 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Feb 2014 23:06:48 +0300 Subject: Move ignorechoiceslistmodel into gui/models directory. --- src/gui/widgets/tabs/setup_relations.cpp | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'src/gui/widgets/tabs/setup_relations.cpp') 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(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"); -- cgit v1.2.3-70-g09d2