ManaPlus
|
#include <serverslistmodel.h>
Public Types | |
typedef std::pair< int, std::string > | VersionString |
Public Member Functions | |
ServersListModel (ServerInfos *const servers, ServerDialog *const parent) | |
int | getNumberOfElements () |
std::string | getElementAt (int elementIndex) |
const ServerInfo & | getServer (const int elementIndex) const |
void | setVersionString (const int index, const std::string &version) |
Public Member Functions inherited from ListModel | |
ListModel () | |
virtual | ~ListModel () |
Private Types | |
typedef std::vector< VersionString > | VersionStrings |
Private Attributes | |
ServerInfos * | mServers |
VersionStrings | mVersionStrings |
ServerDialog * | mParent |
Server and Port List Model
Definition at line 40 of file serverslistmodel.h.
typedef std::pair<int, std::string> ServersListModel::VersionString |
Definition at line 43 of file serverslistmodel.h.
|
private |
Definition at line 113 of file serverslistmodel.h.
|
inline |
Definition at line 45 of file serverslistmodel.h.
|
inlinevirtual |
Used to get an element from the list
Implements ListModel.
Definition at line 68 of file serverslistmodel.h.
References _, ServerInfo::freeType, ServerInfo::hostname, ServerDialog::lock(), mParent, mServers, ServerFreeType::NonFree, and ServerFreeType::Unknown.
Referenced by ServersListBox::draw().
|
inlinevirtual |
Used to get number of line in the list
Implements ListModel.
Definition at line 59 of file serverslistmodel.h.
References CAST_S32, ServerDialog::lock(), mParent, and mServers.
Referenced by ServersListBox::draw().
|
inline |
Used to get the corresponding Server struct
Definition at line 93 of file serverslistmodel.h.
References mServers.
Referenced by ServersListBox::draw().
|
inline |
Definition at line 96 of file serverslistmodel.h.
References CAST_S32, Gui::getFont(), Font::getWidth(), gui, and mVersionStrings.
Referenced by ServerDialog::loadServers().
|
private |
Definition at line 117 of file serverslistmodel.h.
Referenced by getElementAt(), and getNumberOfElements().
|
private |
Definition at line 115 of file serverslistmodel.h.
Referenced by getElementAt(), getNumberOfElements(), and getServer().
|
private |
Definition at line 116 of file serverslistmodel.h.
Referenced by setVersionString().