Mana
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
TableModel Class Referenceabstract

A model for a regular table of widgets. More...

#include <tablemodel.h>

Inheritance diagram for TableModel:
PlayerTableModel StaticTableModel

Public Member Functions

virtual ~TableModel ()
 
virtual int getRows () const =0
 Determines the number of rows (lines) in the table.
 
virtual int getColumns () const =0
 Determines the number of columns in each row.
 
virtual int getRowHeight () const =0
 Determines the height for each row.
 
virtual int getColumnWidth (int index) const =0
 Determines the width of each individual column.
 
virtual gcn::Widget * getElementAt (int row, int column) const =0
 Retrieves the widget stored at the specified location within the table.
 
void installListener (TableModelListener *listener)
 
void removeListener (TableModelListener *listener)
 

Protected Member Functions

void signalBeforeUpdate ()
 Tells all listeners that the table is about to see an update.
 
void signalAfterUpdate ()
 Tells all listeners that the table has seen an update.
 

Private Attributes

std::set< TableModelListener * > listeners
 

Detailed Description

A model for a regular table of widgets.

Definition at line 49 of file tablemodel.h.

Constructor & Destructor Documentation

◆ ~TableModel()

virtual TableModel::~TableModel ( )
inlinevirtual

Definition at line 52 of file tablemodel.h.

Member Function Documentation

◆ getColumns()

virtual int TableModel::getColumns ( ) const
pure virtual

Determines the number of columns in each row.

Implemented in PlayerTableModel, and StaticTableModel.

◆ getColumnWidth()

virtual int TableModel::getColumnWidth ( int  index) const
pure virtual

Determines the width of each individual column.

Implemented in PlayerTableModel, and StaticTableModel.

◆ getElementAt()

virtual gcn::Widget * TableModel::getElementAt ( int  row,
int  column 
) const
pure virtual

Retrieves the widget stored at the specified location within the table.

Implemented in PlayerTableModel, and StaticTableModel.

◆ getRowHeight()

virtual int TableModel::getRowHeight ( ) const
pure virtual

Determines the height for each row.

Implemented in PlayerTableModel, and StaticTableModel.

◆ getRows()

virtual int TableModel::getRows ( ) const
pure virtual

Determines the number of rows (lines) in the table.

Implemented in PlayerTableModel, and StaticTableModel.

◆ installListener()

void TableModel::installListener ( TableModelListener listener)

Definition at line 28 of file tablemodel.cpp.

◆ removeListener()

void TableModel::removeListener ( TableModelListener listener)

Definition at line 33 of file tablemodel.cpp.

◆ signalAfterUpdate()

void TableModel::signalAfterUpdate ( )
protected

Tells all listeners that the table has seen an update.

Definition at line 44 of file tablemodel.cpp.

◆ signalBeforeUpdate()

void TableModel::signalBeforeUpdate ( )
protected

Tells all listeners that the table is about to see an update.

Definition at line 38 of file tablemodel.cpp.

Member Data Documentation

◆ listeners

std::set<TableModelListener *> TableModel::listeners
private

Definition at line 94 of file tablemodel.h.


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