Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlenginedebugservice.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 QQMLENGINEDEBUGSERVICE_H
5#define QQMLENGINEDEBUGSERVICE_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 <private/qqmldebugservice_p.h>
19#include <private/qqmldebugserviceinterfaces_p.h>
20
21#include <QtCore/qurl.h>
22#include <QtCore/qvariant.h>
23#include <QtCore/QPointer>
24
26
27class QQmlEngine;
28class QQmlContext;
29class QQmlWatcher;
30class QDataStream;
32
34{
36public:
39
51
61
62 void engineAboutToBeAdded(QJSEngine *) override;
63 void engineAboutToBeRemoved(QJSEngine *) override;
64 void objectCreated(QJSEngine *, QObject *) override;
65
67 {
68 if (!m_statesDelegate)
69 m_statesDelegate = createStatesDelegate();
70 return m_statesDelegate;
71 }
72
75
76protected:
77 void messageReceived(const QByteArray &) override;
78
79private:
81
82 void processMessage(const QByteArray &msg);
83 void propertyChanged(qint32 id, qint32 objectId, const QMetaProperty &property,
84 const QVariant &value);
85
86 void prepareDeferredObjects(QObject *);
87 void buildObjectList(QDataStream &, QQmlContext *,
88 const QList<QPointer<QObject> > &instances);
89 void buildObjectDump(QDataStream &, QObject *, bool, bool);
90 void buildStatesList(bool cleanList, const QList<QPointer<QObject> > &instances);
91 QQmlObjectData objectData(QObject *);
92 QQmlObjectProperty propertyData(QObject *, int);
93 QVariant valueContents(QVariant defaultValue) const;
94 bool setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename = QString(), int line = -1, int column = 0);
95 bool resetBinding(int objectId, const QString &propertyName);
96 bool setMethodBody(int objectId, const QString &method, const QString &body);
97 void storeObjectIds(QObject *co);
98 QList<QObject *> objectForLocationInfo(const QString &filename, int lineNumber,
99 int columnNumber);
100
101 QList<QJSEngine *> m_engines;
102 QQmlWatcher *m_watch;
103 QQmlDebugStatesDelegate *m_statesDelegate;
104};
109
111
112#endif // QQMLENGINEDEBUGSERVICE_H
113
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore\reentrant
Definition qdatastream.h:46
The QJSEngine class provides an environment for evaluating JavaScript code.
Definition qjsengine.h:26
Definition qlist.h:75
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
void objectCreated(QJSEngine *, QObject *) override
void engineAboutToBeAdded(QJSEngine *) override
void messageReceived(const QByteArray &) override
QQmlEngineDebugServiceImpl(QObject *=nullptr)
void scheduleMessage(const QByteArray &)
void engineAboutToBeRemoved(QJSEngine *) override
QQmlDebugStatesDelegate * statesDelegate()
The QQmlEngine class provides an environment for instantiating QML components.
Definition qqmlengine.h:57
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLenum GLsizei void GLsizei void * column
QDataStream & operator<<(QDataStream &, const QQmlEngineDebugServiceImpl::QQmlObjectData &)
QDataStream & operator>>(QDataStream &, QQmlEngineDebugServiceImpl::QQmlObjectData &)
#define Q_OBJECT
#define Q_SIGNALS
int qint32
Definition qtypes.h:49
const char property[13]
Definition qwizard.cpp:101
Definition moc.h:23