42 #include "private/qdeclarativewatcher_p.h" 49 #include "private/qdeclarativeproperty_p.h" 50 #include "private/qdeclarativevaluetype_p.h" 52 #include <QtCore/qmetaobject.h> 53 #include <QtCore/qdebug.h> 103 static int refreshIdx = -1;
132 int propCount =
object->metaObject()->propertyCount();
133 for (
int ii=0; ii<propCount; ii++)
144 int index =
object->metaObject()->indexOfProperty(property.
constData());
188 #include <qdeclarativewatcher.moc> The QVariant class acts like a union for the most common Qt data types.
QDeclarativeWatcher * m_watch
void notifyValueChanged()
#define QT_END_NAMESPACE
This macro expands to.
static QObject * objectForId(int)
Returns the object for unique id.
The QByteArray class provides an array of bytes.
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
void addPropertyWatch(int id, QObject *object, quint32 objectId, const QMetaProperty &property)
static bool connect(QObject *sender, int signal_index, const QObject *receiver, int method_index, int type=0, int *types=0)
Connect sender signal_index to receiver method_index with the specified type and types.
QVariant evaluate(bool *valueIsUndefined=0)
Evaulates the expression, returning the result of the evaluation, or an invalid QVariant if the expre...
The QString class provides a Unicode character string.
T take(const Key &key)
Removes the item with the key from the hash and returns the value associated with it...
The QObject class is the base class of all Qt objects.
Q_DECLARATIVE_EXPORT QDeclarativeContext * qmlContext(const QObject *)
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
QHash< int, QList< QPointer< QDeclarativeWatchProxy > > > m_proxies
bool addWatch(int id, quint32 objectId)
void setNotifyOnValueChanged(bool)
Sets whether the valueChanged() signal is emitted when the expression's evaluated value changes...
void setParent(QObject *)
Makes the object a child of parent.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
QDeclarativeWatcher(QObject *=0)
const char * constData() const
Returns a pointer to the data stored in the byte array.
QDeclarativeExpression * m_expr
static bool isValueType(int)
QObject * parent() const
Returns a pointer to the parent object.
void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value)
friend class QDeclarativeWatchProxy
The QDeclarativeContext class defines a context within a QML engine.
QVariant property(const char *name) const
Returns the value of the object's name property.
QDeclarativeWatchProxy(int id, QObject *object, int debugId, const QMetaProperty &prop, QDeclarativeWatcher *parent=0)
The QDeclarativeExpression class evaluates JavaScript in a QML context.
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
The QList class is a template class that provides lists.