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
82
84{
88 Access access { Access::Public };
89 };
90
95
100
106
111
118
123
133 bool suppressInheritance { false };
134
137
138 bool isInnerClass { false };
139 bool isNamespace { false };
140 bool isHeader { false };
141
142 bool isPartialNamespace { false };
145
148
151
154
156
157 bool hasObsoleteMembers { false };
159
160 [[nodiscard]] QJsonObject toJson() const;
161};
162
197
199{
200 // Classification
202 Genus genus { Genus::DontCare };
204 Access access { Access::Public };
205
206 // Identity
207 QString title; // Page title
208 QString fullTitle; // Full qualified title
209 QString url; // Page URL: canonical absolute when the
210 // 'url' qdocconf is set; output filename
211 // (relative) otherwise.
212 QString since; // Version introduced (e.g., "6.8")
213 QString deprecatedSince; // Version deprecated (e.g., "6.5")
214 QString brief; // Brief description
215
216 // Content
219
220 // Members (for aggregate pages)
223
224 // QML type metadata (populated only for QML type pages)
226
227 // Collection metadata (populated for module, QML module, and group pages)
229
230 // C++ reference metadata (populated for class, namespace, and header pages)
232
233 // Navigation metadata (populated for all pages with navigation config)
235
236 // Members sub-page URL (set when a members listing page is generated)
238
239 QJsonObject toJson() const;
240};
241
242} // namespace IR
243
244QT_END_NAMESPACE
245
246#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:154
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:78
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:77
QString cmakePackage
Definition document.h:59
QString logicalModuleName
Definition document.h:56
QList< MemberEntry > namespaces
Definition document.h:76
QString cmakeTargetItem
Definition document.h:61
Represents a structural block element in documentation.
QList< ThreadSafetyExceptionEntry > reentrantExceptions
Definition document.h:114
QList< ThreadSafetyExceptionEntry > nonReentrantExceptions
Definition document.h:116
QList< ThreadSafetyExceptionEntry > threadSafeExceptions
Definition document.h:115
QList< QString > referencedConcepts
Definition document.h:136
QList< SignatureSpan > templateDeclSpans
Definition document.h:135
std::optional< ThreadSafetyInfo > threadSafety
Definition document.h:152
QList< ContentBlock > threadSafetyAdmonition
Definition document.h:153
QList< ComparisonEntry > comparisonEntries
Definition document.h:150
QString cmakeTargetLinkLibraries
Definition document.h:126
QList< DerivedClassEntry > derivedClasses
Definition document.h:132
QStringList ancestorNames
Definition document.h:147
QString fullNamespaceModuleName
Definition document.h:144
QString cmakeFindPackage
Definition document.h:125
std::optional< QmlNativeTypeLink > qmlNativeType
Definition document.h:130
QString obsoleteMembersUrl
Definition document.h:158
QString fullNamespaceHref
Definition document.h:143
QList< GroupEntry > groups
Definition document.h:155
QString selfComparisonCategory
Definition document.h:149
QList< BaseClassEntry > baseClasses
Definition document.h:131
QJsonObject toJson() const
Converts CppReferenceInfo to a QJsonObject for template rendering.
Definition document.cpp:140
Intermediate representation for a documentation topic.
Definition document.h:199
QList< ContentBlock > body
Definition document.h:217
QString fullTitle
Definition document.h:208
QString membersPageUrl
Definition document.h:237
QList< SectionIR > summarySections
Definition document.h:221
std::optional< QmlTypeInfo > qmlTypeInfo
Definition document.h:225
QString url
Definition document.h:209
QList< SectionIR > detailSections
Definition document.h:222
std::optional< NavigationInfo > navigationInfo
Definition document.h:234
Access access
Definition document.h:204
QString title
Definition document.h:207
QString brief
Definition document.h:214
std::optional< CppReferenceInfo > cppReferenceInfo
Definition document.h:231
Status status
Definition document.h:203
QJsonObject contentJson
Definition document.h:218
NodeType nodeType
Definition document.h:201
QString deprecatedSince
Definition document.h:213
std::optional< CollectionInfo > collectionInfo
Definition document.h:228
QJsonObject toJson() const
Converts the Document to a QJsonObject for template rendering.
Definition document.cpp:362
QString since
Definition document.h:212
Genus genus
Definition document.h:202
LinkData(LinkOrigin o, LinkState s, std::optional< SourceLocation > loc=std::nullopt)
Represents inline content within a documentation block.
std::optional< LinkEntry > nextLink
Definition document.h:190
QList< TocEntry > tocEntries
Definition document.h:192
QList< BreadcrumbEntry > breadcrumbs
Definition document.h:188
std::optional< LinkEntry > startLink
Definition document.h:191
std::optional< LinkEntry > previousLink
Definition document.h:189
QJsonObject toJson() const
Converts NavigationInfo to a QJsonObject for template rendering.
Definition document.cpp:297
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