summaryrefslogtreecommitdiff
path: root/src/guild.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/guild.h')
-rw-r--r--src/guild.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/guild.h b/src/guild.h
index fc60ae0a..11ba6e14 100644
--- a/src/guild.h
+++ b/src/guild.h
@@ -22,7 +22,9 @@
#ifndef GUILD_H
#define GUILD_H
-#include <guichan/listmodel.hpp>
+#include "avatar.h"
+
+#include "gui/widgets/avatarlistbox.h"
#include <map>
#include <string>
@@ -30,7 +32,7 @@
class Guild;
-class GuildMember
+class GuildMember : public Avatar
{
public:
GuildMember(int guildId, int id, const std::string &name);
@@ -43,26 +45,16 @@ public:
void setID(int id) { mId = id; }
- std::string getName() const { return mName; }
-
- void setName(std::string name) { mName = name; }
-
Guild *getGuild() const { return mGuild; }
- bool getOnline() const { return mOnline; }
-
- void setOnline(bool online) { mOnline = online; }
-
protected:
friend class Guild;
- std::string mName;
int mId;
Guild *mGuild;
- bool mOnline;
};
-class Guild : public gcn::ListModel
+class Guild : public AvatarListModel
{
public:
@@ -136,11 +128,7 @@ public:
return mMembers.size();
}
- /**
- * Get member at \a index.
- * @return Returns the name of member.
- */
- std::string getElementAt(int index);
+ Avatar *getAvatarAt(int i);
/**
* Get whether user can invite users to this guild.
@@ -159,6 +147,8 @@ public:
bool isMember(const std::string &name) const;
+ void getNames(std::vector<std::string> &names) const;
+
static Guild *getGuild(int id);
private: