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
41 [[nodiscard]] QJsonObject toJson() const;
42 [[nodiscard]] QString plainText() const;
43};
44
66
68{
70 QJsonObject attributes; //!< Type-specific metadata
71 QList<InlineContent> inlineContent; //!< Rich inline content
72 QList<ContentBlock> children; //!< Nested blocks
73
74 [[nodiscard]] QJsonObject toJson() const;
75 [[nodiscard]] QString plainText() const;
76};
77
78} // namespace IR
79
80QT_END_NAMESPACE
81
82#endif // QDOC_IR_CONTENTBLOCK_H
Definition builder.cpp:14
static QString inlineTypeId(InlineType type)
static QString blockTypeId(BlockType type)
BlockType
InlineType
Combined button and popup list for selecting options.
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.
Represents inline content within a documentation block.
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.