Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:07:40

0001 // Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QTRANSPOSEPROXYMODEL_H
0005 #define QTRANSPOSEPROXYMODEL_H
0006 
0007 #include <QtCore/qabstractproxymodel.h>
0008 #include <QtCore/qscopedpointer.h>
0009 
0010 QT_REQUIRE_CONFIG(transposeproxymodel);
0011 
0012 QT_BEGIN_NAMESPACE
0013 
0014 class QTransposeProxyModelPrivate;
0015 
0016 class Q_CORE_EXPORT QTransposeProxyModel : public QAbstractProxyModel
0017 {
0018     Q_OBJECT
0019     Q_DISABLE_COPY(QTransposeProxyModel)
0020     Q_DECLARE_PRIVATE(QTransposeProxyModel)
0021 public:
0022     explicit QTransposeProxyModel(QObject* parent = nullptr);
0023     ~QTransposeProxyModel();
0024     void setSourceModel(QAbstractItemModel* newSourceModel) override;
0025     int rowCount(const QModelIndex &parent = QModelIndex()) const override;
0026     int columnCount(const QModelIndex &parent = QModelIndex()) const override;
0027     QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
0028     bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override;
0029     bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
0030     QSize span(const QModelIndex &index) const override;
0031     QMap<int, QVariant> itemData(const QModelIndex &index) const override;
0032     QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override;
0033     QModelIndex mapToSource(const QModelIndex &proxyIndex) const override;
0034     QModelIndex parent(const QModelIndex &index) const override;
0035     QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
0036     bool insertRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
0037     bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
0038     bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild) override;
0039     bool insertColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
0040     bool removeColumns(int column, int count, const QModelIndex &parent = QModelIndex()) override;
0041     bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild) override;
0042     void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
0043 protected:
0044     QTransposeProxyModel(QTransposeProxyModelPrivate &, QObject *parent);
0045 };
0046 
0047 QT_END_NAMESPACE
0048 
0049 #endif // QTRANSPOSEPROXYMODEL_H