#include <Wt/WAbstractTableModel>
Public Member Functions | |
WAbstractTableModel (WObject *parent=0) | |
Creates a new abstract list model. | |
~WAbstractTableModel () | |
Destructor. | |
virtual WModelIndex | parent (const WModelIndex &index) const |
Returns the parent for a model index. | |
virtual WModelIndex | index (int row, int column, const WModelIndex &parent=WModelIndex()) const |
Returns the child index for the given row and column. |
An abstract table model specializes WAbstractItemModel for two-dimensional tables (but no hierarchical models).
It cannot be used directly but must be subclassed. Subclassed models must at least reimplement columnCount(), rowCount() and data().
WModelIndex Wt::WAbstractTableModel::parent | ( | const WModelIndex & | index | ) | const [virtual] |
Returns the parent for a model index.
An implementation should use createIndex() to create a model index that corresponds to the parent of a given index.
Implements Wt::WAbstractItemModel.
WModelIndex Wt::WAbstractTableModel::index | ( | int | row, | |
int | column, | |||
const WModelIndex & | parent = WModelIndex() | |||
) | const [virtual] |
Returns the child index for the given row and column.
When implementing this method, you can use createIndex() to create an index that corresponds to the item at row
and column
within parent
.
If the location is invalid (out of bounds at the parent), then an invalid index must be returned.
Implements Wt::WAbstractItemModel.