48 QQmlType(
const QQmlType &other);
49 QQmlType(QQmlType &&other);
50 QQmlType &operator =(
const QQmlType &other);
51 QQmlType &operator =(QQmlType &&other);
52 explicit QQmlType(
const QQmlTypePrivate *priv);
55 bool isValid()
const {
return !d.isNull(); }
57 QByteArray typeName()
const;
58 QString qmlTypeName()
const;
59 QString elementName()
const;
61 QHashedString module()
const;
62 QTypeRevision version()
const;
64 bool availableInVersion(QTypeRevision version)
const;
65 bool availableInVersion(
const QHashedStringRef &module, QTypeRevision version)
const;
67 typedef QVariant (*CreateValueTypeFunc)(
const QJSValue &);
68 CreateValueTypeFunc createValueTypeFunction()
const;
70 bool canConstructValueType()
const;
71 bool canPopulateValueType()
const;
73 QObject *create()
const;
74 QObject *create(
void **, size_t)
const;
75 QObject *createWithQQmlData()
const;
77 typedef void (*CreateFunc)(
void *,
void *);
78 CreateFunc createFunction()
const;
80 QQmlCustomParser *customParser()
const;
82 bool isCreatable()
const;
83 typedef QObject *(*ExtensionFunc)(QObject *);
84 ExtensionFunc extensionFunction()
const;
85 const QMetaObject *extensionMetaObject()
const;
86 bool isExtendedType()
const;
87 QString noCreationReason()
const;
89 bool isSingleton()
const;
90 bool isInterface()
const;
91 bool isComposite()
const;
92 bool isCompositeSingleton()
const;
93 bool isQObjectSingleton()
const;
94 bool isQJSValueSingleton()
const;
95 bool isSequentialContainer()
const;
96 bool isValueType()
const;
98 QMetaType typeId()
const;
99 QMetaType qListTypeId()
const;
100 QMetaSequence listMetaSequence()
const;
102 const QMetaObject *metaObject()
const;
105 const QMetaObject *metaObjectForValueType()
const;
107 const QMetaObject *baseMetaObject()
const;
108 QTypeRevision metaObjectRevision()
const;
109 bool containsRevisionedAttributes()
const;
111 QQmlAttachedPropertiesFunc attachedPropertiesFunction(QQmlTypeLoader *typeLoader)
const;
112 const QMetaObject *attachedPropertiesType(QQmlTypeLoader *typeLoader)
const;
114 int parserStatusCast()
const;
115 const char *interfaceIId()
const;
116 int propertyValueSourceCast()
const;
117 int propertyValueInterceptorCast()
const;
118 int finalizerCast()
const;
122 bool isInlineComponentType()
const;
124 struct Q_QML_EXPORT SingletonInstanceInfo final
125 :
public QQmlRefCounted<SingletonInstanceInfo>
127 using Ptr = QQmlRefPointer<SingletonInstanceInfo>;
128 using ConstPtr = QQmlRefPointer<
const SingletonInstanceInfo>;
130 static Ptr create() {
return Ptr(
new SingletonInstanceInfo, Ptr::Adopt); }
132 std::function<QJSValue(QQmlEngine *, QJSEngine *)> scriptCallback = {};
133 std::function<QObject *(QQmlEngine *, QJSEngine *)> qobjectCallback = {};
138 Q_DISABLE_COPY_MOVE(SingletonInstanceInfo)
139 SingletonInstanceInfo() =
default;
141 SingletonInstanceInfo::ConstPtr singletonInstanceInfo()
const;
143 QUrl sourceUrl()
const;
145 int enumValue(QQmlTypeLoader *typeLoader,
const QHashedStringRef &,
bool *ok)
const;
146 int enumValue(QQmlTypeLoader *typeLoader,
const QHashedCStringRef &,
bool *ok)
const;
147 int enumValue(QQmlTypeLoader *typeLoader,
const QV4::String *,
bool *ok)
const;
149 int scopedEnumIndex(QQmlTypeLoader *typeLoader,
const QV4::String *,
bool *ok)
const;
150 int scopedEnumIndex(QQmlTypeLoader *typeLoader,
const QString &,
bool *ok)
const;
151 int unscopedEnumIndex(QQmlTypeLoader *typeLoader,
const QV4::String *,
bool *ok)
const;
152 int unscopedEnumIndex(QQmlTypeLoader *typeLoader,
const QString &,
bool *ok)
const;
154 int scopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QV4::String *,
bool *ok)
const;
155 int scopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QString &,
bool *ok)
const;
156 int scopedEnumValue(QQmlTypeLoader *typeLoader,
const QHashedStringRef &,
const QHashedStringRef &,
bool *ok)
const;
158 int unscopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QV4::String *,
bool *ok)
const;
159 int unscopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QString &,
bool *ok)
const;
160 int unscopedEnumValue(QQmlTypeLoader *typeLoader,
const QHashedStringRef &,
const QHashedStringRef &,
bool *ok)
const;
162 QString scopedEnumKey(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
163 QStringList scopedEnumKeys(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
165 QString unscopedEnumKey(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
166 QStringList unscopedEnumKeys(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
168 const QQmlTypePrivate *priv()
const {
return d.data(); }
169 static void refHandle(
const QQmlTypePrivate *priv);
170 static void derefHandle(
const QQmlTypePrivate *priv);
171 static int refCount(
const QQmlTypePrivate *priv);
173 enum RegistrationType {
178 CompositeSingletonType = 4,
179 InlineComponentType = 5,
180 SequentialContainerType = 6,
182 AnyRegistrationType = 255
185 void createProxy(QObject *instance)
const;
188 friend class QQmlTypePrivate;
189 friend size_t qHash(
const QQmlType &t, size_t seed);
190 friend bool operator==(
const QQmlType &a,
const QQmlType &b)
noexcept
192 return a.d.data() == b.d.data();
194 friend bool operator!=(
const QQmlType &a,
const QQmlType &b)
noexcept
199 QQmlRefPointer<
const QQmlTypePrivate> d;