1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef HEADERNODE_H
5#define HEADERNODE_H
6
7#include "aggregate.h"
8
9#include <QtCore/qglobal.h>
10#include <QtCore/qstring.h>
11
12QT_BEGIN_NAMESPACE
13
14class HeaderNode : public Aggregate
15{
16public:
17 HeaderNode(Aggregate *parent, const QString &name);
18 [[nodiscard]] bool docMustBeGenerated() const override;
19 [[nodiscard]] bool isFirstClassAggregate() const override { return true; }
20 [[nodiscard]] bool isRelatableType() const override { return true; }
21 [[nodiscard]] QString title() const override { return (m_title.isEmpty() ? name() : m_title); }
22 [[nodiscard]] QString subtitle() const override { return m_subtitle; }
23 [[nodiscard]] QString fullTitle() const override
24 {
25 return (m_title.isEmpty() ? name() : name() + " - " + m_title);
26 }
27 bool setTitle(const QString &title) override
28 {
29 m_title = title;
30 return true;
31 }
32 bool setSubtitle(const QString &subtitle) override
33 {
34 m_subtitle = subtitle;
35 return true;
36 }
37 [[nodiscard]] bool hasDocumentedChildren() const;
38
39private:
40 QString m_title {};
41 QString m_subtitle {};
42};
43
44QT_END_NAMESPACE
45
46#endif // HEADERNODE_H
47

source code of qttools/src/qdoc/qdoc/headernode.h