summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-23 13:55:55 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-23 13:55:55 +0300
commit2bdfb00921306fd3d0370e15fd1fe7f08b1f67f7 (patch)
treef9cfd55ebd9a37625c20f8a3d7ff3df852614488 /src/gui/windows
parent8b21a7d29c64f57b38fe8e54a36299ded552da8b (diff)
downloadmanaplus-2bdfb00921306fd3d0370e15fd1fe7f08b1f67f7.tar.gz
manaplus-2bdfb00921306fd3d0370e15fd1fe7f08b1f67f7.tar.bz2
manaplus-2bdfb00921306fd3d0370e15fd1fe7f08b1f67f7.tar.xz
manaplus-2bdfb00921306fd3d0370e15fd1fe7f08b1f67f7.zip
Move beingslistmodel into gui/models directory.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/socialwindow.cpp57
1 files changed, 12 insertions, 45 deletions
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 5fb479510..f33534a85 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -33,6 +33,8 @@
#include "input/keyboardconfig.h"
+#include "gui/models/beingslistmodel.h"
+
#include "gui/windows/confirmdialog.h"
#include "gui/windows/okdialog.h"
#include "gui/windows/setupwindow.h"
@@ -503,41 +505,6 @@ private:
Party *mParty;
};
-class BeingsListModal final : public AvatarListModel
-{
-public:
- BeingsListModal() :
- AvatarListModel(),
- mMembers()
- {
- }
-
- A_DELETE_COPY(BeingsListModal)
-
- ~BeingsListModal()
- {
- delete_all(mMembers);
- mMembers.clear();
- }
-
- std::vector<Avatar*> *getMembers()
- {
- return &mMembers;
- }
-
- Avatar *getAvatarAt(int index) override final
- {
- return mMembers[index];
- }
-
- int getNumberOfElements() override final
- {
- return static_cast<int>(mMembers.size());
- }
-
- std::vector<Avatar*> mMembers;
-};
-
class SocialPlayersTab final : public SocialTab
{
public:
@@ -545,7 +512,7 @@ public:
std::string name,
const bool showBackground) :
SocialTab(widget),
- mBeings(new BeingsListModal)
+ mBeings(new BeingsListModel)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
@@ -701,7 +668,7 @@ public:
}
private:
- BeingsListModal *mBeings;
+ BeingsListModel *mBeings;
};
@@ -711,7 +678,7 @@ public:
SocialNavigationTab(const Widget2 *const widget,
const bool showBackground) :
SocialTab(widget),
- mBeings(new BeingsListModal)
+ mBeings(new BeingsListModel)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
@@ -978,7 +945,7 @@ public:
}
private:
- BeingsListModal *mBeings;
+ BeingsListModel *mBeings;
};
@@ -1040,7 +1007,7 @@ public:
SocialAttackTab(const Widget2 *const widget,
const bool showBackground) :
SocialTab(widget),
- mBeings(new BeingsListModal)
+ mBeings(new BeingsListModel)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
@@ -1078,7 +1045,7 @@ public:
}
private:
- BeingsListModal *mBeings;
+ BeingsListModel *mBeings;
};
class SocialPickupTab final : public SocialTab
@@ -1087,7 +1054,7 @@ public:
SocialPickupTab(const Widget2 *const widget,
const bool showBackground) :
SocialTab(widget),
- mBeings(new BeingsListModal)
+ mBeings(new BeingsListModel)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
@@ -1123,7 +1090,7 @@ public:
}
private:
- BeingsListModal *mBeings;
+ BeingsListModel *mBeings;
};
@@ -1134,7 +1101,7 @@ public:
std::string name,
const bool showBackground) :
SocialTab(widget),
- mBeings(new BeingsListModal)
+ mBeings(new BeingsListModel)
{
mList = new AvatarListBox(this, mBeings);
mList->postInit();
@@ -1214,7 +1181,7 @@ public:
}
private:
- BeingsListModal *mBeings;
+ BeingsListModel *mBeings;
};