Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickheaderview_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKHEADERVIEW_P_H
6#define QQUICKHEADERVIEW_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qquicktableview_p.h>
20#include <private/qtquicktemplates2global_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class QQuickHeaderViewBase;
26class Q_QUICKTEMPLATES2_EXPORT QQuickHeaderViewBase : public QQuickTableView
27{
28 Q_OBJECT
29 Q_DECLARE_PRIVATE(QQuickHeaderViewBase)
30 Q_PROPERTY(QString textRole READ textRole WRITE setTextRole NOTIFY textRoleChanged FINAL)
31
32public:
33 explicit QQuickHeaderViewBase(Qt::Orientation orient, QQuickItem *parent = nullptr);
34 ~QQuickHeaderViewBase();
35
36 QString textRole() const;
37 void setTextRole(const QString &role);
38
39protected:
40 QQuickHeaderViewBase(QQuickHeaderViewBasePrivate &dd, QQuickItem *parent);
41
42Q_SIGNALS:
43 void textRoleChanged();
44
45private:
46 Q_DISABLE_COPY(QQuickHeaderViewBase)
47 friend class QQuickHorizontalHeaderView;
48 friend class QQuickVerticalHeaderView;
49};
50
52class Q_QUICKTEMPLATES2_EXPORT QQuickHorizontalHeaderView : public QQuickHeaderViewBase
53{
54 Q_OBJECT
55 Q_DECLARE_PRIVATE(QQuickHorizontalHeaderView)
56 Q_PROPERTY(bool movableColumns READ movableColumns WRITE setMovableColumns NOTIFY movableColumnsChanged REVISION(6, 8) FINAL)
57 QML_NAMED_ELEMENT(HorizontalHeaderView)
58 QML_ADDED_IN_VERSION(2, 15)
59
60public:
61 QQuickHorizontalHeaderView(QQuickItem *parent = nullptr);
62 ~QQuickHorizontalHeaderView() override;
63
64 bool movableColumns() const;
65 void setMovableColumns(bool movableColumns);
66
67Q_SIGNALS:
68 Q_REVISION(6, 8) void movableColumnsChanged();
69
70protected:
71 QQuickHorizontalHeaderView(QQuickHorizontalHeaderViewPrivate &dd, QQuickItem *parent);
72
73private:
74 Q_DISABLE_COPY(QQuickHorizontalHeaderView)
75};
76
78class Q_QUICKTEMPLATES2_EXPORT QQuickVerticalHeaderView : public QQuickHeaderViewBase
79{
80 Q_OBJECT
81 Q_DECLARE_PRIVATE(QQuickVerticalHeaderView)
82 Q_PROPERTY(bool movableRows READ movableRows WRITE setMovableRows NOTIFY movableRowsChanged REVISION(6, 8) FINAL)
83 QML_NAMED_ELEMENT(VerticalHeaderView)
84 QML_ADDED_IN_VERSION(2, 15)
85
86public:
87 QQuickVerticalHeaderView(QQuickItem *parent = nullptr);
88 ~QQuickVerticalHeaderView() override;
89
90 bool movableRows() const;
91 void setMovableRows(bool movableRows);
92
93Q_SIGNALS:
94 Q_REVISION(6, 8) void movableRowsChanged();
95
96protected:
97 QQuickVerticalHeaderView(QQuickVerticalHeaderViewPrivate &dd, QQuickItem *parent);
98
99private:
100 Q_DISABLE_COPY(QQuickVerticalHeaderView)
101};
102
103QT_END_NAMESPACE
104
105#endif // QQUICKHEADERVIEW_P_H