49 QQmlType(
const QQmlType &other);
50 QQmlType(QQmlType &&other);
51 QQmlType &operator =(
const QQmlType &other);
52 QQmlType &operator =(QQmlType &&other);
53 explicit QQmlType(
const QQmlTypePrivate *priv);
56 bool isValid()
const {
return !d.isNull(); }
58 QByteArray typeName()
const;
59 QString qmlTypeName()
const;
60 QString elementName()
const;
62 QHashedString module()
const;
63 QTypeRevision version()
const;
65 bool availableInVersion(QTypeRevision version)
const;
66 bool availableInVersion(
const QHashedStringRef &module, QTypeRevision version)
const;
68 typedef QVariant (*CreateValueTypeFunc)(
const QJSValue &);
69 CreateValueTypeFunc createValueTypeFunction()
const;
71 bool canConstructValueType()
const;
72 bool canPopulateValueType()
const;
74 QObject *create()
const;
75 QObject *create(
void **, size_t)
const;
76 QObject *createWithQQmlData()
const;
78 typedef void (*CreateFunc)(
void *,
void *);
79 CreateFunc createFunction()
const;
81 QQmlCustomParser *customParser()
const;
83 bool isCreatable()
const;
84 typedef QObject *(*ExtensionFunc)(QObject *);
85 ExtensionFunc extensionFunction()
const;
86 const QMetaObject *extensionMetaObject()
const;
87 bool isExtendedType()
const;
88 QString noCreationReason()
const;
90 bool isSingleton()
const;
91 bool isInterface()
const;
92 bool isComposite()
const;
93 bool isCompositeSingleton()
const;
94 bool isQObjectSingleton()
const;
95 bool isQJSValueSingleton()
const;
96 bool isSequentialContainer()
const;
97 bool isValueType()
const;
99 QMetaType typeId()
const;
100 QMetaType qListTypeId()
const;
101 QMetaSequence listMetaSequence()
const;
103 const QMetaObject *metaObject()
const;
106 const QMetaObject *metaObjectForValueType()
const;
108 const QMetaObject *baseMetaObject()
const;
109 QTypeRevision metaObjectRevision()
const;
110 bool containsRevisionedAttributes()
const;
112 QQmlAttachedPropertiesFunc attachedPropertiesFunction(QQmlTypeLoader *typeLoader)
const;
113 const QMetaObject *attachedPropertiesType(QQmlTypeLoader *typeLoader)
const;
115 int parserStatusCast()
const;
116 const char *interfaceIId()
const;
117 int propertyValueSourceCast()
const;
118 int propertyValueInterceptorCast()
const;
119 int finalizerCast()
const;
123 bool isInlineComponentType()
const;
125 struct Q_QML_EXPORT SingletonInstanceInfo final
126 :
public QQmlRefCounted<SingletonInstanceInfo>
128 using Ptr = QQmlRefPointer<SingletonInstanceInfo>;
129 using ConstPtr = QQmlRefPointer<
const SingletonInstanceInfo>;
131 static Ptr create() {
return Ptr(
new SingletonInstanceInfo, Ptr::Adopt); }
133 std::function<QJSValue(QQmlEngine *, QJSEngine *)> scriptCallback = {};
134 std::function<QObject *(QQmlEngine *, QJSEngine *)> qobjectCallback = {};
139 Q_DISABLE_COPY_MOVE(SingletonInstanceInfo)
140 SingletonInstanceInfo() =
default;
142 SingletonInstanceInfo::ConstPtr singletonInstanceInfo()
const;
144 QUrl sourceUrl()
const;
146 int enumValue(QQmlTypeLoader *typeLoader,
const QHashedStringRef &,
bool *ok)
const;
147 int enumValue(QQmlTypeLoader *typeLoader,
const QHashedCStringRef &,
bool *ok)
const;
148 int enumValue(QQmlTypeLoader *typeLoader,
const QV4::String *,
bool *ok)
const;
150 int scopedEnumIndex(QQmlTypeLoader *typeLoader,
const QV4::String *,
bool *ok)
const;
151 int scopedEnumIndex(QQmlTypeLoader *typeLoader,
const QString &,
bool *ok)
const;
152 int unscopedEnumIndex(QQmlTypeLoader *typeLoader,
const QV4::String *,
bool *ok)
const;
153 int unscopedEnumIndex(QQmlTypeLoader *typeLoader,
const QString &,
bool *ok)
const;
155 int scopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QV4::String *,
bool *ok)
const;
156 int scopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QString &,
bool *ok)
const;
157 int scopedEnumValue(QQmlTypeLoader *typeLoader,
const QHashedStringRef &,
const QHashedStringRef &,
bool *ok)
const;
159 int unscopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QV4::String *,
bool *ok)
const;
160 int unscopedEnumValue(QQmlTypeLoader *typeLoader,
int index,
const QString &,
bool *ok)
const;
161 int unscopedEnumValue(QQmlTypeLoader *typeLoader,
const QHashedStringRef &,
const QHashedStringRef &,
bool *ok)
const;
163 QString scopedEnumKey(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
164 QStringList scopedEnumKeys(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
166 QString unscopedEnumKey(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
167 QStringList unscopedEnumKeys(QQmlTypeLoader *typeLoader,
int index,
int value,
bool *ok)
const;
169 const QQmlTypePrivate *priv()
const {
return d.data(); }
170 static void refHandle(
const QQmlTypePrivate *priv);
171 static void derefHandle(
const QQmlTypePrivate *priv);
172 static int refCount(
const QQmlTypePrivate *priv);
174 enum RegistrationType {
179 CompositeSingletonType = 4,
180 InlineComponentType = 5,
181 SequentialContainerType = 6,
183 AnyRegistrationType = 255
186 void createProxy(QObject *instance)
const;
189 friend class QQmlTypePrivate;
190 friend size_t qHash(
const QQmlType &t, size_t seed);
191 friend bool operator==(
const QQmlType &a,
const QQmlType &b)
noexcept
193 return a.d.data() == b.d.data();
195 friend bool operator!=(
const QQmlType &a,
const QQmlType &b)
noexcept
200 QQmlRefPointer<
const QQmlTypePrivate> d;