ManaPlus
|
#include <tablemodel.h>
Public Member Functions | |
virtual | ~TableModel () |
virtual int | getRows () const =0 |
virtual int | getColumns () const =0 |
virtual int | getRowHeight () const =0 |
virtual int | getColumnWidth (const int index) const =0 |
virtual Widget * | getElementAt (const int row, const int column) const =0 |
virtual void | installListener (TableModelListener *const listener) |
virtual void | removeListener (TableModelListener *const listener) |
Protected Member Functions | |
TableModel () | |
virtual void | signalBeforeUpdate () |
virtual void | signalAfterUpdate () |
Private Attributes | |
std::set< TableModelListener * > | listeners |
A model for a regular table of widgets.
Definition at line 40 of file tablemodel.h.
|
inlinevirtual |
Definition at line 45 of file tablemodel.h.
|
inlineprotected |
Definition at line 80 of file tablemodel.h.
|
pure virtual |
Determines the number of columns in each row
Implemented in PlayerTableModel, and StaticTableModel.
Referenced by GuiTable::draw(), GuiTable::getColumnForX(), GuiTable::installActionListeners(), GuiTable::keyPressed(), GuiTable::recomputeDimensions(), GuiTable::safeDraw(), GuiTable::setFocusHandler(), and GuiTable::setSelectedColumn().
|
pure virtual |
Determines the width of each individual column
Implemented in PlayerTableModel, and StaticTableModel.
Referenced by GuiTable::getColumnWidth().
|
pure virtual |
Retrieves the widget stored at the specified location within the table.
Implemented in PlayerTableModel, and StaticTableModel.
Referenced by GuiTable::draw(), GuiTable::getWidgetAt(), GuiTable::installActionListeners(), GuiTable::safeDraw(), and GuiTable::setFocusHandler().
|
pure virtual |
Determines the height for each row
Implemented in PlayerTableModel, and StaticTableModel.
Referenced by GuiTable::getRowHeight().
|
pure virtual |
Determines the number of rows (lines) in the table
Implemented in StaticTableModel, and PlayerTableModel.
Referenced by GuiTable::draw(), GuiTable::getRowForY(), GuiTable::installActionListeners(), GuiTable::keyPressed(), GuiTable::recomputeDimensions(), GuiTable::safeDraw(), GuiTable::setFocusHandler(), and GuiTable::setSelectedRow().
|
virtual |
Definition at line 34 of file tablemodel.cpp.
References anonymous_namespace{itemlinkhandler.cpp}::listener, and listeners.
Referenced by GuiTable::setModel().
|
virtual |
Definition at line 40 of file tablemodel.cpp.
References anonymous_namespace{itemlinkhandler.cpp}::listener, and listeners.
Referenced by GuiTable::setModel().
|
protectedvirtual |
Tells all listeners that the table has seen an update
Definition at line 55 of file tablemodel.cpp.
References listeners.
Referenced by PlayerTableModel::playerRelationsUpdated(), and StaticTableModel::set().
|
protectedvirtual |
Tells all listeners that the table is about to see an update
Definition at line 46 of file tablemodel.cpp.
References listeners.
Referenced by PlayerTableModel::playerRelationsUpdated(), and StaticTableModel::set().
|
private |
Definition at line 96 of file tablemodel.h.
Referenced by installListener(), removeListener(), signalAfterUpdate(), and signalBeforeUpdate().