ManaPlus
Public Member Functions
FontSizeChoiceListModel Class Reference

#include <fontsizechoicelistmodel.h>

Inheritance diagram for FontSizeChoiceListModel:
ListModel

Public Member Functions

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

Detailed Description

Definition at line 69 of file fontsizechoicelistmodel.h.

Constructor & Destructor Documentation

◆ FontSizeChoiceListModel()

FontSizeChoiceListModel::FontSizeChoiceListModel ( )
inline

Definition at line 72 of file fontsizechoicelistmodel.h.

72  :
73  ListModel()
74  { }
ListModel()
Definition: listmodel.h:82

Member Function Documentation

◆ getElementAt()

std::string FontSizeChoiceListModel::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 81 of file fontsizechoicelistmodel.h.

82  {
83  if (i >= getNumberOfElements() || i < 0)
84  return "???";
85 
86  return gettext(SIZE_NAME[i]);
87  }
const char * SIZE_NAME[maxFontSizes]

References getNumberOfElements(), and SIZE_NAME.

◆ getNumberOfElements()

int FontSizeChoiceListModel::getNumberOfElements ( )
inlinevirtual

Gets the number of elements in the list.

Returns
The number of elements in the list

Implements ListModel.

Definition at line 78 of file fontsizechoicelistmodel.h.

79  { return maxFontSizes; }
const int maxFontSizes

References maxFontSizes.

Referenced by getElementAt().


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