Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Copyright (C) 2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author David Faure <david.faure@kdab.com>
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 QCONCATENATEROWSPROXYMODEL_H
0005 #define QCONCATENATEROWSPROXYMODEL_H
0006 
0007 #include <QtCore/qabstractitemmodel.h>
0008 
0009 QT_REQUIRE_CONFIG(concatenatetablesproxymodel);
0010 
0011 QT_BEGIN_NAMESPACE
0012 
0013 class QConcatenateTablesProxyModelPrivate;
0014 
0015 class Q_CORE_EXPORT QConcatenateTablesProxyModel : public QAbstractItemModel
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit QConcatenateTablesProxyModel(QObject *parent = nullptr);
0021     ~QConcatenateTablesProxyModel();
0022 
0023     QList<QAbstractItemModel *> sourceModels() const;
0024     Q_SCRIPTABLE void addSourceModel(QAbstractItemModel *sourceModel);
0025     Q_SCRIPTABLE void removeSourceModel(QAbstractItemModel *sourceModel);
0026 
0027     QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
0028     QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
0029 
0030     QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
0031     bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
0032     QMap<int, QVariant> itemData(const QModelIndex &proxyIndex) const override;
0033     bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles) override;
0034     Qt::ItemFlags flags(const QModelIndex &index) const override;
0035     QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
0036     QModelIndex parent(const QModelIndex &index) const override;
0037     int rowCount(const QModelIndex &parent = QModelIndex()) const override;
0038     QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
0039     int columnCount(const QModelIndex &parent = QModelIndex()) const override;
0040     QStringList mimeTypes() const override;
0041     QMimeData *mimeData(const QModelIndexList &indexes) const override;
0042     bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
0043     bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
0044     QSize span(const QModelIndex &index) const override;
0045 
0046 private:
0047     Q_DECLARE_PRIVATE(QConcatenateTablesProxyModel)
0048     Q_DISABLE_COPY(QConcatenateTablesProxyModel)
0049 };
0050 
0051 QT_END_NAMESPACE
0052 
0053 #endif // QCONCATENATEROWSPROXYMODEL_H