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
qqmldesignermetaobject_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// Qt-Security score:significant reason:default
4
5#ifndef NODEINSTANCEMETAOBJECT_H
6#define NODEINSTANCEMETAOBJECT_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
20
21#include <QQmlContext>
22#include <QScopedPointer>
23#include <private/qqmlopenmetaobject_p.h>
24#include <private/qqmlvmemetaobject_p.h>
25
26#include <QtCore/qpointer.h>
27
28#include <memory>
29
30QT_BEGIN_NAMESPACE
31
32struct MetaPropertyData;
33
35{
36public:
38
39 static void registerNotifyPropertyChangeCallBack(void (*callback)(QObject*, const QQuickDesignerSupport::PropertyName &propertyName));
40
41protected:
42 static QQmlDesignerMetaObject* getNodeInstanceMetaObject(QObject *object, QQmlEngine *engine);
43
44 void createNewDynamicProperty(const QString &name);
45 int createProperty(const char *name, const char *passAlong) override;
46 int openMetaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a);
47 int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) override;
48 void notifyPropertyChange(int id);
49 void setValue(int id, const QVariant &value);
50 QVariant propertyWriteValue(int, const QVariant &) override;
51
52 QObject *myObject() const { return object(); }
53
55
56 int propertyOffset() const;
57
58 int count() const;
59 QByteArray name(int) const;
60
61private:
62 QQmlDesignerMetaObject(QObject *object, QQmlEngine *engine);
63 void init(QObject *);
64
65 QQmlPropertyCache::Ptr cache() const;
66
67 QPointer<QQmlContext> m_context;
68 QScopedPointer<MetaPropertyData> m_data;
69
70 friend class QQuickDesignerSupportProperties;
71};
72
73QT_END_NAMESPACE
74
75#endif // NODEINSTANCEMETAOBJECT_H
int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) override
void createNewDynamicProperty(const QString &name)
static QQmlDesignerMetaObject * getNodeInstanceMetaObject(QObject *object, QQmlEngine *engine)
QDynamicMetaObjectData * dynamicMetaObjectParent() const
static void registerNotifyPropertyChangeCallBack(void(*callback)(QObject *, const QQuickDesignerSupport::PropertyName &propertyName))
void setValue(int id, const QVariant &value)
QVariant propertyWriteValue(int, const QVariant &) override
int createProperty(const char *name, const char *passAlong) override
int openMetaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a)
Combined button and popup list for selecting options.
static QT_BEGIN_NAMESPACE QHash< QDynamicMetaObjectData *, bool > nodeInstanceMetaObjectList
static void(* notifyPropertyChangeCallBack)(QObject *, const QQuickDesignerSupport::PropertyName &propertyName)
std::pair< QVariant, bool > & getDataRef(int idx)
bool hasData(int idx) const
QList< std::pair< QVariant, bool > > m_data
QVariant & getData(int idx)