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