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
11QT_BEGIN_NAMESPACE
12
13namespace IR {
14
32
34{
36 QString text; //!< Text content
37 QString href; //!< Link target or image source
38 QString title; //!< Link tooltip or image alt text
39 QList<InlineContent> children; //!< Nested inline content
40 QJsonObject attributes; //!< Type-specific metadata (e.g., link state)
41
42 [[nodiscard]] QJsonObject toJson() const;
43 [[nodiscard]] QString plainText() const;
44};
45
68
70{
72 QJsonObject attributes; //!< Type-specific metadata
73 QList<InlineContent> inlineContent; //!< Rich inline content
74 QList<ContentBlock> children; //!< Nested blocks
75
76 [[nodiscard]] QJsonObject toJson() const;
77 [[nodiscard]] QString plainText() const;
78};
79
80} // namespace IR
81
82QT_END_NAMESPACE
83
84#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
BlockType
InlineType
Combined button and popup list for selecting options.
@ Public
Definition access.h:11
@ Active
Definition status.h:14
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 inline content or child blocks,...
QList< ContentBlock > children
Nested blocks.
Intermediate representation for a documentation topic.
Definition document.h:22
QList< ContentBlock > body
Definition document.h:38
QString fullTitle
Definition document.h:31
QString url
Definition document.h:32
Access access
Definition document.h:27
QString title
Definition document.h:30
QString brief
Definition document.h:35
Status status
Definition document.h:26
QJsonObject contentJson
Definition document.h:39
NodeType nodeType
Definition document.h:24
QString deprecatedSince
Definition document.h:34
QJsonObject toJson() const
Converts the Document to a QJsonObject for template rendering.
Definition document.cpp:129
QString since
Definition document.h:33
Genus genus
Definition document.h:25
Represents inline content within a documentation block.
QJsonObject attributes
Type-specific metadata (e.g., link state).
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.
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.