![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Intermediate representation for a documentation topic. More...
#include <document.h>
Public Member Functions | |
| QJsonObject | toJson () const |
| Converts the Document to a QJsonObject for template rendering. | |
Public Attributes | |
| NodeType | nodeType { NodeType::NoType } |
| Genus | genus { Genus::DontCare } |
| Status | status { Status::Active } |
| Access | access { Access::Public } |
| QString | title |
| QString | fullTitle |
| QString | url |
| QString | since |
| QString | deprecatedSince |
| QString | brief |
| QList< ContentBlock > | body |
| QJsonObject | contentJson |
| QList< SectionIR > | summarySections |
| QList< SectionIR > | detailSections |
| std::optional< QmlTypeInfo > | qmlTypeInfo |
| std::optional< CollectionInfo > | collectionInfo |
| QString | membersPageUrl |
Intermediate representation for a documentation topic.
Document contains all information needed to render a single documentation page using templates. All links are pre-resolved, sections are pre-organized, and file paths are pre-computed. The template engine receives only this IR and performs no lookups or resolution itself.
The struct includes classification metadata (nodeType, genus, status, access) that allows templates to conditionally render content based on the type and visibility of the documented entity.
Definition at line 80 of file document.h.
| QJsonObject IR::Document::toJson | ( | ) | const |
Converts the Document to a QJsonObject for template rendering.
The JSON structure follows a convention where field names use camelCase and match template variable names. Classification fields (nodeType, genus, status, access) use a two-part structure with "id" (stable kebab-case identifier for conditionals) and "label" (human-readable display name).
The contentJson field is nested under a 'content' key to provide better structure and namespace separation in templates.
Returns a QJsonObject containing all IR data in a format suitable for passing to the Inja template engine via InjaBridge.
Definition at line 141 of file document.cpp.
| Access IR::Document::access { Access::Public } |
Definition at line 86 of file document.h.
Referenced by IR::Builder::buildPageIR().
| QList<ContentBlock> IR::Document::body |
Definition at line 97 of file document.h.
| QString IR::Document::brief |
Definition at line 94 of file document.h.
| std::optional<CollectionInfo> IR::Document::collectionInfo |
Definition at line 108 of file document.h.
| QJsonObject IR::Document::contentJson |
Definition at line 98 of file document.h.
| QString IR::Document::deprecatedSince |
Definition at line 93 of file document.h.
Definition at line 102 of file document.h.
| QString IR::Document::fullTitle |
Definition at line 90 of file document.h.
| Genus IR::Document::genus { Genus::DontCare } |
Definition at line 84 of file document.h.
Referenced by IR::Builder::buildPageIR().
| QString IR::Document::membersPageUrl |
Definition at line 111 of file document.h.
| NodeType IR::Document::nodeType { NodeType::NoType } |
Definition at line 83 of file document.h.
Referenced by IR::Builder::buildPageIR().
| std::optional<QmlTypeInfo> IR::Document::qmlTypeInfo |
Definition at line 105 of file document.h.
| QString IR::Document::since |
Definition at line 92 of file document.h.
| Status IR::Document::status { Status::Active } |
Definition at line 85 of file document.h.
Referenced by IR::Builder::buildPageIR().
Definition at line 101 of file document.h.
| QString IR::Document::title |
Definition at line 89 of file document.h.
| QString IR::Document::url |
Definition at line 91 of file document.h.