1 /*
2  * DQt - D bindings for the Qt Toolkit
3  *
4  * GNU Lesser General Public License Usage
5  * This file may be used under the terms of the GNU Lesser
6  * General Public License version 3 as published by the Free Software
7  * Foundation and appearing in the file LICENSE.LGPL3 included in the
8  * packaging of this file. Please review the following information to
9  * ensure the GNU Lesser General Public License version 3 requirements
10  * will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
11  */
12 module qt.core.identityproxymodel;
13 extern(C++):
14 
15 import qt.config;
16 import qt.core.abstractitemmodel;
17 import qt.core.abstractproxymodel;
18 import qt.core.itemselectionmodel;
19 import qt.core.mimedata;
20 import qt.core.namespace;
21 import qt.core.object;
22 import qt.core.variant;
23 import qt.helpers;
24 
25 /+ QT_REQUIRE_CONFIG(identityproxymodel); +/
26 
27 
28 
29 extern(C++, class) struct QIdentityProxyModelPrivate;
30 
31 /// Binding for C++ class [QIdentityProxyModel](https://doc.qt.io/qt-6/qidentityproxymodel.html).
32 class /+ Q_CORE_EXPORT +/ QIdentityProxyModel : QAbstractProxyModel
33 {
34     mixin(Q_OBJECT);
35 public:
36     /+ explicit +/this(QObject parent = null);
37     ~this();
38 
39     override int columnCount(ref const(QModelIndex) parent = globalInitVar!QModelIndex) const;
40     override QModelIndex index(int row, int column, ref const(QModelIndex) parent = globalInitVar!QModelIndex) const;
41     override QModelIndex mapFromSource(ref const(QModelIndex) sourceIndex) const;
42     override QModelIndex mapToSource(ref const(QModelIndex) proxyIndex) const;
43     override QModelIndex parent(ref const(QModelIndex) child) const;
44     /+ using QObject::parent; +/
45     override int rowCount(ref const(QModelIndex) parent = globalInitVar!QModelIndex) const;
46     override QVariant headerData(int section, /+ Qt:: +/qt.core.namespace.Orientation orientation, int role = /+ Qt:: +/qt.core.namespace.ItemDataRole.DisplayRole) const;
47     mixin(changeWindowsMangling(q{mangleClassesTailConst}, q{
48     override bool dropMimeData(const(QMimeData) data, /+ Qt:: +/qt.core.namespace.DropAction action, int row, int column, ref const(QModelIndex) parent);
49     }));
50     override QModelIndex sibling(int row, int column, ref const(QModelIndex) idx) const;
51 
52     override QItemSelection mapSelectionFromSource(ref const(QItemSelection) selection) const;
53     override QItemSelection mapSelectionToSource(ref const(QItemSelection) selection) const;
54     override QModelIndexList match(ref const(QModelIndex) start, int role, ref const(QVariant) value, int hits = 1, /+ Qt:: +/qt.core.namespace.MatchFlags flags = /+ Qt:: +/qt.core.namespace.MatchFlags(/+ Qt:: +/qt.core.namespace.MatchFlag.MatchStartsWith|/+ Qt:: +/qt.core.namespace.MatchFlag.MatchWrap)) const;
55     override void setSourceModel(QAbstractItemModel sourceModel);
56 
57     override bool insertColumns(int column, int count, ref const(QModelIndex) parent = globalInitVar!QModelIndex);
58     override bool insertRows(int row, int count, ref const(QModelIndex) parent = globalInitVar!QModelIndex);
59     override bool removeColumns(int column, int count, ref const(QModelIndex) parent = globalInitVar!QModelIndex);
60     override bool removeRows(int row, int count, ref const(QModelIndex) parent = globalInitVar!QModelIndex);
61     override bool moveRows(ref const(QModelIndex) sourceParent, int sourceRow, int count, ref const(QModelIndex) destinationParent, int destinationChild);
62     override bool moveColumns(ref const(QModelIndex) sourceParent, int sourceColumn, int count, ref const(QModelIndex) destinationParent, int destinationChild);
63 
64 protected:
65     this(ref QIdentityProxyModelPrivate dd, QObject parent);
66 
67 private:
68     /+ Q_DECLARE_PRIVATE(QIdentityProxyModel) +/
69     /+ Q_DISABLE_COPY(QIdentityProxyModel) +/
70 
71     /+ Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeInserted(QModelIndex,int,int))
72     Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsInserted(QModelIndex,int,int))
73     Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeRemoved(QModelIndex,int,int))
74     Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsRemoved(QModelIndex,int,int))
75     Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
76     Q_PRIVATE_SLOT(d_func(), void _q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int))
77 
78     Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeInserted(QModelIndex,int,int))
79     Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsInserted(QModelIndex,int,int))
80     Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int))
81     Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsRemoved(QModelIndex,int,int))
82     Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))
83     Q_PRIVATE_SLOT(d_func(), void _q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int))
84 
85     Q_PRIVATE_SLOT(d_func(), void _q_sourceDataChanged(QModelIndex, QModelIndex, QList<int>))
86     Q_PRIVATE_SLOT(d_func(), void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last))
87 
88     Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint))
89     Q_PRIVATE_SLOT(d_func(), void _q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint))
90     Q_PRIVATE_SLOT(d_func(), void _q_sourceModelAboutToBeReset())
91     Q_PRIVATE_SLOT(d_func(), void _q_sourceModelReset()) +/
92     mixin(CREATE_CONVENIENCE_WRAPPERS);
93 }
94