1// Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QTRANSPOSEPROXYMODEL_P_H
5#define QTRANSPOSEPROXYMODEL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qtransposeproxymodel.h"
19#include <private/qabstractproxymodel_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QTransposeProxyModelPrivate : public QAbstractProxyModelPrivate
24{
25 Q_DECLARE_PUBLIC(QTransposeProxyModel)
26 Q_DISABLE_COPY(QTransposeProxyModelPrivate)
27private:
28 QTransposeProxyModelPrivate() = default;
29 QList<QMetaObject::Connection> sourceConnections;
30 QList<QPersistentModelIndex> layoutChangePersistentIndexes;
31 QModelIndexList layoutChangeProxyIndexes;
32 QModelIndex uncheckedMapToSource(const QModelIndex &proxyIndex) const;
33 QModelIndex uncheckedMapFromSource(const QModelIndex &sourceIndex) const;
34 void onLayoutChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
35 void onLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint);
36 void onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int> &roles);
37 void onHeaderDataChanged(Qt::Orientation orientation, int first, int last);
38 void onColumnsAboutToBeInserted(const QModelIndex &parent, int first, int last);
39 void onColumnsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
40 void onColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn);
41 void onRowsAboutToBeInserted(const QModelIndex &parent, int first, int last);
42 void onRowsAboutToBeRemoved(const QModelIndex &parent, int first, int last);
43 void onRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow);
44};
45
46QT_END_NAMESPACE
47
48#endif //QTRANSPOSEPROXYMODEL_P_H
49

source code of qtbase/src/corelib/itemmodels/qtransposeproxymodel_p.h