Wt  3.3.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
Wt::WIdentityProxyModel Class Reference

A proxy model that proxies its source model unmodified. More...

#include <Wt/WIdentityProxyModel>

Inheritance diagram for Wt::WIdentityProxyModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WIdentityProxyModel (WObject *parent=0)
 Constructor.
int columnCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of columns.
int rowCount (const WModelIndex &parent=WModelIndex()) const
 Returns the number of rows.
WModelIndex parent (const WModelIndex &child) const
 Returns the parent for a model index.
WModelIndex index (int row, int column, const WModelIndex &parent=WModelIndex()) const
 Returns the child index for the given row and column.
WModelIndex mapFromSource (const WModelIndex &sourceIndex) const
 Maps a proxy model index to the source model.
WModelIndex mapToSource (const WModelIndex &proxyIndex) const
 Maps a source model index to the proxy model.
void setSourceModel (WAbstractItemModel *sourceModel)
 Sets the source model.
bool insertColumns (int column, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more columns.
bool insertRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Inserts one or more rows.
bool removeColumns (int column, int count, const WModelIndex &parent=WModelIndex())
 Removes columns.
bool removeRows (int row, int count, const WModelIndex &parent=WModelIndex())
 Removes rows.
bool setHeaderData (int section, Orientation orientation, const boost::any &value, int role=EditRole)
 Set header data for a column or row.

Detailed Description

A proxy model that proxies its source model unmodified.

A WIdentityProxyModel simply forwards the structure of the source model, without any transformation. WIdentityProxyModel can be used as a base class for implementing proxy models that reimplement data(), but retain all other characteristics of the source model.


Member Function Documentation

int Wt::WIdentityProxyModel::columnCount ( const WModelIndex parent = WModelIndex()) const [virtual]

Returns the number of columns.

Translates the parent index to the source model, and returns the number of columns of the source model.

Implements Wt::WAbstractItemModel.

WModelIndex Wt::WIdentityProxyModel::index ( int  row,
int  column,
const WModelIndex parent = WModelIndex() 
) const [virtual]

Returns the child index for the given row and column.

Implements Wt::WAbstractItemModel.

bool Wt::WIdentityProxyModel::insertColumns ( int  column,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]

Inserts one or more columns.

Inserts count columns at column column in the source model.

Forwards the result indicating success from the source model.

Reimplemented from Wt::WAbstractProxyModel.

bool Wt::WIdentityProxyModel::insertRows ( int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]

Inserts one or more rows.

Inserts count rows at row row in the source model.

Forwards the result indicating success from the source model.

Reimplemented from Wt::WAbstractItemModel.

WModelIndex Wt::WIdentityProxyModel::mapFromSource ( const WModelIndex sourceIndex) const [virtual]

Maps a proxy model index to the source model.

Returns a model index with the same row and column as the source index. The parent index is mapped recursively.

Implements Wt::WAbstractProxyModel.

WModelIndex Wt::WIdentityProxyModel::mapToSource ( const WModelIndex proxyIndex) const [virtual]

Maps a source model index to the proxy model.

Returns a model index with the same row and column as the proxy index. The parent index is mapped recursively.

Implements Wt::WAbstractProxyModel.

WModelIndex Wt::WIdentityProxyModel::parent ( const WModelIndex child) const [virtual]

Returns the parent for a model index.

Translates the child index to the source model, and translates its parent back to this proxy model.

Implements Wt::WAbstractItemModel.

bool Wt::WIdentityProxyModel::removeColumns ( int  column,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]

Removes columns.

Removes count columns at column column in the source model.

Forwards the result indicating success from the source model.

Reimplemented from Wt::WAbstractProxyModel.

bool Wt::WIdentityProxyModel::removeRows ( int  row,
int  count,
const WModelIndex parent = WModelIndex() 
) [virtual]

Removes rows.

Removes count rows at row row in the source model.

Forwards the result indicating success from the source model.

Reimplemented from Wt::WAbstractItemModel.

int Wt::WIdentityProxyModel::rowCount ( const WModelIndex parent = WModelIndex()) const [virtual]

Returns the number of rows.

Translates the parent index to the source model, and returns the number of rows of the source model.

Implements Wt::WAbstractItemModel.

bool Wt::WIdentityProxyModel::setHeaderData ( int  section,
Orientation  orientation,
const boost::any &  value,
int  role = EditRole 
) [virtual]

Set header data for a column or row.

Sets the header data for a column or row in the source model.

Forwards the result indicating success from the source model.

Reimplemented from Wt::WAbstractItemModel.

Sets the source model.

The source model provides the actual data for the proxy model.

Ownership of the source model is not transferred.

All signals of the source model are forwarded to the proxy model.

Reimplemented from Wt::WAbstractProxyModel.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Tue Mar 22 2016 for the C++ Web Toolkit (Wt) by doxygen 1.7.6.1