1// qabstractproxymodel.sip generated by MetaSIP
2//
3// This file is part of the QtCore Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
8//
9// This file may be used under the terms of the GNU General Public License
10// version 3.0 as published by the Free Software Foundation and appearing in
11// the file LICENSE included in the packaging of this file.  Please review the
12// following information to ensure the GNU General Public License version 3.0
13// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14//
15// If you do not wish to use this file under the terms of the GPL version 3.0
16// then you may purchase a commercial license.  For more information contact
17// info@riverbankcomputing.com.
18//
19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21
22
23class QAbstractProxyModel : QAbstractItemModel
24{
25%TypeHeaderCode
26#include <qabstractproxymodel.h>
27%End
28
29public:
30    explicit QAbstractProxyModel(QObject *parent /TransferThis/ = 0);
31    virtual ~QAbstractProxyModel();
32    virtual void setSourceModel(QAbstractItemModel *sourceModel /KeepReference/);
33    QAbstractItemModel *sourceModel() const;
34    virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const = 0;
35    virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const = 0;
36    virtual QItemSelection mapSelectionToSource(const QItemSelection &selection) const;
37    virtual QItemSelection mapSelectionFromSource(const QItemSelection &selection) const;
38    virtual bool submit();
39    virtual void revert();
40    virtual QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const;
41    virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
42%If (Qt_5_5_0 -)
43    virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
44%End
45%If (- Qt_5_5_0)
46    virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const;
47%End
48    virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole);
49    virtual QMap<int, QVariant> itemData(const QModelIndex &index) const;
50    virtual Qt::ItemFlags flags(const QModelIndex &index) const;
51    virtual bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles);
52    virtual QModelIndex buddy(const QModelIndex &index) const;
53    virtual bool canFetchMore(const QModelIndex &parent) const;
54    virtual void fetchMore(const QModelIndex &parent);
55    virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
56    virtual QSize span(const QModelIndex &index) const;
57    virtual bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
58    virtual QMimeData *mimeData(const QModelIndexList &indexes) const /TransferBack/;
59    virtual QStringList mimeTypes() const;
60    virtual Qt::DropActions supportedDropActions() const;
61    virtual QModelIndex sibling(int row, int column, const QModelIndex &idx) const;
62
63protected slots:
64%If (Qt_5_1_0 -)
65    void resetInternalData();
66%End
67
68signals:
69    void sourceModelChanged();
70
71public:
72%If (Qt_5_4_0 -)
73    virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
74%End
75%If (Qt_5_4_0 -)
76    virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
77%End
78%If (Qt_5_4_0 -)
79    virtual Qt::DropActions supportedDragActions() const;
80%End
81};
82