10#include <private/qqmldebugservice_p.h>
11#include <private/qqmlproperty_p.h>
12#include <private/qqmlvaluetype_p.h>
14#include <QtCore/qmetaobject.h>
15#include <QtCore/qdebug.h>
71 static int refreshIdx = -1;
73 refreshIdx = QQmlWatchProxy::staticMetaObject.indexOfMethod(
"notifyValueChanged()");
85 v = m_property.
read(m_object);
99 int propCount =
object->metaObject()->propertyCount();
101 addPropertyWatch(
id,
object, debugId,
object->metaObject()->property(ii));
111 int index =
object->metaObject()->indexOfProperty(
property.constData());
113 addPropertyWatch(
id,
object, debugId,
object->metaObject()->property(
index));
126 exprObj->setNotifyOnValueChanged(
true);
128 exprObj->setParent(
proxy);
130 proxy->notifyValueChanged();
141 QList<QPointer<QQmlWatchProxy> > proxies = m_proxies.
take(
id);
151 proxy->notifyValueChanged();
156#include <qqmlwatcher.moc>
158#include "moc_qqmlwatcher.cpp"
T take(const Key &key)
Removes the item with the key from the hash and returns the value associated with it.
bool contains(const Key &key) const noexcept
Returns true if the hash contains an item with the key; otherwise returns false.
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QQmlContext class defines a context within a QML engine.
static QObject * objectForId(int id)
The QQmlExpression class evaluates JavaScript in a QML context.
void valueChanged()
Emitted each time the expression value changes from the last time it was evaluated.
QVariant evaluate(bool *valueIsUndefined=nullptr)
Evaulates the expression, returning the result of the evaluation, or an invalid QVariant if the expre...
static bool connect(const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type=0, int *types=nullptr)
Connect sender signal_index to receiver method_index with the specified type and types.
void notifyValueChanged()
QQmlWatchProxy(int id, QObject *object, int debugId, const QMetaProperty &prop, QQmlWatcher *parent=nullptr)
friend class QQmlWatchProxy
bool addWatch(int id, quint32 objectId)
void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
QQmlWatcher(QObject *=nullptr)
\macro QT_RESTRICTED_CAST_FROM_ASCII
qDeleteAll(list.begin(), list.end())
Combined button and popup list for selecting options.
GLsizei const GLfloat * v
[13]
GLenum GLuint GLsizei propCount
QQmlContext * qmlContext(const QObject *obj)