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
21QT_BEGIN_NAMESPACE
22
23class QQuickHeaderViewBase;
24class QQuickHeaderViewBasePrivate;
25class 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
31public:
32 explicit QQuickHeaderViewBase(Qt::Orientation orient, QQuickItem *parent = nullptr);
33 ~QQuickHeaderViewBase();
34
35 QString textRole() const;
36 void setTextRole(const QString &role);
37
38protected:
39 QQuickHeaderViewBase(QQuickHeaderViewBasePrivate &dd, QQuickItem *parent);
40
41Q_SIGNALS:
42 void textRoleChanged();
43
44private:
45 Q_DISABLE_COPY(QQuickHeaderViewBase)
46 friend class QQuickHorizontalHeaderView;
47 friend class QQuickVerticalHeaderView;
48};
49
50class QQuickHorizontalHeaderViewPrivate;
51class 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
58public:
59 QQuickHorizontalHeaderView(QQuickItem *parent = nullptr);
60 ~QQuickHorizontalHeaderView() override;
61
62protected:
63 QQuickHorizontalHeaderView(QQuickHorizontalHeaderViewPrivate &dd, QQuickItem *parent);
64
65private:
66 Q_DISABLE_COPY(QQuickHorizontalHeaderView)
67};
68
69class QQuickVerticalHeaderViewPrivate;
70class 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
77public:
78 QQuickVerticalHeaderView(QQuickItem *parent = nullptr);
79 ~QQuickVerticalHeaderView() override;
80
81protected:
82 QQuickVerticalHeaderView(QQuickVerticalHeaderViewPrivate &dd, QQuickItem *parent);
83
84private:
85 Q_DISABLE_COPY(QQuickVerticalHeaderView)
86};
87
88QT_END_NAMESPACE
89
90QML_DECLARE_TYPE(QQuickHorizontalHeaderView)
91QML_DECLARE_TYPE(QQuickVerticalHeaderView)
92
93#endif // QQUICKHEADERVIEW_P_H
94

source code of qtdeclarative/src/quicktemplates/qquickheaderview_p.h