IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QTransposeProxyModel Class

This proxy transposes the source model.

This class was introduced in Qt 5.13.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QTransposeProxyModel Class

  • Header: QTransposeProxyModel

  • Since: Qt 5.13

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Core)

    target_link_libraries(mytarget PRIVATE Qt6::Core)

  • qmake: QT += core

  • Inherits: QAbstractProxyModel

Detailed Description

This model will make the rows of the source model become columns of the proxy model and vice-versa.

If the model is a tree, the parents will be transposed as well. For example, if an index in the source model had parent `index(2,0)`, it will have parent `index(0,2)` in the proxy.

Member Function Documentation

 

[explicit] QTransposeProxyModel::QTransposeProxyModel(QObject *parent = nullptr)

Constructs a new proxy model with the given parent.

[virtual] QTransposeProxyModel::~QTransposeProxyModel()

Destructs the proxy model.

[override virtual] int QTransposeProxyModel::columnCount(const QModelIndex &parent = QModelIndex()) const

[override virtual] QVariant QTransposeProxyModel::headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const

[override virtual] QModelIndex QTransposeProxyModel::index(int row, int column, const QModelIndex &parent = QModelIndex()) const

[override virtual] bool QTransposeProxyModel::insertColumns(int column, int count, const QModelIndex &parent = QModelIndex())

[override virtual] bool QTransposeProxyModel::insertRows(int row, int count, const QModelIndex &parent = QModelIndex())

[override virtual] QMap<int, QVariant> QTransposeProxyModel::itemData(const QModelIndex &index) const

[override virtual] QModelIndex QTransposeProxyModel::mapFromSource(const QModelIndex &sourceIndex) const

[override virtual] QModelIndex QTransposeProxyModel::mapToSource(const QModelIndex &proxyIndex) const

[override virtual] bool QTransposeProxyModel::moveColumns(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)

[override virtual] bool QTransposeProxyModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)

[override virtual] QModelIndex QTransposeProxyModel::parent(const QModelIndex &index) const

[override virtual] bool QTransposeProxyModel::removeColumns(int column, int count, const QModelIndex &parent = QModelIndex())

[override virtual] bool QTransposeProxyModel::removeRows(int row, int count, const QModelIndex &parent = QModelIndex())

[override virtual] int QTransposeProxyModel::rowCount(const QModelIndex &parent = QModelIndex()) const

[override virtual] bool QTransposeProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole)

[override virtual] bool QTransposeProxyModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)

[override virtual] void QTransposeProxyModel::setSourceModel(QAbstractItemModel *newSourceModel)

[override virtual] void QTransposeProxyModel::sort(int column, Qt::SortOrder order = Qt::AscendingOrder)

Reimplements: QAbstractProxyModel::sort(int column, Qt::SortOrder order).

This method will perform no action. Use a QSortFilterProxyModel on top of this one if you require sorting.

[override virtual] QSize QTransposeProxyModel::span(const QModelIndex &index) const

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+