ManaPlus
Public Member Functions
SortListModelBuy Class Reference

#include <sortlistmodelbuy.h>

Inheritance diagram for SortListModelBuy:
ListModel

Public Member Functions

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

Detailed Description

Definition at line 49 of file sortlistmodelbuy.h.

Constructor & Destructor Documentation

◆ SortListModelBuy()

SortListModelBuy::SortListModelBuy ( )
inline

Definition at line 52 of file sortlistmodelbuy.h.

52  :
53  ListModel()
54  { }
ListModel()
Definition: listmodel.h:82

Member Function Documentation

◆ getElementAt()

std::string SortListModelBuy::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 61 of file sortlistmodelbuy.h.

62  {
63  if (i >= getNumberOfElements() || i < 0)
64  return "???";
65  return gettext(SORT_NAME_BUY[i]);
66  }
static const char *const SORT_NAME_BUY[7]

References getNumberOfElements(), and SORT_NAME_BUY.

◆ getNumberOfElements()

int SortListModelBuy::getNumberOfElements ( )
inlinevirtual

Gets the number of elements in the list.

Returns
The number of elements in the list

Implements ListModel.

Definition at line 58 of file sortlistmodelbuy.h.

59  { return 7; }

Referenced by getElementAt().


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