summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/setup_relations.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-22 23:06:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-22 23:06:48 +0300
commit5c53d50e9da718690e3f8d055ecd3bf10a866267 (patch)
tree21b38383f4f70ce53bf53c62bb65383aecf44d54 /src/gui/widgets/tabs/setup_relations.cpp
parent95982ba8c3767f93fc9b8627de3fa5adde26f126 (diff)
downloadManaVerse-5c53d50e9da718690e3f8d055ecd3bf10a866267.tar.gz
ManaVerse-5c53d50e9da718690e3f8d055ecd3bf10a866267.tar.bz2
ManaVerse-5c53d50e9da718690e3f8d055ecd3bf10a866267.tar.xz
ManaVerse-5c53d50e9da718690e3f8d055ecd3bf10a866267.zip
Move ignorechoiceslistmodel into gui/models directory.
Diffstat (limited to 'src/gui/widgets/tabs/setup_relations.cpp')
-rw-r--r--src/gui/widgets/tabs/setup_relations.cpp26
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");