Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qqmltypewrapper_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QV8TYPEWRAPPER_P_H
5#define QV8TYPEWRAPPER_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/qglobal.h>
19#include <QtCore/qpointer.h>
20
21#include <private/qv4value_p.h>
22#include <private/qv4object_p.h>
23
25
27class QQmlType;
28class QQmlTypePrivate;
29struct QQmlImportRef;
30
31namespace QV4 {
32
33namespace Heap {
34
39 };
40
41 void init();
42 void destroy();
45
46 QQmlType type() const;
47
51};
52
54 void init() { Object::init(); }
55 void destroy();
58 QQmlType type() const;
59};
60
61}
62
63struct Q_QML_EXPORT QQmlTypeWrapper : Object
64{
67
68 bool isSingleton() const;
69 const QMetaObject *metaObject() const;
70 QObject *object() const;
71 QObject *singletonObject() const;
72
73 QVariant toVariant() const;
74
76 Heap::QQmlTypeWrapper::TypeNameMode = Heap::QQmlTypeWrapper::IncludeEnums);
78 Heap::QQmlTypeWrapper::TypeNameMode = Heap::QQmlTypeWrapper::IncludeEnums);
79
80 static ReturnedValue virtualResolveLookupGetter(const Object *object, ExecutionEngine *engine, Lookup *lookup);
81 static bool virtualResolveLookupSetter(Object *object, ExecutionEngine *engine, Lookup *lookup, const Value &value);
82 static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m, Value *target);
83 static int virtualMetacall(Object *object, QMetaObject::Call call, int index, void **a);
84
85 static ReturnedValue lookupSingletonProperty(Lookup *l, ExecutionEngine *engine, const Value &base);
86 static ReturnedValue lookupSingletonMethod(Lookup *l, ExecutionEngine *engine, const Value &base);
87 static ReturnedValue lookupEnumValue(Lookup *l, ExecutionEngine *engine, const Value &base);
88 static ReturnedValue lookupScopedEnum(Lookup *l, ExecutionEngine *engine, const Value &base);
89
90protected:
91 static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty);
92 static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver);
93 static PropertyAttributes virtualGetOwnProperty(const Managed *m, PropertyKey id, Property *p);
94 static bool virtualIsEqualTo(Managed *that, Managed *o);
95 static ReturnedValue virtualInstanceOf(const Object *typeObject, const Value &var);
96};
97
98struct Q_QML_EXPORT QQmlScopedEnumWrapper : Object
99{
102
103 static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty);
104};
105
106}
107
109
110#endif // QV8TYPEWRAPPER_P_H
111
\inmodule QtCore
Definition qobject.h:90
\inmodule QtCore
Definition qvariant.h:64
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
quint64 ReturnedValue
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const GLfloat * m
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint index
[2]
GLuint object
[3]
GLenum target
GLfloat GLfloat p
[1]
static QVariant toVariant(const QV4::Value &value, QMetaType typeHint, bool createJSValueForObjectsAndSymbols, V4ObjectSet *visitedObjects)
#define V4_NEEDS_DESTROY
#define V4_OBJECT2(DataClass, superClass)
obj metaObject() -> className()
view create()
QJSEngine engine
[0]
\inmodule QtCore
const QQmlTypePrivate * typePrivate
QQmlTypeNameCache * typeNamespace
const QQmlTypePrivate * typePrivate
const QQmlImportRef * importNamespace
QV4QPointer< QObject > object