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 Q_PROPERTY(bool showSortIndicator READ showSortIndicator WRITE setShowSortIndicator
58 NOTIFY showSortIndicatorChanged REVISION(6, 13))
59 Q_PROPERTY(bool sortIndicatorClearable READ sortIndicatorClearable WRITE setSortIndicatorClearable
60 NOTIFY sortIndicatorClearableChanged REVISION(6, 13))
61 QML_NAMED_ELEMENT(HorizontalHeaderView)
62 QML_ADDED_IN_VERSION(2, 15)
63
64public:
65 QQuickHorizontalHeaderView(QQuickItem *parent = nullptr);
66 ~QQuickHorizontalHeaderView() override;
67
68 bool movableColumns() const;
69 void setMovableColumns(bool movableColumns);
70
71 bool showSortIndicator() const;
72 void setShowSortIndicator(bool show);
73
74 bool sortIndicatorClearable() const;
75 void setSortIndicatorClearable(bool clearable);
77Q_SIGNALS:
78 Q_REVISION(6, 8) void movableColumnsChanged();
79 Q_REVISION(6, 13) void showSortIndicatorChanged();
80 Q_REVISION(6, 13) void sortIndicatorClearableChanged();
81
82 Q_REVISION(6,13) void headerClicked(int logicalColumn);
84protected:
85 QQuickHorizontalHeaderView(QQuickHorizontalHeaderViewPrivate &dd, QQuickItem *parent);
86
87private:
88 Q_DISABLE_COPY(QQuickHorizontalHeaderView)
89};
90
92class Q_QUICKTEMPLATES2_EXPORT QQuickVerticalHeaderView : public QQuickHeaderViewBase
93{
94 Q_OBJECT
95 Q_DECLARE_PRIVATE(QQuickVerticalHeaderView)
96 Q_PROPERTY(bool movableRows READ movableRows WRITE setMovableRows NOTIFY movableRowsChanged REVISION(6, 8) FINAL)
97 QML_NAMED_ELEMENT(VerticalHeaderView)
98 QML_ADDED_IN_VERSION(2, 15)
99
100public:
101 QQuickVerticalHeaderView(QQuickItem *parent = nullptr);
102 ~QQuickVerticalHeaderView() override;
103
104 bool movableRows() const;
105 void setMovableRows(bool movableRows);
106
107Q_SIGNALS:
108 Q_REVISION(6, 8) void movableRowsChanged();
109
110protected:
111 QQuickVerticalHeaderView(QQuickVerticalHeaderViewPrivate &dd, QQuickItem *parent);
112
113private:
114 Q_DISABLE_COPY(QQuickVerticalHeaderView)
115};
116
117QT_END_NAMESPACE
118
119#endif // QQUICKHEADERVIEW_P_H