1// Copyright (C) 2025 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 QQUICKHEADERVIEWDELEGATE_P_H
5#define QQUICKHEADERVIEWDELEGATE_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 <QtQuickTemplates2/private/qquicktableviewdelegate_p.h>
19
20QT_BEGIN_NAMESPACE
21
22class QQuickHeaderViewBase;
23class QQuickHeaderViewDelegatePrivate;
24
25class Q_QUICKTEMPLATES2_EXPORT QQuickHeaderViewDelegate : public QQuickTableViewDelegate
26{
27 Q_OBJECT
28
29 Q_PROPERTY(Qt::Orientation orientation READ orientation NOTIFY orientationChanged FINAL)
30 // Required properties
31 Q_PROPERTY(QQuickHeaderViewBase *headerView READ headerView WRITE setHeaderView NOTIFY headerViewChanged REQUIRED FINAL)
32 Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged REQUIRED FINAL)
33
34 QML_NAMED_ELEMENT(HeaderViewDelegate)
35 QML_ADDED_IN_VERSION(6, 10)
36
37public:
38 QQuickHeaderViewDelegate(QQuickItem *parent = nullptr);
39
40 QQuickHeaderViewBase *headerView() const;
41 void setHeaderView(QQuickHeaderViewBase *headerView);
42
43 Qt::Orientation orientation() const;
44
45 QVariant model() const;
46 void setModel(const QVariant &model);
47
48Q_SIGNALS:
49 void headerViewChanged();
50 void modelChanged();
51 void orientationChanged();
52
53private:
54 Q_DISABLE_COPY(QQuickHeaderViewDelegate)
55 Q_DECLARE_PRIVATE(QQuickHeaderViewDelegate)
56};
57
58QT_END_NAMESPACE
59
60#endif // QQUICKHEADERVIEWDELEGATE_P_H
61

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