![]() |
ManaPlus
|
#include <playertablemodel.h>
Public Member Functions | |
| PlayerTableModel (const Widget2 *const widget) | |
| ~PlayerTableModel () | |
| int | getRows () const |
| int | getColumns () const A_CONST |
| int | getRowHeight () const A_CONST |
| int | getColumnWidth (const int index) const A_CONST |
| void | playerRelationsUpdated () |
| void | updateModelInRow (const int row) const |
| Widget * | getElementAt (int row, int column) const |
| void | freeWidgets () |
| std::string | getPlayerAt (const int index) const |
Public Member Functions inherited from Widget2 | |
| virtual | ~Widget2 () |
| const Color & | getThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE |
| const Color & | getThemeCharColor (const signed char c, bool &valid) const A_INLINE |
| virtual void | setWidget2 (const Widget2 *const widget) |
| void | setPalette (int palette) |
| void | checkPalette () |
| void | setForegroundColor2 (const Color &color) |
| Widget * | getWindow () const |
| virtual void | setWindow (Widget *const window) |
Public Member Functions inherited from TableModel | |
| virtual | ~TableModel () |
| virtual void | installListener (TableModelListener *const listener) |
| virtual void | removeListener (TableModelListener *const listener) |
Protected Attributes | |
| StringVect * | mPlayers |
| std::vector< Widget * > | mWidgets |
| PlayerRelationListModel * | mListModel |
Protected Attributes inherited from Widget2 | |
| int | mPaletteOffset |
| Widget * | mWindow |
| Color | mForegroundColor2 |
Additional Inherited Members | |
Protected Member Functions inherited from Widget2 | |
| Widget2 (const Widget2 *const widget) | |
Protected Member Functions inherited from TableModel | |
| TableModel () | |
| virtual void | signalBeforeUpdate () |
| virtual void | signalAfterUpdate () |
Definition at line 35 of file playertablemodel.h.
|
explicit |
Definition at line 51 of file playertablemodel.cpp.
References playerRelationsUpdated().
| PlayerTableModel::~PlayerTableModel | ( | ) |
Definition at line 61 of file playertablemodel.cpp.
References delete2, freeWidgets(), mListModel, and mPlayers.
| void PlayerTableModel::freeWidgets | ( | ) |
Definition at line 139 of file playertablemodel.cpp.
References delete2, delete_all(), mPlayers, and mWidgets.
Referenced by playerRelationsUpdated(), and ~PlayerTableModel().
|
virtual |
Determines the number of columns in each row
Implements TableModel.
Definition at line 75 of file playertablemodel.cpp.
References COLUMNS_NR.
|
virtual |
Determines the width of each individual column
Implements TableModel.
Definition at line 85 of file playertablemodel.cpp.
References NAME_COLUMN, NAME_COLUMN_WIDTH, and RELATION_CHOICE_COLUMN_WIDTH.
|
virtual |
Retrieves the widget stored at the specified location within the table.
Implements TableModel.
Definition at line 134 of file playertablemodel.cpp.
References mWidgets, and WIDGET_AT.
Referenced by updateModelInRow().
| std::string PlayerTableModel::getPlayerAt | ( | const int | index | ) | const |
Definition at line 146 of file playertablemodel.cpp.
References CAST_S32, and mPlayers.
Referenced by Setup_Relations::action(), and updateModelInRow().
|
virtual |
Determines the height for each row
Implements TableModel.
Definition at line 80 of file playertablemodel.cpp.
References ROW_HEIGHT.
|
virtual |
Determines the number of rows (lines) in the table
Implements TableModel.
Definition at line 68 of file playertablemodel.cpp.
| void PlayerTableModel::playerRelationsUpdated | ( | ) |
Definition at line 92 of file playertablemodel.cpp.
References CAST_S32, CAST_U32, freeWidgets(), PlayerRelationsManager::getPlayers(), PlayerRelationsManager::getRelation(), mListModel, Modal_false, mPlayers, mWidgets, playerRelations, DropDown::setSelected(), TableModel::signalAfterUpdate(), and TableModel::signalBeforeUpdate().
Referenced by PlayerTableModel(), and Setup_Relations::updatedPlayer().
| void PlayerTableModel::updateModelInRow | ( | const int | row | ) | const |
Definition at line 123 of file playertablemodel.cpp.
References getElementAt(), getPlayerAt(), DropDown::getSelected(), playerRelations, RELATION_CHOICE_COLUMN, and PlayerRelationsManager::setRelation().
Referenced by Setup_Relations::action().
|
protected |
Definition at line 66 of file playertablemodel.h.
Referenced by playerRelationsUpdated(), and ~PlayerTableModel().
|
protected |
Definition at line 64 of file playertablemodel.h.
Referenced by freeWidgets(), getPlayerAt(), getRows(), playerRelationsUpdated(), and ~PlayerTableModel().
|
protected |
Definition at line 65 of file playertablemodel.h.
Referenced by freeWidgets(), getElementAt(), and playerRelationsUpdated().