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_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_EXPORT QQuickHorizontalHeaderView : public QQuickHeaderViewBase
52{
53 Q_OBJECT
54 Q_DECLARE_PRIVATE(QQuickHorizontalHeaderView)
55 Q_PROPERTY(bool movableColumns READ movableColumns WRITE setMovableColumns NOTIFY movableColumnsChanged REVISION(6, 8) FINAL)
56 QML_NAMED_ELEMENT(HorizontalHeaderView)
57 QML_ADDED_IN_VERSION(2, 15)
58
59public:
60 QQuickHorizontalHeaderView(QQuickItem *parent = nullptr);
61 ~QQuickHorizontalHeaderView() override;
62
63 bool movableColumns() const;
64 void setMovableColumns(bool movableColumns);
65
66Q_SIGNALS:
67 Q_REVISION(6, 8) void movableColumnsChanged();
68
69protected:
70 QQuickHorizontalHeaderView(QQuickHorizontalHeaderViewPrivate &dd, QQuickItem *parent);
71
72private:
73 Q_DISABLE_COPY(QQuickHorizontalHeaderView)
74};
75
76class QQuickVerticalHeaderViewPrivate;
77class Q_QUICKTEMPLATES2_EXPORT QQuickVerticalHeaderView : public QQuickHeaderViewBase
78{
79 Q_OBJECT
80 Q_DECLARE_PRIVATE(QQuickVerticalHeaderView)
81 Q_PROPERTY(bool movableRows READ movableRows WRITE setMovableRows NOTIFY movableRowsChanged REVISION(6, 8) FINAL)
82 QML_NAMED_ELEMENT(VerticalHeaderView)
83 QML_ADDED_IN_VERSION(2, 15)
84
85public:
86 QQuickVerticalHeaderView(QQuickItem *parent = nullptr);
87 ~QQuickVerticalHeaderView() override;
88
89 bool movableRows() const;
90 void setMovableRows(bool movableRows);
91
92Q_SIGNALS:
93 Q_REVISION(6, 8) void movableRowsChanged();
94
95protected:
96 QQuickVerticalHeaderView(QQuickVerticalHeaderViewPrivate &dd, QQuickItem *parent);
97
98private:
99 Q_DISABLE_COPY(QQuickVerticalHeaderView)
100};
101
102QT_END_NAMESPACE
103
104#endif // QQUICKHEADERVIEW_P_H
105

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

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