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
IR::SharedDetailGroup Struct Reference

One documentation body and see-also list shared by a group of members. More...

#include <member.h>

Collaboration diagram for IR::SharedDetailGroup:

Public Member Functions

QJsonObject toJson () const
 \variable IR::SharedDetailGroup::firstIndex Zero-based index of the group's first member in the section's member list.

Public Attributes

int firstIndex { -1 }
int count { 0 }
Status status { Status::Active }
bool isPlural { false }
QString anchorId
QString deprecatedSince
QString typeNoun
QString deprecatedSinceQualified
QList< ContentBlock > body
QList< ContentBlock > alsoList

Detailed Description

One documentation body and see-also list shared by a group of members.

SharedDetailGroup captures the detail content that a group of members documented by a single shared comment (a SharedCommentNode) all share: one body and one see-also list, rendered once for the whole group.

The group references its members positionally: firstIndex is the zero-based index of the group's first member in the section's member list, and count is the number of members it covers. Member identity, synopses, anchors, and per-member fields stay in the section's flat member list, which keeps ordinary member JSON unchanged; members of the group carry the group's index in their sharedGroup field instead of the shared body and see-also content.

The lookup context the shared content was authored in (the SharedCommentNode) is deliberately not part of this IR; the extractor keeps it outside the template-facing representation.

JSON output always emits firstIndex, count, body, and alsoList, the latter two even when empty, so that templates can index a group positionally and guard only on array length. The group's status sentence uses status and isPlural, with the noun and version fields emitted only when nonempty. The anchorId key is emitted only when nonempty; anonymous groups carry no key at all.

Definition at line 35 of file member.h.

Member Function Documentation

◆ toJson()

QJsonObject IR::SharedDetailGroup::toJson ( ) const
nodiscard

\variable IR::SharedDetailGroup::firstIndex Zero-based index of the group's first member in the section's member list.

Negative when the group is not populated.

\variable IR::SharedDetailGroup::count Number of section members the group covers.

\variable IR::SharedDetailGroup::status The status of the shared comment, rather than any individual child.

\variable IR::SharedDetailGroup::isPlural Whether the group describes multiple members. Named property groups describe one entity and remain singular.

\variable IR::SharedDetailGroup::anchorId The page fragment the group itself is reachable at, such as font-prop for a named QML property group. Empty when the group has no anchor of its own (an anonymous shared comment) or when the fragment is already owned by another destination on the page. The group's children keep their own anchorId values.

\variable IR::SharedDetailGroup::deprecatedSince The plain version used in a scheduled-deprecation sentence.

\variable IR::SharedDetailGroup::typeNoun The singular or plural type noun used in the group's status sentence.

\variable IR::SharedDetailGroup::deprecatedSinceQualified The deprecation version, prefixed with the logical module name for QML.

\variable IR::SharedDetailGroup::body The documentation body authored on the shared comment.

\variable IR::SharedDetailGroup::alsoList The see-also list authored on the shared comment.

Converts the shared detail group to a QJsonObject for template rendering.

Always emits firstIndex and count, and both the body and alsoList arrays, which may be empty. The anchorId key is omitted when empty.

Definition at line 195 of file member.cpp.

Member Data Documentation

◆ alsoList

QList<ContentBlock> IR::SharedDetailGroup::alsoList

Definition at line 49 of file member.h.

◆ anchorId

QString IR::SharedDetailGroup::anchorId

Definition at line 44 of file member.h.

◆ body

QList<ContentBlock> IR::SharedDetailGroup::body

Definition at line 48 of file member.h.

◆ count

int IR::SharedDetailGroup::count { 0 }

Definition at line 37 of file member.h.

◆ deprecatedSince

QString IR::SharedDetailGroup::deprecatedSince

Definition at line 45 of file member.h.

◆ deprecatedSinceQualified

QString IR::SharedDetailGroup::deprecatedSinceQualified

Definition at line 47 of file member.h.

◆ firstIndex

int IR::SharedDetailGroup::firstIndex { -1 }

Definition at line 36 of file member.h.

◆ isPlural

bool IR::SharedDetailGroup::isPlural { false }

Definition at line 39 of file member.h.

◆ status

Status IR::SharedDetailGroup::status { Status::Active }

Definition at line 38 of file member.h.

◆ typeNoun

QString IR::SharedDetailGroup::typeNoun

Definition at line 46 of file member.h.


The documentation for this struct was generated from the following files: