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
document.h
Go to the documentation of this file.
1// Copyright (C) 2025 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 QDOC_IR_DOCUMENT_H
5#define QDOC_IR_DOCUMENT_H
6
7#include "contentblock.h"
8#include "member.h"
10
11#include "qdoc/access.h"
12#include "qdoc/genustypes.h"
13#include "qdoc/status.h"
14
15#include <QJsonObject>
16#include <QList>
17#include <QString>
18#include <QStringList>
19
20#include <optional>
21
23
24namespace IR {
25
53
81
83{
87 Access access { Access::Public };
88 };
89
94
99
105
110
117
122
132 bool suppressInheritance { false };
133
135
136 bool isInnerClass { false };
137 bool isNamespace { false };
138 bool isHeader { false };
139
140 bool isPartialNamespace { false };
143
146
149
152
154
155 bool hasObsoleteMembers { false };
157
158 [[nodiscard]] QJsonObject toJson() const;
159};
160
195
197{
198 // Classification
200 Genus genus { Genus::DontCare };
202 Access access { Access::Public };
203
204 // Identity
205 QString title; // Page title
206 QString fullTitle; // Full qualified title
207 QString url; // Output file URL (relative)
208 QString since; // Version introduced (e.g., "6.8")
209 QString deprecatedSince; // Version deprecated (e.g., "6.5")
210 QString brief; // Brief description
211
212 // Content
215
216 // Members (for aggregate pages)
219
220 // QML type metadata (populated only for QML type pages)
222
223 // Collection metadata (populated for module, QML module, and group pages)
225
226 // C++ reference metadata (populated for class, namespace, and header pages)
228
229 // Navigation metadata (populated for all pages with navigation config)
231
232 // Members sub-page URL (set when a members listing page is generated)
234
235 QJsonObject toJson() const;
236};
237
238} // namespace IR
239
240QT_END_NAMESPACE
241
242#endif // QDOC_IR_DOCUMENT_H
Assembles IR Documents from pre-extracted metadata.
Definition builder.h:15
Builder()=default
Document buildPageIR(PageMetadata pm) const
Definition builder.cpp:196
Status
Specifies the status of the QQmlIncubator.
NodeType
Definition genustypes.h:150
Definition builder.cpp:14
static QList< ContentBlock > buildThreadSafetyAdmonition(const CppReferenceData::ThreadSafetyInfo &ts, const QString &typeWord)
Definition builder.cpp:107
static InlineContent makeResolvedLink(const QString &name, const QString &href)
Definition builder.cpp:74
LinkState
LinkOrigin
static void appendExceptionList(QList< InlineContent > &inlines, const QString &prefix, const QString &topicName, const QList< CppReferenceData::ThreadSafetyExceptionEntry > &exceptions)
Definition builder.cpp:84
BlockType
static InlineContent makeTopicLink(const QString &topicName)
Definition builder.cpp:54
static InlineContent makeTextInline(const QString &text)
Definition builder.cpp:35
static void gatherBodyTocEntries(const QList< ContentBlock > &blocks, QList< NavigationInfo::TocEntry > &out)
Definition builder.cpp:16
InlineType
Combined button and popup list for selecting options.
@ Active
Definition status.h:14
QString cmakeComponent
Definition document.h:60
QString logicalModuleVersion
Definition document.h:57
QList< MemberEntry > members
Definition document.h:77
QJsonObject toJson() const
Converts the CollectionInfo to a QJsonObject for template rendering.
Definition document.cpp:99
QString qtVariable
Definition document.h:58
QList< MemberEntry > classes
Definition document.h:76
QString cmakePackage
Definition document.h:59
QString logicalModuleName
Definition document.h:56
QList< MemberEntry > namespaces
Definition document.h:75
QString cmakeTargetItem
Definition document.h:61
Represents a structural block element in documentation.
QList< ThreadSafetyExceptionEntry > reentrantExceptions
Definition document.h:113
QList< ThreadSafetyExceptionEntry > nonReentrantExceptions
Definition document.h:115
QList< ThreadSafetyExceptionEntry > threadSafeExceptions
Definition document.h:114
QList< SignatureSpan > templateDeclSpans
Definition document.h:134
std::optional< ThreadSafetyInfo > threadSafety
Definition document.h:150
QList< ContentBlock > threadSafetyAdmonition
Definition document.h:151
QList< ComparisonEntry > comparisonEntries
Definition document.h:148
QString cmakeTargetLinkLibraries
Definition document.h:125
QList< DerivedClassEntry > derivedClasses
Definition document.h:131
QStringList ancestorNames
Definition document.h:145
QString fullNamespaceModuleName
Definition document.h:142
QString cmakeFindPackage
Definition document.h:124
std::optional< QmlNativeTypeLink > qmlNativeType
Definition document.h:129
QString obsoleteMembersUrl
Definition document.h:156
QString fullNamespaceHref
Definition document.h:141
QList< GroupEntry > groups
Definition document.h:153
QString selfComparisonCategory
Definition document.h:147
QList< BaseClassEntry > baseClasses
Definition document.h:130
QJsonObject toJson() const
Converts CppReferenceInfo to a QJsonObject for template rendering.
Definition document.cpp:139
Intermediate representation for a documentation topic.
Definition document.h:197
QList< ContentBlock > body
Definition document.h:213
QString fullTitle
Definition document.h:206
QString membersPageUrl
Definition document.h:233
QList< SectionIR > summarySections
Definition document.h:217
std::optional< QmlTypeInfo > qmlTypeInfo
Definition document.h:221
QString url
Definition document.h:207
QList< SectionIR > detailSections
Definition document.h:218
std::optional< NavigationInfo > navigationInfo
Definition document.h:230
Access access
Definition document.h:202
QString title
Definition document.h:205
QString brief
Definition document.h:210
std::optional< CppReferenceInfo > cppReferenceInfo
Definition document.h:227
Status status
Definition document.h:201
QJsonObject contentJson
Definition document.h:214
NodeType nodeType
Definition document.h:199
QString deprecatedSince
Definition document.h:209
std::optional< CollectionInfo > collectionInfo
Definition document.h:224
QJsonObject toJson() const
Converts the Document to a QJsonObject for template rendering.
Definition document.cpp:356
QString since
Definition document.h:208
Genus genus
Definition document.h:200
Represents inline content within a documentation block.
std::optional< LinkEntry > nextLink
Definition document.h:188
QList< TocEntry > tocEntries
Definition document.h:190
QList< BreadcrumbEntry > breadcrumbs
Definition document.h:186
std::optional< LinkEntry > startLink
Definition document.h:189
std::optional< LinkEntry > previousLink
Definition document.h:187
QJsonObject toJson() const
Converts NavigationInfo to a QJsonObject for template rendering.
Definition document.cpp:291
std::optional< InheritsInfo > inherits
Definition document.h:37
QJsonObject toJson() const
Converts the QmlTypeInfo to a QJsonObject for template rendering.
Definition document.cpp:38
std::optional< NativeTypeInfo > nativeType
Definition document.h:49
QList< InheritedByEntry > inheritedBy
Definition document.h:43
QString importStatement
Definition document.h:28