1 | // Copyright (C) 2021 The Qt Company Ltd. |
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 QQUICKTREEVIEW_P_P_H |
5 | #define QQUICKTREEVIEW_P_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 "qquicktreeview_p.h" |
19 | #include "qquicktableview_p_p.h" |
20 | |
21 | #include <QtQmlModels/private/qqmltreemodeltotablemodel_p_p.h> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class Q_QUICK_PRIVATE_EXPORT QQuickTreeViewPrivate : public QQuickTableViewPrivate |
26 | { |
27 | public: |
28 | Q_DECLARE_PUBLIC(QQuickTreeView) |
29 | |
30 | QQuickTreeViewPrivate(); |
31 | ~QQuickTreeViewPrivate() override; |
32 | |
33 | static inline QQuickTreeViewPrivate *get(QQuickTreeView *q) { return q->d_func(); } |
34 | |
35 | QVariant modelImpl() const override; |
36 | void setModelImpl(const QVariant &newModel) override; |
37 | |
38 | void initItemCallback(int serializedModelIndex, QObject *object) override; |
39 | void itemReusedCallback(int serializedModelIndex, QObject *object) override; |
40 | void dataChangedCallback(const QModelIndex &topLeft, |
41 | const QModelIndex &bottomRight, |
42 | const QVector<int> &roles); |
43 | |
44 | void updateRequiredProperties(int serializedModelIndex, QObject *object, bool init); |
45 | void updateSelection(const QRect &oldSelection, const QRect &newSelection) override; |
46 | |
47 | public: |
48 | QQmlTreeModelToTableModel m_treeModelToTableModel; |
49 | QVariant m_assignedModel; |
50 | }; |
51 | |
52 | QT_END_NAMESPACE |
53 | |
54 | #endif // QQUICKTREEVIEW_P_P_H |
55 | |