summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeproperty.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-26 06:47:50 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-26 06:48:18 (GMT)
commitbd0f827713187c95df3a5cf0e496fe18a1489971 (patch)
tree3398d43454de67649968cad38238ffad40d8941d /src/declarative/qml/qdeclarativeproperty.cpp
parent1156821731078b0f0b31066632de091754bc6d52 (diff)
downloadQt-bd0f827713187c95df3a5cf0e496fe18a1489971.zip
Qt-bd0f827713187c95df3a5cf0e496fe18a1489971.tar.gz
Qt-bd0f827713187c95df3a5cf0e496fe18a1489971.tar.bz2
Doc
Diffstat (limited to 'src/declarative/qml/qdeclarativeproperty.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeproperty.cpp50
1 files changed, 45 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
index 9ed760e..e1ec2cd 100644
--- a/src/declarative/qml/qdeclarativeproperty.cpp
+++ b/src/declarative/qml/qdeclarativeproperty.cpp
@@ -311,10 +311,10 @@ QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other)
This enum specifies a category of QML property.
- \value InvalidCategory The property is invalid.
- \value List The property is a QList pointer
+ \value InvalidCategory The property is invalid, or is a signal property.
+ \value List The property is a QDeclarativeListProperty list property
\value Object The property is a QObject derived type pointer
- \value Normal The property is none of the above.
+ \value Normal The property is a normal value property.
*/
/*!
@@ -752,18 +752,39 @@ QVariant QDeclarativeProperty::read() const
return QVariant();
}
+/*!
+Return the \a name property value of \a object. This method is equivalent to:
+\code
+ QDeclarativeProperty p(object, name);
+ p.read();
+\endcode
+*/
QVariant QDeclarativeProperty::read(QObject *object, const QString &name)
{
QDeclarativeProperty p(object, name);
return p.read();
}
+/*!
+Return the \a name property value of \a object. This method is equivalent to:
+\code
+ QDeclarativeProperty p(object, name, context);
+ p.read();
+\endcode
+*/
QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDeclarativeContext *ctxt)
{
QDeclarativeProperty p(object, name, ctxt);
return p.read();
}
+/*!
+Return the \a name property value of \a object. This method is equivalent to:
+\code
+ QDeclarativeProperty p(object, name, engine);
+ p.read();
+\endcode
+*/
QVariant QDeclarativeProperty::read(QObject *object, const QString &name, QDeclarativeEngine *engine)
{
QDeclarativeProperty p(object, name, engine);
@@ -802,9 +823,7 @@ QVariant QDeclarativePropertyPrivate::readValueProperty()
}
}
-//###
//writeEnumProperty MIRRORS the relelvant bit of QMetaProperty::write AND MUST BE KEPT IN SYNC!
-//###
bool QDeclarativePropertyPrivate::writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, const QVariant &value, int flags)
{
if (!object || !prop.isWritable())
@@ -1054,12 +1073,26 @@ bool QDeclarativeProperty::write(const QVariant &value) const
return QDeclarativePropertyPrivate::write(*this, value, 0);
}
+/*!
+Writes \a value to the \a name property of \a object. This method is equivalent to:
+\code
+ QDeclarativeProperty p(object, name);
+ p.write(value);
+\endcode
+*/
bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVariant &value)
{
QDeclarativeProperty p(object, name);
return p.write(value);
}
+/*!
+Writes \a value to the \a name property of \a object. This method is equivalent to:
+\code
+ QDeclarativeProperty p(object, name, ctxt);
+ p.write(value);
+\endcode
+*/
bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVariant &value,
QDeclarativeContext *ctxt)
{
@@ -1067,6 +1100,13 @@ bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVa
return p.write(value);
}
+/*!
+Writes \a value to the \a name property of \a object. This method is equivalent to:
+\code
+ QDeclarativeProperty p(object, name, engine);
+ p.write(value);
+\endcode
+*/
bool QDeclarativeProperty::write(QObject *object, const QString &name, const QVariant &value,
QDeclarativeEngine *engine)
{