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
qqmlwatcher.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 QQMLWATCHER_H
5#define QQMLWATCHER_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/qobject.h>
19#include <QtCore/qlist.h>
20#include <QtCore/qhash.h>
21#include <QtCore/qset.h>
22#include <QtCore/qpointer.h>
23
25
26class QQmlWatchProxy;
27class QQmlExpression;
28class QQmlContext;
29class QMetaProperty;
30
31class QQmlWatcher : public QObject
32{
34public:
35 QQmlWatcher(QObject * = nullptr);
36
37 bool addWatch(int id, quint32 objectId);
38 bool addWatch(int id, quint32 objectId, const QByteArray &property);
39 bool addWatch(int id, quint32 objectId, const QString &expr);
40
41 bool removeWatch(int id);
42
45
46private:
47 friend class QQmlWatchProxy;
48 void addPropertyWatch(int id, QObject *object, quint32 objectId, const QMetaProperty &property);
49
50 QHash<int, QList<QPointer<QQmlWatchProxy> > > m_proxies;
51};
52
53QT_END_NAMESPACE
54
55#endif // QQMLWATCHER_H
qint64 writeData(const char *data, qint64 len) final
Writes up to maxSize bytes from data to the device.
qint64 readData(char *data, qint64 maxlen) final
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
void engineAboutToBeAdded(QJSEngine *) override
void messageReceived(const QByteArray &) override
void engineAboutToBeRemoved(QJSEngine *) override
QQmlDebugStatesDelegate * statesDelegate()
The QQmlProperty class abstracts accessing properties on objects created from QML.
bool removeWatch(int id)
bool addWatch(int id, quint32 objectId)
bool addWatch(int id, quint32 objectId, const QByteArray &property)
static bool isSaveable(const QVariant &value)
static bool hasValidSignal(QObject *object, const QString &propertyName)
QDataStream & operator>>(QDataStream &, QQmlEngineDebugServiceImpl::QQmlObjectProperty &)
QDataStream & operator>>(QDataStream &, QQmlEngineDebugServiceImpl::QQmlObjectData &)