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
contentblock.h
Go to the documentation of this file.
1// Copyright (C) 2026 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_CONTENTBLOCK_H
5#define QDOC_IR_CONTENTBLOCK_H
6
7#include <QJsonObject>
8#include <QList>
9#include <QString>
10
11#include <optional>
12
13QT_BEGIN_NAMESPACE
14
15namespace IR {
16
34
35enum class LinkOrigin : unsigned char {
38};
39
48
50{
52 QString text; //!< Text content
53 QString href; //!< Link target or image source
54 QString title; //!< Link tooltip or image alt text
55 QList<InlineContent> children; //!< Nested inline content
56 QJsonObject attributes; //!< Type-specific metadata
57
62 std::optional<LinkData> link;
63
64 [[nodiscard]] QJsonObject toJson() const;
65 [[nodiscard]] QString plainText() const;
66};
67
93
95{
97 QJsonObject attributes; //!< Type-specific metadata
98 QList<InlineContent> inlineContent; //!< Rich inline content
99 QList<ContentBlock> children; //!< Nested blocks
100
101 [[nodiscard]] QJsonObject toJson() const;
102 [[nodiscard]] QString plainText() const;
103};
104
105} // namespace IR
106
107QT_END_NAMESPACE
108
109#endif // QDOC_IR_CONTENTBLOCK_H
Access
Definition access.h:11
Assembles IR Documents from pre-extracted metadata.
Definition builder.h:15
Builder()=default
Document buildPageIR(PageMetadata pm) const
Definition builder.cpp:59
Status
Specifies the status of the QQmlIncubator.
NodeType
Definition genustypes.h:150
Definition builder.cpp:14
LinkState
LinkOrigin
BlockType
InlineType
Combined button and popup list for selecting options.
@ Public
Definition access.h:11
@ Active
Definition status.h:14
QString cmakeComponent
Definition document.h:58
QString logicalModuleVersion
Definition document.h:55
QList< MemberEntry > members
Definition document.h:75
QJsonObject toJson() const
Converts the CollectionInfo to a QJsonObject for template rendering.
Definition document.cpp:99
QString qtVariable
Definition document.h:56
QList< MemberEntry > classes
Definition document.h:74
QString cmakePackage
Definition document.h:57
QString logicalModuleName
Definition document.h:54
QList< MemberEntry > namespaces
Definition document.h:73
QString cmakeTargetItem
Definition document.h:59
Represents a structural block element in documentation.
QJsonObject toJson() const
Converts the ContentBlock to a QJsonObject for template rendering.
QList< InlineContent > inlineContent
Rich inline content.
QJsonObject attributes
Type-specific metadata.
QString plainText() const
Returns the concatenated plain text of this block's content, recursively.
QList< ContentBlock > children
Nested blocks.
Intermediate representation for a documentation topic.
Definition document.h:81
QList< ContentBlock > body
Definition document.h:97
QString fullTitle
Definition document.h:90
QString membersPageUrl
Definition document.h:111
QList< SectionIR > summarySections
Definition document.h:101
std::optional< QmlTypeInfo > qmlTypeInfo
Definition document.h:105
QString url
Definition document.h:91
QList< SectionIR > detailSections
Definition document.h:102
Access access
Definition document.h:86
QString title
Definition document.h:89
QString brief
Definition document.h:94
Status status
Definition document.h:85
QJsonObject contentJson
Definition document.h:98
NodeType nodeType
Definition document.h:83
QString deprecatedSince
Definition document.h:93
std::optional< CollectionInfo > collectionInfo
Definition document.h:108
QJsonObject toJson() const
Converts the Document to a QJsonObject for template rendering.
Definition document.cpp:141
QString since
Definition document.h:92
Genus genus
Definition document.h:84
Represents inline content within a documentation block.
QJsonObject attributes
Type-specific metadata.
QString href
Link target or image source.
QJsonObject toJson() const
Converts the InlineContent to a QJsonObject for template rendering.
QString text
Text content.
QList< InlineContent > children
Nested inline content.
std::optional< LinkData > link
QString title
Link tooltip or image alt text.
QString plainText() const
Returns the concatenated plain text of this inline element and all its children, recursively.
std::optional< InheritsInfo > inherits
Definition document.h:35
QJsonObject toJson() const
Converts the QmlTypeInfo to a QJsonObject for template rendering.
Definition document.cpp:38
std::optional< NativeTypeInfo > nativeType
Definition document.h:47
QList< InheritedByEntry > inheritedBy
Definition document.h:41
QString importStatement
Definition document.h:26