ManaPlus
Public Member Functions | Private Attributes

#include <keylistmodel.h>

Inheritance diagram for KeyListModel:
ListModel

Public Member Functions

 KeyListModel ()
 
int getNumberOfElements ()
 
std::string getElementAt (int i)
 
void setElementAt (const int i, const std::string &caption)
 
void setSize (const int size)
 
void setDataNum (const int num)
 
void setSelectedData (const int i)
 
int getSelectedData () const
 
- Public Member Functions inherited from ListModel
 ListModel ()
 
virtual ~ListModel ()
 

Private Attributes

int mDataNum
 
int mSelectedData
 
int mSize
 

Detailed Description

The list model for key function list.

Definition at line 41 of file keylistmodel.h.

Constructor & Destructor Documentation

◆ KeyListModel()

KeyListModel::KeyListModel ( )
inline

Definition at line 44 of file keylistmodel.h.

44  :
45  mDataNum(0),
46  mSelectedData(0),
47  mSize(0)
48  {
49  }

Member Function Documentation

◆ getElementAt()

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

Returns element from container.

Implements ListModel.

Definition at line 62 of file keylistmodel.h.

63  { return setupActionData[mSelectedData][i].text; }
SetupActionData *const setupActionData[]
std::string text

References mSelectedData, setupActionData, and SetupActionData::text.

◆ getNumberOfElements()

int KeyListModel::getNumberOfElements ( )
inlinevirtual

Returns the number of elements in container.

Implements ListModel.

Definition at line 56 of file keylistmodel.h.

57  { return mSize; }

References mSize.

◆ getSelectedData()

int KeyListModel::getSelectedData ( ) const
inline

◆ setDataNum()

void KeyListModel::setDataNum ( const int  num)
inline

Definition at line 74 of file keylistmodel.h.

75  { mDataNum = num; }

References mDataNum.

◆ setElementAt()

void KeyListModel::setElementAt ( const int  i,
const std::string &  caption 
)
inline

Sets element from container.

Definition at line 68 of file keylistmodel.h.

69  { setupActionData[mSelectedData][i].text = caption; }

References mSelectedData, setupActionData, and SetupActionData::text.

Referenced by Setup_Input::action(), and Setup_Input::refreshAssignedKey().

◆ setSelectedData()

void KeyListModel::setSelectedData ( const int  i)
inline

Definition at line 77 of file keylistmodel.h.

78  { mSelectedData = i; }

References mSelectedData.

Referenced by Setup_Input::action(), and Setup_Input::Setup_Input().

◆ setSize()

void KeyListModel::setSize ( const int  size)
inline

Definition at line 71 of file keylistmodel.h.

72  { mSize = size; }
int size()
Definition: emotedb.cpp:306

References mSize, and EmoteDB::size().

Referenced by Setup_Input::action(), and Setup_Input::Setup_Input().

Field Documentation

◆ mDataNum

int KeyListModel::mDataNum
private

Definition at line 84 of file keylistmodel.h.

Referenced by setDataNum().

◆ mSelectedData

int KeyListModel::mSelectedData
private

Definition at line 85 of file keylistmodel.h.

Referenced by getElementAt(), getSelectedData(), setElementAt(), and setSelectedData().

◆ mSize

int KeyListModel::mSize
private

Definition at line 86 of file keylistmodel.h.

Referenced by getNumberOfElements(), and setSize().


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