QTransposeProxyModel 类
此代理转换源模型。 更多...
头文件 | #include <QTransposeProxyModel> |
CMake | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake | QT += core |
继承 | QAbstractProxyModel |
公共函数
QTransposeProxyModel(QObject *parent = nullptr) | |
virtual | ~QTransposeProxyModel() |
重写公共函数
virtual int | columnCount(const QModelIndex &parent = QModelIndex()) const override |
virtual QVariant | headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override |
virtual QModelIndex | index(int row, int column, const QModelIndex &parent = QModelIndex()) const override |
virtual bool | insertColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override |
virtual bool | insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override |
virtual QMap<int, QVariant> | itemData(const QModelIndex &index) const override |
virtual QModelIndex | mapFromSource(const QModelIndex &sourceIndex) const override |
virtual QModelIndex | mapToSource(const QModelIndex &proxyIndex) const override |
virtual bool | moveColumns(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override |
virtual bool | moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override |
virtual QModelIndex | parent(const QModelIndex &index) const override |
virtual bool | removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override |
virtual bool | removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override |
virtual int | rowCount(const QModelIndex &parent = QModelIndex()) const override |
virtual bool | setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override |
virtual bool | setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override |
virtual void | setSourceModel(QAbstractItemModel *newSourceModel) override |
virtual void | sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override |
虚拟 QSize | span(const QModelIndex &index) const override |
成员函数文档
[显式构造函数]
QTransposeProxyModel::QTransposeProxyModel(QObject *parent = nullptr)
使用给定的 父对象 构造一个新的代理模型。
[虚拟非抛出]
QTransposeProxyModel::~QTransposeProxyModel()
销毁代理模型。
[覆盖虚函数]
int QTransposeProxyModel::columnCount(const QModelIndex &parent = QModelIndex()) const
重写:QAbstractItemModel::columnCount(const QModelIndex &parent) const.
[覆盖虚函数]
QVariant QTransposeProxyModel::headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const
重写:QAbstractProxyModel::headerData(int section, Qt::Orientation orientation, int role) const.
另请参见setHeaderData().
[覆盖虚函数]
QModelIndex QTransposeProxyModel::index(int row, int column, const QModelIndex &parent = QModelIndex()) const
重写:QAbstractItemModel::index(int row, int column, const QModelIndex &parent) const.
[覆盖虚函数]
bool QTransposeProxyModel::insertColumns(int column, int count, const QModelIndex &parent = QModelIndex())
重写:QAbstractItemModel::insertColumns(int column, int count, const QModelIndex &parent).
[覆盖虚函数]
bool QTransposeProxyModel::insertRows(int row, int count, const QModelIndex &parent = QModelIndex())
重写:QAbstractItemModel::insertRows(int row, int count, const QModelIndex &parent).
[覆盖虚函数]
QMap<int, QVariant> QTransposeProxyModel::itemData(const QModelIndex &index) const
重写:QAbstractProxyModel::itemData(const QModelIndex &proxyIndex) const.
另请参见setItemData().
[重写虚拟]
QModelIndex QTransposeProxyModel::mapFromSource(const QModelIndex &sourceIndex) const
重写: QAbstractProxyModel::mapFromSource(const QModelIndex &sourceIndex) const。
[重写虚拟]
QModelIndex QTransposeProxyModel::mapToSource(const QModelIndex &proxyIndex) const
重写: QAbstractProxyModel::mapToSource(const QModelIndex &proxyIndex) const。
[重写虚拟]
bool QTransposeProxyModel::moveColumns(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
重写: QAbstractItemModel::moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild)。
[重写虚拟]
bool QTransposeProxyModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
重写: QAbstractItemModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)。
[重写虚拟]
QModelIndex QTransposeProxyModel::parent(const QModelIndex &index) const
重写: QAbstractItemModel::parent(const QModelIndex &index) const。
[重写虚拟]
bool QTransposeProxyModel::removeColumns(int column, int count, const QModelIndex &parent = QModelIndex())
重写: QAbstractItemModel::removeColumns(int column, int count, const QModelIndex &parent)。
[重写虚拟]
bool QTransposeProxyModel::removeRows(int row, int count, const QModelIndex &parent = QModelIndex())
重写: QAbstractItemModel::removeRows(int row, int count, const QModelIndex &parent)。
[重写虚拟]
int QTransposeProxyModel::rowCount(const QModelIndex &parent = QModelIndex()) const
重写: QAbstractItemModel::rowCount(const QModelIndex &parent) const。
[重写虚拟]
bool QTransposeProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole)
重新实现: QAbstractProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role).
另请参阅 headerData().
[重写虚函数]
bool QTransposeProxyModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)
重新实现: QAbstractProxyModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles).
另请参阅 itemData().
[重写虚函数]
void QTransposeProxyModel::setSourceModel(QAbstractItemModel *newSourceModel)
重新实现: QAbstractProxyModel::setSourceModel(QAbstractItemModel *sourceModel).
[重写虚函数]
void QTransposeProxyModel::sort(int column, Qt::SortOrder order = Qt::AscendingOrder)
重新实现: QAbstractProxyModel::sort(int column, Qt::SortOrder order).
此方法不执行任何操作。如果您需要排序,请在之上使用QSortFilterProxyModel。
[重写虚函数]
QSize QTransposeProxyModel::span(const QModelIndex &index) const
重新实现: QAbstractProxyModel::span(const QModelIndex &index) const.
© 2024 Qt 公司有限公司。此处包含的文档贡献是各自所有者的版权。此处提供的文档是根据自由软件基金会发布的GNU 自由文档许可证版本 1.3许可的。Qt 及其相应的标志是芬兰和/或全世界其他国家的 Qt 公司有限公司的商标。所有其他商标均为其各自所有者的财产。