A read-only wrapper for a source model. More...
#include <Wt/WReadOnlyProxyModel>

Public Member Functions | |
| WReadOnlyProxyModel (WObject *parent=0) | |
| Constructor. | |
| virtual WModelIndex | mapFromSource (const WModelIndex &sourceIndex) const |
| Maps a source model index to the proxy model. | |
| virtual WModelIndex | mapToSource (const WModelIndex &proxyIndex) const |
| Maps a proxy model index to the source model. | |
| virtual int | columnCount (const WModelIndex &parent=WModelIndex()) const |
| Returns the number of columns. | |
| virtual int | rowCount (const WModelIndex &parent=WModelIndex()) const |
| Returns the number of rows. | |
| 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. | |
| virtual bool | setData (const WModelIndex &index, const boost::any &value, int role=EditRole) |
Always returns false and has no effect. | |
| virtual bool | setItemData (const WModelIndex &index, const DataMap &values) |
Always returns false and has no effect. | |
| virtual bool | setHeaderData (int section, Orientation orientation, const boost::any &value, int role=EditRole) |
Always returns false and has no effect. | |
| virtual bool | insertColumns (int column, int count, const WModelIndex &parent) |
Always returns false and has no effect. | |
| virtual bool | removeColumns (int column, int count, const WModelIndex &parent) |
Always returns false and has no effect. | |
| virtual void | dropEvent (const WDropEvent &e, DropAction action, int row, int column, const WModelIndex &parent) |
| Has no effect. | |
A read-only wrapper for a source model.
This is a simple proxy model which provides a read-only view on a source model. This is convenient for situations where you want to share a common read-only source model between different sessions.
| int Wt::WReadOnlyProxyModel::columnCount | ( | const WModelIndex & | parent = WModelIndex() | ) | const [virtual] |
Returns the number of columns.
This returns the column count of the source model.
Implements Wt::WAbstractItemModel.
| void Wt::WReadOnlyProxyModel::dropEvent | ( | const WDropEvent & | e, |
| DropAction | action, | ||
| int | row, | ||
| int | column, | ||
| const WModelIndex & | parent | ||
| ) | [virtual] |
Has no effect.
Reimplemented from Wt::WAbstractProxyModel.
| WModelIndex Wt::WReadOnlyProxyModel::index | ( | int | row, |
| int | column, | ||
| const WModelIndex & | parent = WModelIndex() |
||
| ) | const [virtual] |
Returns the child index for the given row and column.
Returns the index in the source model.
Implements Wt::WAbstractItemModel.
| bool Wt::WReadOnlyProxyModel::insertColumns | ( | int | column, |
| int | count, | ||
| const WModelIndex & | parent | ||
| ) | [virtual] |
Always returns false and has no effect.
Reimplemented from Wt::WAbstractProxyModel.
| WModelIndex Wt::WReadOnlyProxyModel::mapFromSource | ( | const WModelIndex & | sourceIndex | ) | const [virtual] |
Maps a source model index to the proxy model.
Returns the sourceIndex unmodified.
Implements Wt::WAbstractProxyModel.
| WModelIndex Wt::WReadOnlyProxyModel::mapToSource | ( | const WModelIndex & | proxyIndex | ) | const [virtual] |
Maps a proxy model index to the source model.
Returns the proxyIndex unmodified.
Implements Wt::WAbstractProxyModel.
| WModelIndex Wt::WReadOnlyProxyModel::parent | ( | const WModelIndex & | index | ) | const [virtual] |
Returns the parent for a model index.
Returns the parent of the given index in the source model.
Implements Wt::WAbstractItemModel.
| bool Wt::WReadOnlyProxyModel::removeColumns | ( | int | column, |
| int | count, | ||
| const WModelIndex & | parent | ||
| ) | [virtual] |
Always returns false and has no effect.
Reimplemented from Wt::WAbstractProxyModel.
| int Wt::WReadOnlyProxyModel::rowCount | ( | const WModelIndex & | parent = WModelIndex() | ) | const [virtual] |
Returns the number of rows.
This returns the row count of the source model.
Implements Wt::WAbstractItemModel.
| bool Wt::WReadOnlyProxyModel::setData | ( | const WModelIndex & | index, |
| const boost::any & | value, | ||
| int | role = EditRole |
||
| ) | [virtual] |
Always returns false and has no effect.
Reimplemented from Wt::WAbstractProxyModel.
| bool Wt::WReadOnlyProxyModel::setHeaderData | ( | int | section, |
| Orientation | orientation, | ||
| const boost::any & | value, | ||
| int | role = EditRole |
||
| ) | [virtual] |
Always returns false and has no effect.
Reimplemented from Wt::WAbstractItemModel.
| bool Wt::WReadOnlyProxyModel::setItemData | ( | const WModelIndex & | index, |
| const DataMap & | values | ||
| ) | [virtual] |
Always returns false and has no effect.
Reimplemented from Wt::WAbstractProxyModel.
1.7.6.1