|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QMappingProxyModel Class Reference
[QtGui module]

The QMappingProxyModel class provides support for mapping data passed between another model and a view. More...

    #include <QMappingProxyModel>

Inherits QAbstractProxyModel.

Inherited by QFilteringProxyModel and QSortingProxyModel.

This class was introduced in Qt 4.1.

- List of all members, including inherited members

### Public Functions

- QMappingProxyModel ( QObject * parent = 0 )
- ~QMappingProxyModel ()
- virtual void clear ()

- 2 public functions inherited from QAbstractProxyModel
- 32 public functions inherited from QAbstractItemModel
- 28 public functions inherited from QObject

### Protected Functions

- void insertMapping ( const QModelIndex & proxy_index, const QModelIndex & source_index )
- bool isMapped ( const QModelIndex & proxy_index ) const
- QModelIndex proxyIndex ( const QModelIndex & source_index ) const
- void removeMapping ( const QModelIndex & proxy_index )
- QModelIndex sourceIndex ( const QModelIndex & proxy_index ) const

- 13 protected functions inherited from QAbstractItemModel
- 7 protected functions inherited from QObject

### Additional Inherited Members

- 1 property inherited from QObject
- 2 public slots inherited from QAbstractItemModel
- 1 public slot inherited from QObject
- 12 signals inherited from QAbstractItemModel
- 1 signal inherited from QObject
- 4 static public members inherited from QObject

## Detailed Description

The QMappingProxyModel class provides support for mapping data passed between another model and a view.

See also QProxyModel, QAbstractItemModel, and Model/View Programming.

## Member Function Documentation

### QMappingProxyModel::QMappingProxyModel ( QObject * parent = 0 )

Constructs a sorting proxy model with the given parent.

### QMappingProxyModel::~QMappingProxyModel ()

Destroys the sorting proxy model.

### void QMappingProxyModel::clear () `[virtual]`

Clears the mapping in the mapping proxy model.

### void QMappingProxyModel::insertMapping ( const QModelIndex & proxy_index, const QModelIndex & source_index ) `[protected]`

Inserts a mapping between the given proxy_index from the proxy model to the given source_index from the source model.

### bool QMappingProxyModel::isMapped ( const QModelIndex & proxy_index ) const `[protected]`

Returns true if the given proxy_index is mapped to a source model index, otherwise returns false.

### QModelIndex QMappingProxyModel::proxyIndex ( const QModelIndex & source_index ) const `[protected]`

Returns the model index in the QMappingProxyModel given the source_index from the source model.

### void QMappingProxyModel::removeMapping ( const QModelIndex & proxy_index ) `[protected]`

Removes the mapping between the given proxy_index and the source model index it has been mapped to.

### QModelIndex QMappingProxyModel::sourceIndex ( const QModelIndex & proxy_index ) const `[protected]`

Returns the source model index corresponding to the given proxy_index from the mapping proxy model.