Mana
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
StaticTableModel Class Reference

#include <tablemodel.h>

Inheritance diagram for StaticTableModel:
TableModel

Public Member Functions

 StaticTableModel (int width, int height)
 
 ~StaticTableModel () override
 
virtual void set (int row, int column, gcn::Widget *widget)
 Inserts a widget into the table model.
 
virtual void fixColumnWidth (int column, int width)
 Fixes the column width for a given column; this overrides dynamic width inference.
 
virtual void fixRowHeight (int height)
 Fixes the row height; this overrides dynamic height inference.
 
virtual void resize ()
 Resizes the table model.
 
int getRows () const override
 Determines the number of rows (lines) in the table.
 
int getColumns () const override
 Determines the number of columns in each row.
 
int getRowHeight () const override
 Determines the height for each row.
 
virtual int getWidth () const
 
virtual int getHeight () const
 
int getColumnWidth (int index) const override
 Determines the width of each individual column.
 
gcn::Widget * getElementAt (int row, int column) const override
 Retrieves the widget stored at the specified location within the table.
 
- Public Member Functions inherited from TableModel
virtual ~TableModel ()
 
void installListener (TableModelListener *listener)
 
void removeListener (TableModelListener *listener)
 

Protected Attributes

int mRows
 
int mColumns
 
int mHeight
 
std::vector< gcn::Widget * > mTableModel
 
std::vector< intmWidths
 

Additional Inherited Members

- Protected Member Functions inherited from TableModel
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.
 

Detailed Description

Definition at line 98 of file tablemodel.h.

Constructor & Destructor Documentation

◆ StaticTableModel()

StaticTableModel::StaticTableModel ( int  width,
int  height 
)

Definition at line 54 of file tablemodel.cpp.

◆ ~StaticTableModel()

StaticTableModel::~StaticTableModel ( )
override

Definition at line 63 of file tablemodel.cpp.

Member Function Documentation

◆ fixColumnWidth()

void StaticTableModel::fixColumnWidth ( int  column,
int  width 
)
virtual

Fixes the column width for a given column; this overrides dynamic width inference.

Semantics are undefined for width 0.

Definition at line 105 of file tablemodel.cpp.

◆ fixRowHeight()

void StaticTableModel::fixRowHeight ( int  height)
virtual

Fixes the row height; this overrides dynamic height inference.

Semantics are undefined for width 0.

Definition at line 114 of file tablemodel.cpp.

◆ getColumns()

int StaticTableModel::getColumns ( ) const
overridevirtual

Determines the number of columns in each row.

Implements TableModel.

Definition at line 140 of file tablemodel.cpp.

◆ getColumnWidth()

int StaticTableModel::getColumnWidth ( int  index) const
overridevirtual

Determines the width of each individual column.

Implements TableModel.

Definition at line 127 of file tablemodel.cpp.

◆ getElementAt()

gcn::Widget * StaticTableModel::getElementAt ( int  row,
int  column 
) const
overridevirtual

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

Implements TableModel.

Definition at line 100 of file tablemodel.cpp.

◆ getHeight()

int StaticTableModel::getHeight ( ) const
virtual

Definition at line 157 of file tablemodel.cpp.

◆ getRowHeight()

int StaticTableModel::getRowHeight ( ) const
overridevirtual

Determines the height for each row.

Implements TableModel.

Definition at line 122 of file tablemodel.cpp.

◆ getRows()

int StaticTableModel::getRows ( ) const
overridevirtual

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

Implements TableModel.

Definition at line 135 of file tablemodel.cpp.

◆ getWidth()

int StaticTableModel::getWidth ( ) const
virtual

Definition at line 145 of file tablemodel.cpp.

◆ resize()

void StaticTableModel::resize ( )
virtual

Resizes the table model.

Definition at line 68 of file tablemodel.cpp.

◆ set()

void StaticTableModel::set ( int  row,
int  column,
gcn::Widget *  widget 
)
virtual

Inserts a widget into the table model.

The model is resized to accomodate the widget's width and height, unless column width / row height have been fixed.

Definition at line 75 of file tablemodel.cpp.

Member Data Documentation

◆ mColumns

int StaticTableModel::mColumns
protected

Definition at line 140 of file tablemodel.h.

◆ mHeight

int StaticTableModel::mHeight
protected

Definition at line 141 of file tablemodel.h.

◆ mRows

int StaticTableModel::mRows
protected

Definition at line 140 of file tablemodel.h.

◆ mTableModel

std::vector<gcn::Widget *> StaticTableModel::mTableModel
protected

Definition at line 142 of file tablemodel.h.

◆ mWidths

std::vector<int> StaticTableModel::mWidths
protected

Definition at line 143 of file tablemodel.h.


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