- _isProxyModel = (bool)proxyModel();
- connect(this, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
- this, SLOT(_currentChanged(QModelIndex, QModelIndex)));
- connect(this, SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
- this, SLOT(_selectionChanged(QItemSelection, QItemSelection)));
-}
-
-MappedSelectionModel::~MappedSelectionModel() {
-}
-
-const QAbstractItemModel *MappedSelectionModel::baseModel() const {
- if(isProxyModel())
- return proxyModel()->sourceModel();
- else
- return model();
-}
-
-const QAbstractProxyModel *MappedSelectionModel::proxyModel() const {
- return qobject_cast<const QAbstractProxyModel *>(model());