ManaPlus
Public Member Functions
UpdateTypeModel Class Reference

#include <updatetypemodel.h>

Inheritance diagram for UpdateTypeModel:
ListModel

Public Member Functions

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

Detailed Description

Definition at line 40 of file updatetypemodel.h.

Constructor & Destructor Documentation

◆ UpdateTypeModel()

UpdateTypeModel::UpdateTypeModel ( )
inline

Definition at line 43 of file updatetypemodel.h.

44  { }

Member Function Documentation

◆ getElementAt()

std::string UpdateTypeModel::getElementAt ( int  i)
inlinevirtual

Gets an element at a certain index in the list.

Parameters
iAn index in the list.
Returns
An element as a string at the a certain index.

Implements ListModel.

Definition at line 53 of file updatetypemodel.h.

54  {
55  if (i >= getNumberOfElements() || i < 0)
56  return "???";
57  return gettext(UPDATE_TYPE_TEXT[i]);
58  }
const char * UPDATE_TYPE_TEXT[3]

References getNumberOfElements(), and UPDATE_TYPE_TEXT.

◆ getNumberOfElements()

int UpdateTypeModel::getNumberOfElements ( )
inlinevirtual

Gets the number of elements in the list.

Returns
The number of elements in the list

Implements ListModel.

Definition at line 48 of file updatetypemodel.h.

49  {
50  return 3;
51  }

Referenced by getElementAt().


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