ManaPlus
Public Member Functions
TypeListModel Class Reference

#include <typelistmodel.h>

Inheritance diagram for TypeListModel:
ListModel

Public Member Functions

 TypeListModel ()
 
int getNumberOfElements ()
 
std::string getElementAt (int elementIndex)
 
- Public Member Functions inherited from ListModel
 ListModel ()
 
virtual ~ListModel ()
 

Detailed Description

Server Type List Model

Definition at line 31 of file typelistmodel.h.

Constructor & Destructor Documentation

◆ TypeListModel()

TypeListModel::TypeListModel ( )
inline

Definition at line 34 of file typelistmodel.h.

34  :
35  ListModel()
36  { }
ListModel()
Definition: listmodel.h:82

Member Function Documentation

◆ getElementAt()

std::string TypeListModel::getElementAt ( int  elementIndex)
inlinevirtual

Used to get an element from the list

Implements ListModel.

Definition at line 53 of file typelistmodel.h.

55  {
56 #ifdef TMWA_SUPPORT
57  if (elementIndex == 0)
58  return "TmwAthena";
59  else if (elementIndex == 1)
60  return "Hercules";
61  else if (elementIndex == 2)
62  return "Evol2";
63  else
64 #else // TMWA_SUPPORT
65  if (elementIndex == 0)
66  return "Hercules";
67  else if (elementIndex == 1)
68  return "Evol2";
69  else
70 #endif // TMWA_SUPPORT
71  return "Unknown";
72  }

◆ getNumberOfElements()

int TypeListModel::getNumberOfElements ( )
inlinevirtual

Used to get number of line in the list

Implements ListModel.

Definition at line 43 of file typelistmodel.h.

45  { return 3; }

The documentation for this class was generated from the following file: