4#ifndef QDOC_IR_CLASSIFICATIONJSON_H
5#define QDOC_IR_CLASSIFICATIONJSON_H
7#include "qdoc/access.h"
8#include "qdoc/genustypes.h"
9#include "qdoc/status.h"
18using namespace Qt::Literals::StringLiterals;
29 obj[
"label"_L1] = label;
39 case NodeType::Namespace:
40 return classificationObject(
"namespace"_L1,
"Namespace"_L1);
42 return classificationObject(
"class"_L1,
"Class"_L1);
43 case NodeType::Struct:
44 return classificationObject(
"struct"_L1,
"Struct"_L1);
46 return classificationObject(
"union"_L1,
"Union"_L1);
47 case NodeType::HeaderFile:
48 return classificationObject(
"header-file"_L1,
"Header file"_L1);
50 return classificationObject(
"page"_L1,
"Page"_L1);
52 return classificationObject(
"enum"_L1,
"Enum"_L1);
53 case NodeType::Example:
54 return classificationObject(
"example"_L1,
"Example"_L1);
55 case NodeType::ExternalPage:
56 return classificationObject(
"external-page"_L1,
"External page"_L1);
57 case NodeType::TypeAlias:
58 return classificationObject(
"type-alias"_L1,
"Type alias"_L1);
59 case NodeType::Typedef:
60 return classificationObject(
"typedef"_L1,
"Typedef"_L1);
61 case NodeType::Function:
62 return classificationObject(
"function"_L1,
"Function"_L1);
63 case NodeType::Property:
64 return classificationObject(
"property"_L1,
"Property"_L1);
66 return classificationObject(
"proxy"_L1,
"Proxy"_L1);
67 case NodeType::Variable:
68 return classificationObject(
"variable"_L1,
"Variable"_L1);
70 return classificationObject(
"group"_L1,
"Group"_L1);
71 case NodeType::Module:
72 return classificationObject(
"module"_L1,
"Module"_L1);
73 case NodeType::QmlType:
74 return classificationObject(
"qml-type"_L1,
"QML type"_L1);
75 case NodeType::QmlValueType:
76 return classificationObject(
"qml-value-type"_L1,
"QML value type"_L1);
77 case NodeType::QmlModule:
78 return classificationObject(
"qml-module"_L1,
"QML module"_L1);
79 case NodeType::QmlProperty:
80 return classificationObject(
"qml-property"_L1,
"QML property"_L1);
81 case NodeType::QmlEnum:
82 return classificationObject(
"qml-enum"_L1,
"QML enum"_L1);
83 case NodeType::SharedComment:
84 return classificationObject(
"shared-comment"_L1,
"Shared comment"_L1);
85 case NodeType::Collection:
86 return classificationObject(
"collection"_L1,
"Collection"_L1);
98 return classificationObject(
"cpp"_L1,
"C++"_L1);
100 return classificationObject(
"qml"_L1,
"QML"_L1);
102 return classificationObject(
"doc"_L1,
"Documentation"_L1);
104 return classificationObject(
"api"_L1,
"API"_L1);
113 case Status::Deprecated:
114 return classificationObject(
"deprecated"_L1,
"Deprecated"_L1);
115 case Status::Preliminary:
116 return classificationObject(
"preliminary"_L1,
"Preliminary"_L1);
118 return classificationObject(
"active"_L1,
"Active"_L1);
119 case Status::Internal:
120 return classificationObject(
"internal"_L1,
"Internal"_L1);
121 case Status::DontDocument:
122 return classificationObject(
"ignored"_L1,
"Ignored"_L1);
132 return classificationObject(
"public"_L1,
"Public"_L1);
133 case Access::Protected:
134 return classificationObject(
"protected"_L1,
"Protected"_L1);
135 case Access::Private:
136 return classificationObject(
"private"_L1,
"Private"_L1);
Status
Specifies the status of the QQmlIncubator.
QJsonObject accessToJson(Access a)
std::optional< QJsonObject > nodeTypeToJson(NodeType t)
std::optional< QJsonObject > genusToJson(Genus g)
static QJsonArray memberEntriesToJson(const QList< CollectionInfo::MemberEntry > &entries)
QJsonObject statusToJson(Status s)
QJsonObject classificationObject(const QString &id, const QString &label)
Combined button and popup list for selecting options.
QJsonObject toJson() const
Converts the CollectionInfo to a QJsonObject for template rendering.
Intermediate representation for a documentation topic.
QJsonObject toJson() const
Converts the Document to a QJsonObject for template rendering.
QJsonObject toJson() const
Converts the QmlTypeInfo to a QJsonObject for template rendering.