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
qqmltyperegistrarconstants_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 QQMLTYPEREGISTRARCONSTANTS_P_H
5#define QQMLTYPEREGISTRARCONSTANTS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/qlatin1stringview.h>
19
21
22namespace Constants {
23
24// Strings that commonly occur in .qmltypes files.
25namespace DotQmltypes {
26static constexpr QLatin1StringView S_ACCESS_SEMANTICS { "accessSemantics" };
27static constexpr QLatin1StringView S_ALIAS { "alias" };
28static constexpr QLatin1StringView S_ALIASES { "aliases" };
29static constexpr QLatin1StringView S_ARGUMENTS { "arguments" };
30static constexpr QLatin1StringView S_ATTACHED_TYPE { "attachedType" };
31static constexpr QLatin1StringView S_BINDABLE { "bindable" };
32static constexpr QLatin1StringView S_COMPONENT { "Component" };
33static constexpr QLatin1StringView S_DEFAULT_PROPERTY { "defaultProperty" };
34static constexpr QLatin1StringView S_DEFERRED_NAMES { "deferredNames" };
35static constexpr QLatin1StringView S_ENFORCES_SCOPED_ENUMS { "enforcesScopedEnums" };
36static constexpr QLatin1StringView S_ENUM { "Enum" };
37static constexpr QLatin1StringView S_EXPORTS { "exports" };
38static constexpr QLatin1StringView S_EXPORT_META_OBJECT_REVISIONS { "exportMetaObjectRevisions" };
39static constexpr QLatin1StringView S_EXTENSION { "extension" };
40static constexpr QLatin1StringView S_EXTENSION_IS_JAVA_SCRIPT { "extensionIsJavaScript" };
41static constexpr QLatin1StringView S_EXTENSION_IS_NAMESPACE { "extensionIsNamespace" };
42static constexpr QLatin1StringView S_FILE { "file" };
43static constexpr QLatin1StringView S_HAS_CUSTOM_PARSER { "hasCustomParser" };
44static constexpr QLatin1StringView S_IMMEDIATE_NAMES { "immediateNames" };
45static constexpr QLatin1StringView S_INDEX { "index" };
46static constexpr QLatin1StringView S_INTERFACES { "interfaces" };
47static constexpr QLatin1StringView S_IS_CLONED { "isCloned" };
48static constexpr QLatin1StringView S_IS_CONSTRUCTOR { "isConstructor" };
49static constexpr QLatin1StringView S_IS_CREATABLE { "isCreatable" };
50static constexpr QLatin1StringView S_IS_FINAL { "isFinal" };
51static constexpr QLatin1StringView S_IS_FLAG { "isFlag" };
52static constexpr QLatin1StringView S_IS_JAVASCRIPT_BUILTIN { "isJavaScriptBuiltin" };
53static constexpr QLatin1StringView S_IS_JAVASCRIPT_FUNCTION { "isJavaScriptFunction" };
54static constexpr QLatin1StringView S_IS_LIST { "isList" };
55static constexpr QLatin1StringView S_IS_METHOD_CONSTANT { "isMethodConstant" };
56static constexpr QLatin1StringView S_IS_POINTER { "isPointer" };
57static constexpr QLatin1StringView S_IS_PROPERTY_CONSTANT { "isPropertyConstant" };
58static constexpr QLatin1StringView S_IS_READONLY { "isReadonly" };
59static constexpr QLatin1StringView S_IS_REQUIRED { "isRequired" };
60static constexpr QLatin1StringView S_IS_SCOPED { "isScoped" };
61static constexpr QLatin1StringView S_IS_SINGLETON { "isSingleton" };
62static constexpr QLatin1StringView S_IS_STRUCTURED { "isStructured" };
63static constexpr QLatin1StringView S_IS_TYPE_CONSTANT { "isTypeConstant" };
64static constexpr QLatin1StringView S_LINE_NUMBER { "lineNumber" };
65static constexpr QLatin1StringView S_METHOD { "Method" };
66static constexpr QLatin1StringView S_MODULE { "Module" };
67static constexpr QLatin1StringView S_NAME { "name" };
68static constexpr QLatin1StringView S_NONE { "none" };
69static constexpr QLatin1StringView S_NOTIFY { "notify" };
70static constexpr QLatin1StringView S_PARAMETER { "Parameter" };
71static constexpr QLatin1StringView S_PARENT_PROPERTY { "parentProperty" };
72static constexpr QLatin1StringView S_PRIVATE_CLASS { "privateClass" };
73static constexpr QLatin1StringView S_PROPERTY { "Property" };
74static constexpr QLatin1StringView S_PROTOTYPE { "prototype" };
75static constexpr QLatin1StringView S_READ { "read" };
76static constexpr QLatin1StringView S_REFERENCE { "reference" };
77static constexpr QLatin1StringView S_RESET { "reset" };
78static constexpr QLatin1StringView S_REVISION { "revision" };
79static constexpr QLatin1StringView S_SEQUENCE { "sequence" };
80static constexpr QLatin1StringView S_SIGNAL { "Signal" };
81static constexpr QLatin1StringView S_TYPE { "type" };
82static constexpr QLatin1StringView S_VALUE { "value" };
83static constexpr QLatin1StringView S_VALUES { "values" };
84static constexpr QLatin1StringView S_VALUE_TYPE { "valueType" };
85static constexpr QLatin1StringView S_WRITE { "write" };
86}
87
88// Strings that commonly occur in metatypes.json files.
90static constexpr QLatin1StringView S_ACCESS { "access" };
91static constexpr QLatin1StringView S_ALIAS { "alias" };
92static constexpr QLatin1StringView S_ANONYMOUS { "anonymous" };
93static constexpr QLatin1StringView S_ARGUMENTS { "arguments" };
94static constexpr QLatin1StringView S_AUTO { "auto" };
95static constexpr QLatin1StringView S_BINDABLE { "bindable" };
96static constexpr QLatin1StringView S_CLASSES { "classes" };
97static constexpr QLatin1StringView S_CLASS_INFOS { "classInfos" };
98static constexpr QLatin1StringView S_CLASS_NAME { "className" };
99static constexpr QLatin1StringView S_CONSTANT { "constant" };
100static constexpr QLatin1StringView S_CONSTRUCT { "construct" };
101static constexpr QLatin1StringView S_CONSTRUCTORS { "constructors" };
102static constexpr QLatin1StringView S_DEFAULT_PROPERTY { "DefaultProperty" };
103static constexpr QLatin1StringView S_DEFERRED_PROPERTY_NAMES { "DeferredPropertyNames" };
104static constexpr QLatin1StringView S_ENUMS { "enums" };
105static constexpr QLatin1StringView S_FALSE { "false" };
106static constexpr QLatin1StringView S_FINAL { "final" };
107static constexpr QLatin1StringView S_GADGET { "gadget" };
108static constexpr QLatin1StringView S_IMMEDIATE_PROPERTY_NAMES { "ImmediatePropertyNames" };
109static constexpr QLatin1StringView S_INDEX { "index" };
110static constexpr QLatin1StringView S_INPUT_FILE { "inputFile" };
111static constexpr QLatin1StringView S_INTERFACES { "interfaces" };
112static constexpr QLatin1StringView S_IS_CLASS { "isClass" };
113static constexpr QLatin1StringView S_IS_CLONED { "isCloned" };
114static constexpr QLatin1StringView S_IS_CONST { "isConst" };
115static constexpr QLatin1StringView S_IS_CONSTRUCTOR { "isConstructor" };
116static constexpr QLatin1StringView S_IS_FLAG { "isFlag" };
117static constexpr QLatin1StringView S_IS_JAVASCRIPT_FUNCTION { "isJavaScriptFunction" };
118static constexpr QLatin1StringView S_LINENUMBER { "lineNumber" };
119static constexpr QLatin1StringView S_MEMBER { "member" };
120static constexpr QLatin1StringView S_METHOD { "method" };
121static constexpr QLatin1StringView S_METHODS { "methods" };
122static constexpr QLatin1StringView S_NAME { "name" };
123static constexpr QLatin1StringView S_NAMESPACE { "namespace" };
124static constexpr QLatin1StringView S_NOTIFY { "notify" };
125static constexpr QLatin1StringView S_OBJECT { "object" };
126static constexpr QLatin1StringView S_PARENT_PROPERTY { "ParentProperty" };
127static constexpr QLatin1StringView S_PRIVATE { "private" };
128static constexpr QLatin1StringView S_PRIVATE_CLASS { "privateClass" };
129static constexpr QLatin1StringView S_PROPERTIES { "properties" };
130static constexpr QLatin1StringView S_PROPERTY { "property" };
131static constexpr QLatin1StringView S_PROTECTED { "protected" };
132static constexpr QLatin1StringView S_PUBLIC { "public" };
133static constexpr QLatin1StringView S_QUALIFIED_CLASS_NAME { "qualifiedClassName" };
134static constexpr QLatin1StringView S_READ { "read" };
135
137 "RegisterEnumClassesUnscoped"
138};
139
140static constexpr QLatin1StringView S_REQUIRED { "required" };
141static constexpr QLatin1StringView S_RESET { "reset" };
142static constexpr QLatin1StringView S_RETURN_TYPE { "returnType" };
143static constexpr QLatin1StringView S_REVISION { "revision" };
144static constexpr QLatin1StringView S_SIGNALS { "signals" };
145static constexpr QLatin1StringView S_SLOTS { "slots" };
146static constexpr QLatin1StringView S_STRUCTURED { "structured" };
147static constexpr QLatin1StringView S_SUPER_CLASSES { "superClasses" };
148static constexpr QLatin1StringView S_TRUE { "true" };
149static constexpr QLatin1StringView S_TYPE { "type" };
150static constexpr QLatin1StringView S_VALUE { "value" };
151static constexpr QLatin1StringView S_VALUES { "values" };
152static constexpr QLatin1StringView S_WRITE { "write" };
153
154// QML-Related Strings that commonly occur in metatypes.json files.
155namespace Qml {
156static constexpr QLatin1StringView S_ADDED_IN_VERSION { "QML.AddedInVersion" };
157static constexpr QLatin1StringView S_ATTACHED { "QML.Attached" };
158static constexpr QLatin1StringView S_CREATABLE { "QML.Creatable" };
159static constexpr QLatin1StringView S_CREATION_METHOD { "QML.CreationMethod" };
160static constexpr QLatin1StringView S_ELEMENT { "QML.Element" };
161static constexpr QLatin1StringView S_EXTENDED { "QML.Extended" };
162static constexpr QLatin1StringView S_EXTENSION_IS_JAVA_SCRIPT { "QML.ExtensionIsJavaScript" };
163static constexpr QLatin1StringView S_EXTENSION_IS_NAMESPACE { "QML.ExtensionIsNamespace" };
164static constexpr QLatin1StringView S_FOREIGN { "QML.Foreign" };
165static constexpr QLatin1StringView S_FOREIGN_IS_NAMESPACE { "QML.ForeignIsNamespace" };
166static constexpr QLatin1StringView S_HAS_CUSTOM_PARSER { "QML.HasCustomParser" };
167static constexpr QLatin1StringView S_PRIMITIVE_ALIAS { "QML.PrimitiveAlias" };
168static constexpr QLatin1StringView S_REMOVED_IN_VERSION { "QML.RemovedInVersion" };
169static constexpr QLatin1StringView S_ROOT { "QML.Root" };
170static constexpr QLatin1StringView S_SEQUENCE { "QML.Sequence" };
171static constexpr QLatin1StringView S_SINGLETON { "QML.Singleton" };
172static constexpr QLatin1StringView S_UNCREATABLE_REASON { "QML.UncreatableReason" };
173static constexpr QLatin1StringView S_USING { "QML.Using" };
174} // namespace Qml
175
176} // namespace MetatypesJson
177
178}
179
180QT_END_NAMESPACE
181
182#endif // QQMLTYPEREGISTRARCONSTANTS_P_H
Access
Definition access.h:11
const Method::Container & constructors() const
const Enum::Container & enums() const
QAnyStringView qualifiedClassName() const
const Method::Container & sigs() const
const Method::Container & methods() const
const ClassInfo::Container & classInfos() const
friend bool operator!=(const MetaType &a, const MetaType &b) noexcept
const BaseType::Container & superClasses() const
MetaType()=default
QAnyStringView className() const
QString inputFile() const
const Interface::Container & ifaces() const
const Property::Container & properties() const
MetaType(const QCborMap &cbor, const QString &inputFile)
friend bool operator==(const MetaType &a, const MetaType &b) noexcept
bool processForeignTypes(const QString &foreignTypesFile)
static QList< QAnyStringView > namespaces(const MetaType &classDef)
QList< QString > includes() const
bool processTypes(const QStringList &files)
QList< UsingDeclaration > usingDeclarations() const
QVector< MetaType > foreignTypes() const
QList< QAnyStringView > referencedTypes() const
QVector< MetaType > types() const
MetaTypesJsonProcessor(bool privateIncludes)
static constexpr QLatin1StringView S_FILE
static constexpr QLatin1StringView S_EXTENSION_IS_JAVA_SCRIPT
static constexpr QLatin1StringView S_NOTIFY
static constexpr QLatin1StringView S_SIGNAL
static constexpr QLatin1StringView S_IS_SINGLETON
static constexpr QLatin1StringView S_IS_CONSTRUCTOR
static constexpr QLatin1StringView S_ACCESS_SEMANTICS
static constexpr QLatin1StringView S_IS_READONLY
static constexpr QLatin1StringView S_IS_PROPERTY_CONSTANT
static constexpr QLatin1StringView S_REFERENCE
static constexpr QLatin1StringView S_ENUM
static constexpr QLatin1StringView S_IS_TYPE_CONSTANT
static constexpr QLatin1StringView S_READ
static constexpr QLatin1StringView S_VALUE_TYPE
static constexpr QLatin1StringView S_PROPERTY
static constexpr QLatin1StringView S_INDEX
static constexpr QLatin1StringView S_IS_CREATABLE
static constexpr QLatin1StringView S_RESET
static constexpr QLatin1StringView S_TYPE
static constexpr QLatin1StringView S_MODULE
static constexpr QLatin1StringView S_PARAMETER
static constexpr QLatin1StringView S_IS_LIST
static constexpr QLatin1StringView S_LINE_NUMBER
static constexpr QLatin1StringView S_IS_CLONED
static constexpr QLatin1StringView S_IS_REQUIRED
static constexpr QLatin1StringView S_IMMEDIATE_NAMES
static constexpr QLatin1StringView S_WRITE
static constexpr QLatin1StringView S_IS_JAVASCRIPT_FUNCTION
static constexpr QLatin1StringView S_EXPORTS
static constexpr QLatin1StringView S_REVISION
static constexpr QLatin1StringView S_DEFAULT_PROPERTY
static constexpr QLatin1StringView S_DEFERRED_NAMES
static constexpr QLatin1StringView S_METHOD
static constexpr QLatin1StringView S_IS_POINTER
static constexpr QLatin1StringView S_ARGUMENTS
static constexpr QLatin1StringView S_ALIAS
static constexpr QLatin1StringView S_VALUES
static constexpr QLatin1StringView S_IS_FLAG
static constexpr QLatin1StringView S_ALIASES
static constexpr QLatin1StringView S_COMPONENT
static constexpr QLatin1StringView S_PROTOTYPE
static constexpr QLatin1StringView S_EXPORT_META_OBJECT_REVISIONS
static constexpr QLatin1StringView S_VALUE
static constexpr QLatin1StringView S_IS_METHOD_CONSTANT
static constexpr QLatin1StringView S_ATTACHED_TYPE
static constexpr QLatin1StringView S_IS_FINAL
static constexpr QLatin1StringView S_HAS_CUSTOM_PARSER
static constexpr QLatin1StringView S_PARENT_PROPERTY
static constexpr QLatin1StringView S_PRIVATE_CLASS
static constexpr QLatin1StringView S_EXTENSION_IS_NAMESPACE
static constexpr QLatin1StringView S_IS_SCOPED
static constexpr QLatin1StringView S_NONE
static constexpr QLatin1StringView S_BINDABLE
static constexpr QLatin1StringView S_EXTENSION
static constexpr QLatin1StringView S_IS_STRUCTURED
static constexpr QLatin1StringView S_ENFORCES_SCOPED_ENUMS
static constexpr QLatin1StringView S_NAME
static constexpr QLatin1StringView S_SEQUENCE
static constexpr QLatin1StringView S_INTERFACES
static constexpr QLatin1StringView S_IS_JAVASCRIPT_BUILTIN
static constexpr QLatin1StringView S_UNCREATABLE_REASON
static constexpr QLatin1StringView S_ATTACHED
static constexpr QLatin1StringView S_FOREIGN
static constexpr QLatin1StringView S_SEQUENCE
static constexpr QLatin1StringView S_PRIMITIVE_ALIAS
static constexpr QLatin1StringView S_USING
static constexpr QLatin1StringView S_FOREIGN_IS_NAMESPACE
static constexpr QLatin1StringView S_EXTENDED
static constexpr QLatin1StringView S_SINGLETON
static constexpr QLatin1StringView S_HAS_CUSTOM_PARSER
static constexpr QLatin1StringView S_EXTENSION_IS_NAMESPACE
static constexpr QLatin1StringView S_EXTENSION_IS_JAVA_SCRIPT
static constexpr QLatin1StringView S_REMOVED_IN_VERSION
static constexpr QLatin1StringView S_ELEMENT
static constexpr QLatin1StringView S_CREATION_METHOD
static constexpr QLatin1StringView S_ADDED_IN_VERSION
static constexpr QLatin1StringView S_CREATABLE
static constexpr QLatin1StringView S_ROOT
static constexpr QLatin1StringView S_VALUE
static constexpr QLatin1StringView S_PROTECTED
static constexpr QLatin1StringView S_ANONYMOUS
static constexpr QLatin1StringView S_SIGNALS
static constexpr QLatin1StringView S_QUALIFIED_CLASS_NAME
static constexpr QLatin1StringView S_NAME
static constexpr QLatin1StringView S_SUPER_CLASSES
static constexpr QLatin1StringView S_DEFERRED_PROPERTY_NAMES
static constexpr QLatin1StringView S_LINENUMBER
static constexpr QLatin1StringView S_TYPE
static constexpr QLatin1StringView S_INPUT_FILE
static constexpr QLatin1StringView S_STRUCTURED
static constexpr QLatin1StringView S_CONSTRUCTORS
static constexpr QLatin1StringView S_TRUE
static constexpr QLatin1StringView S_PRIVATE_CLASS
static constexpr QLatin1StringView S_ARGUMENTS
static constexpr QLatin1StringView S_PARENT_PROPERTY
static constexpr QLatin1StringView S_CONSTANT
static constexpr QLatin1StringView S_ACCESS
static constexpr QLatin1StringView S_ALIAS
static constexpr QLatin1StringView S_REGISTER_ENUM_CLASSES_UNSCOPED
static constexpr QLatin1StringView S_REQUIRED
static constexpr QLatin1StringView S_IS_JAVASCRIPT_FUNCTION
static constexpr QLatin1StringView S_CLASS_NAME
static constexpr QLatin1StringView S_NOTIFY
static constexpr QLatin1StringView S_CLASS_INFOS
static constexpr QLatin1StringView S_RETURN_TYPE
static constexpr QLatin1StringView S_RESET
static constexpr QLatin1StringView S_MEMBER
static constexpr QLatin1StringView S_IS_CONSTRUCTOR
static constexpr QLatin1StringView S_REVISION
static constexpr QLatin1StringView S_PUBLIC
static constexpr QLatin1StringView S_SLOTS
static constexpr QLatin1StringView S_PROPERTIES
static constexpr QLatin1StringView S_IS_CLONED
static constexpr QLatin1StringView S_DEFAULT_PROPERTY
static constexpr QLatin1StringView S_FALSE
static constexpr QLatin1StringView S_IS_CLASS
static constexpr QLatin1StringView S_IS_CONST
static constexpr QLatin1StringView S_VALUES
static constexpr QLatin1StringView S_READ
static constexpr QLatin1StringView S_GADGET
static constexpr QLatin1StringView S_CLASSES
static constexpr QLatin1StringView S_FINAL
static constexpr QLatin1StringView S_ENUMS
static constexpr QLatin1StringView S_IS_FLAG
static constexpr QLatin1StringView S_INDEX
static constexpr QLatin1StringView S_WRITE
static constexpr QLatin1StringView S_IMMEDIATE_PROPERTY_NAMES
static constexpr QLatin1StringView S_PRIVATE
static constexpr QLatin1StringView S_PROPERTY
static constexpr QLatin1StringView S_METHODS
static constexpr QLatin1StringView S_CONSTRUCT
static constexpr QLatin1StringView S_INTERFACES
static constexpr QLatin1StringView S_AUTO
static constexpr QLatin1StringView S_METHOD
static constexpr QLatin1StringView S_NAMESPACE
static constexpr QLatin1StringView S_BINDABLE
static constexpr QLatin1StringView S_OBJECT
qsizetype lastIndexOf(QAnyStringView whole, QLatin1StringView part)
bool contains(QAnyStringView whole, QLatin1Char part)
QAnyStringView trimmed(QAnyStringView string)
int toInt(QUtf8StringView view)
QAnyStringView doTrimmed(StringView string)
auto processAsUtf8(StringView string, Handler &&handler)
bool endsWith(QAnyStringView whole, QLatin1StringView part)
qsizetype getLastIndexOf(QStringView whole, QLatin1StringView part)
bool doesContain(QStringView whole, QLatin1Char part)
bool startsWith(QAnyStringView whole, QLatin1StringView part)
QList< QAnyStringView > split(QAnyStringView source, QLatin1StringView sep)
static Access getAccess(const QCborMap &cbor)
static QCborValue fromJson(const QByteArray &json, QJsonParseError *error)
static QLatin1StringView typeRelationString(TypeRelation relation)
static void sortStringList(QList< String > *list)
static QTypeRevision getRevision(const QCborMap &cbor)
static bool qualifiedClassNameLessThan(const MetaType &a, const MetaType &b)
static size_t qHash(QAnyStringView string, size_t seed=0)
@ Public
Definition access.h:11
@ Private
Definition access.h:11
@ Protected
Definition access.h:11
QDebug warning(const MetaType &classDef)
QAnyStringView name
Argument(const QCborMap &cbor)
Argument()=default
QAnyStringView type
BaseType()=default
QAnyStringView name
BaseType(const QCborMap &cbor)
ClassInfo()=default
QAnyStringView value
QAnyStringView name
ClassInfo(const QCborMap &cbor)
QAnyStringView alias
QAnyStringView name
QList< QAnyStringView > values
Enum(const QCborMap &cbor)
Enum()=default
QAnyStringView type
Interface(const QCborValue &cbor)
QAnyStringView className
Interface()=default
MetaTypePrivate()=default
MetaTypePrivate(const QCborMap &cbor, const QString &inputFile)
ClassInfo::Container classInfos
BaseType::Container superClasses
Property::Container properties
Interface::Container ifaces
QAnyStringView qualifiedClassName
Method::Container constructors
QAnyStringView name
Method()=default
QAnyStringView returnType
Argument::Container arguments
Method(const QCborMap &cbor, bool isConstructor)
QTypeRevision revision
static constexpr int InvalidIndex
QAnyStringView write
QAnyStringView notify
QAnyStringView read
QAnyStringView privateClass
Property(const QCborMap &cbor)
QAnyStringView name
QAnyStringView member
QAnyStringView type
Property()=default
QAnyStringView reset
QAnyStringView bindable
QTypeRevision revision
friend bool comparesEqual(const UsingDeclaration &a, const UsingDeclaration &b) noexcept
friend Qt::strong_ordering compareThreeWay(const UsingDeclaration &a, const UsingDeclaration &b) noexcept