Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qidentityproxymodel_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QIDENTITYPROXYMODEL_P_H
6#define QIDENTITYPROXYMODEL_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of QAbstractItemModel*. This header file may change from version
14// to version without notice, or even be removed.
15//
16// We mean it.
17//
18//
19
20#include <QtCore/private/qabstractproxymodel_p.h>
21#include <QtCore/qidentityproxymodel.h>
22
24
25class Q_CORE_EXPORT QIdentityProxyModelPrivate : public QAbstractProxyModelPrivate
26{
27 Q_DECLARE_PUBLIC(QIdentityProxyModel)
28
29public:
30 QIdentityProxyModelPrivate()
31 {
32 }
33 ~QIdentityProxyModelPrivate() override;
34
35 QList<QPersistentModelIndex> layoutChangePersistentIndexes;
36 QModelIndexList proxyIndexes;
37
38 void sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
39 void sourceRowsInserted(const QModelIndex &parent, int start, int end);
40 void sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
41 void sourceRowsRemoved(const QModelIndex &parent, int start, int end);
42 void sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd,
43 const QModelIndex &destParent, int dest);
44 void sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd,
45 const QModelIndex &destParent, int dest);
46
47 void sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end);
48 void sourceColumnsInserted(const QModelIndex &parent, int start, int end);
49 void sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
50 void sourceColumnsRemoved(const QModelIndex &parent, int start, int end);
51 void sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart,
52 int sourceEnd, const QModelIndex &destParent, int dest);
53 void sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd,
54 const QModelIndex &destParent, int dest);
55
56 void sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
57 const QList<int> &roles);
58 void sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last);
59
60 void sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents,
61 QAbstractItemModel::LayoutChangeHint hint);
62 void sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents,
63 QAbstractItemModel::LayoutChangeHint hint);
64 void sourceModelAboutToBeReset();
65 void sourceModelReset();
66
67private:
68 bool m_handleLayoutChanges = true;
69 bool m_handleDataChanges = true;
70 QVarLengthArray<QMetaObject::Connection, 18> m_sourceModelConnections;
71};
72
73QT_END_NAMESPACE
74
75#endif // QIDENTITYPROXYMODEL_P_H
The QIdentityProxyModel class proxies its source model unmodified.
QT_REQUIRE_CONFIG(identityproxymodel)