1 | // Copyright (C) 2020 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 QQUICKHEADERVIEW_P_H |
5 | #define QQUICKHEADERVIEW_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 <private/qquicktableview_p.h> |
19 | #include <private/qtquicktemplates2global_p.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QQuickHeaderViewBase; |
24 | class QQuickHeaderViewBasePrivate; |
25 | class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickHeaderViewBase : public QQuickTableView |
26 | { |
27 | Q_OBJECT |
28 | Q_DECLARE_PRIVATE(QQuickHeaderViewBase) |
29 | Q_PROPERTY(QString textRole READ textRole WRITE setTextRole NOTIFY textRoleChanged FINAL) |
30 | |
31 | public: |
32 | explicit QQuickHeaderViewBase(Qt::Orientation orient, QQuickItem *parent = nullptr); |
33 | ~QQuickHeaderViewBase(); |
34 | |
35 | QString textRole() const; |
36 | void setTextRole(const QString &role); |
37 | |
38 | protected: |
39 | QQuickHeaderViewBase(QQuickHeaderViewBasePrivate &dd, QQuickItem *parent); |
40 | |
41 | Q_SIGNALS: |
42 | void textRoleChanged(); |
43 | |
44 | private: |
45 | Q_DISABLE_COPY(QQuickHeaderViewBase) |
46 | friend class QQuickHorizontalHeaderView; |
47 | friend class QQuickVerticalHeaderView; |
48 | }; |
49 | |
50 | class QQuickHorizontalHeaderViewPrivate; |
51 | class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickHorizontalHeaderView : public QQuickHeaderViewBase |
52 | { |
53 | Q_OBJECT |
54 | Q_DECLARE_PRIVATE(QQuickHorizontalHeaderView) |
55 | QML_NAMED_ELEMENT(HorizontalHeaderView) |
56 | QML_ADDED_IN_VERSION(2, 15) |
57 | |
58 | public: |
59 | QQuickHorizontalHeaderView(QQuickItem *parent = nullptr); |
60 | ~QQuickHorizontalHeaderView() override; |
61 | |
62 | protected: |
63 | QQuickHorizontalHeaderView(QQuickHorizontalHeaderViewPrivate &dd, QQuickItem *parent); |
64 | |
65 | private: |
66 | Q_DISABLE_COPY(QQuickHorizontalHeaderView) |
67 | }; |
68 | |
69 | class QQuickVerticalHeaderViewPrivate; |
70 | class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickVerticalHeaderView : public QQuickHeaderViewBase |
71 | { |
72 | Q_OBJECT |
73 | Q_DECLARE_PRIVATE(QQuickVerticalHeaderView) |
74 | QML_NAMED_ELEMENT(VerticalHeaderView) |
75 | QML_ADDED_IN_VERSION(2, 15) |
76 | |
77 | public: |
78 | QQuickVerticalHeaderView(QQuickItem *parent = nullptr); |
79 | ~QQuickVerticalHeaderView() override; |
80 | |
81 | protected: |
82 | QQuickVerticalHeaderView(QQuickVerticalHeaderViewPrivate &dd, QQuickItem *parent); |
83 | |
84 | private: |
85 | Q_DISABLE_COPY(QQuickVerticalHeaderView) |
86 | }; |
87 | |
88 | QT_END_NAMESPACE |
89 | |
90 | QML_DECLARE_TYPE(QQuickHorizontalHeaderView) |
91 | QML_DECLARE_TYPE(QQuickVerticalHeaderView) |
92 | |
93 | #endif // QQUICKHEADERVIEW_P_H |
94 |