File indexing completed on 2025-01-18 10:07:25
0001
0002
0003
0004
0005 #ifndef QIDENTITYPROXYMODEL_H
0006 #define QIDENTITYPROXYMODEL_H
0007
0008 #include <QtCore/qabstractproxymodel.h>
0009
0010 QT_REQUIRE_CONFIG(identityproxymodel);
0011
0012 QT_BEGIN_NAMESPACE
0013
0014
0015 class QIdentityProxyModelPrivate;
0016
0017 class Q_CORE_EXPORT QIdentityProxyModel : public QAbstractProxyModel
0018 {
0019 Q_OBJECT
0020 public:
0021 explicit QIdentityProxyModel(QObject* parent = nullptr);
0022 ~QIdentityProxyModel();
0023
0024 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
0025 QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
0026 QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override;
0027 QModelIndex mapToSource(const QModelIndex& proxyIndex) const override;
0028 QModelIndex parent(const QModelIndex& child) const override;
0029 using QObject::parent;
0030 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
0031 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
0032 bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) override;
0033 QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
0034
0035 QItemSelection mapSelectionFromSource(const QItemSelection& selection) const override;
0036 QItemSelection mapSelectionToSource(const QItemSelection& selection) const override;
0037 QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const override;
0038 void setSourceModel(QAbstractItemModel* sourceModel) override;
0039
0040 bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()) override;
0041 bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
0042 bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()) override;
0043 bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()) override;
0044 bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
0045 bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) override;
0046
0047 protected:
0048 QIdentityProxyModel(QIdentityProxyModelPrivate &dd, QObject* parent);
0049
0050 private:
0051 Q_DECLARE_PRIVATE(QIdentityProxyModel)
0052 Q_DISABLE_COPY(QIdentityProxyModel)
0053
0054 Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeInserted(QModelIndex,int,int))
0055 Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsInserted(QModelIndex,int,int))
0056 Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeRemoved(QModelIndex,int,int))
0057 Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsRemoved(QModelIndex,int,int))
0058 Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
0059 Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int))
0060
0061 Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeInserted(QModelIndex,int,int))
0062 Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsInserted(QModelIndex,int,int))
0063 Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int))
0064 Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsRemoved(QModelIndex,int,int))
0065 Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
0066 Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int))
0067
0068 Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex, QModelIndex, QList<int>))
0069 Q_PRIVATE_SLOT(d_func(), void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last))
0070
0071 Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint))
0072 Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint))
0073 Q_PRIVATE_SLOT(d_func(), void _q_sourceModelAboutToBeReset())
0074 Q_PRIVATE_SLOT(d_func(), void _q_sourceModelReset())
0075 };
0076
0077 QT_END_NAMESPACE
0078
0079 #endif
0080