summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlcomponent.cpp26
-rw-r--r--src/declarative/qml/qmlcustomparser.cpp44
-rw-r--r--src/declarative/qml/qmlmetaproperty.cpp40
3 files changed, 79 insertions, 31 deletions
diff --git a/src/declarative/qml/qmlcomponent.cpp b/src/declarative/qml/qmlcomponent.cpp
index 72d4e08..816260d 100644
--- a/src/declarative/qml/qmlcomponent.cpp
+++ b/src/declarative/qml/qmlcomponent.cpp
@@ -173,6 +173,9 @@ QmlComponent::~QmlComponent()
d->cc->release();
}
+/*!
+ Returns the component's current \l{QmlComponent::Status} {status}.
+ */
QmlComponent::Status QmlComponent::status() const
{
Q_D(const QmlComponent);
@@ -235,7 +238,8 @@ bool QmlComponent::isLoading() const
*/
/*!
- Create a QmlComponent with no data. Set setData().
+ Create a QmlComponent with no data and give it the specified
+ \a engine and \a parent. Set the data with setData().
*/
QmlComponent::QmlComponent(QmlEngine *engine, QObject *parent)
: QObject(*(new QmlComponentPrivate), parent)
@@ -245,7 +249,10 @@ QmlComponent::QmlComponent(QmlEngine *engine, QObject *parent)
}
/*!
- Create a QmlComponent from the given \a url.
+ Create a QmlComponent from the given \a url and give it the
+ specified \a parent and \a engine.
+
+ \sa loadUrl()
*/
QmlComponent::QmlComponent(QmlEngine *engine, const QUrl &url, QObject *parent)
: QObject(*(new QmlComponentPrivate), parent)
@@ -256,9 +263,12 @@ QmlComponent::QmlComponent(QmlEngine *engine, const QUrl &url, QObject *parent)
}
/*!
- Create a QmlComponent from the given QML \a data. If provided, \a url
- is used to set the component name, and to provide a base path for items
- resolved by this component.
+ Create a QmlComponent from the given QML \a data and give it the
+ specified \a parent. If \a url is provided, it is used to set
+ the component name, and to provide a base path for items resolved
+ by this component.
+
+ \sa setData()
*/
QmlComponent::QmlComponent(QmlEngine *engine, const QByteArray &data, const QUrl &url, QObject *parent)
: QObject(*(new QmlComponentPrivate), parent)
@@ -283,9 +293,9 @@ QmlComponent::QmlComponent(QmlEngine *engine, QmlCompiledComponent *cc, int star
}
/*!
- Sets the QmlComponent to use the given QML \a data. If provided,
- \a url is used to set the component name, and to provide a base path
- for items resolved by this component.
+ Sets the QmlComponent to use the given QML \a data. If \a url
+ is provided, it is used to set the component name and to provide
+ a base path for items resolved by this component.
*/
void QmlComponent::setData(const QByteArray &data, const QUrl &url)
{
diff --git a/src/declarative/qml/qmlcustomparser.cpp b/src/declarative/qml/qmlcustomparser.cpp
index 544c469..06035b0 100644
--- a/src/declarative/qml/qmlcustomparser.cpp
+++ b/src/declarative/qml/qmlcustomparser.cpp
@@ -52,11 +52,11 @@ using namespace QmlParser;
\brief The QmlCustomParser class allows you to add new arbitrary types to QML.
\internal
- By subclassing QmlCustomParser, you can add an XML parser for building a
- particular type.
+ By subclassing QmlCustomParser, you can add an XML parser for
+ building a particular type.
- The subclass must implement compile() and create(), and define itself in
- the meta type system with one of the macros:
+ The subclass must implement compile() and create(), and define
+ itself in the meta type system with one of the macros:
\code
QML_DEFINE_CUSTOM_PARSER(Name, parserClass)
@@ -67,33 +67,39 @@ using namespace QmlParser;
\endcode
*/
-/*!
+/*
\fn QByteArray QmlCustomParser::compile(QXmlStreamReader& reader, bool *ok)
- Upon entry to this function, \a reader is positioned on a QXmlStreamReader::StartElement
- with the name specified when the class was defined with the QML_DEFINE_CUSTOM_PARSER macro.
+ Upon entry to this function, \a reader is positioned on a
+ QXmlStreamReader::StartElement with the name specified when the
+ class was defined with the QML_DEFINE_CUSTOM_PARSER macro.
- The custom parser must consume tokens from \a reader until the EndElement matching the
- initial start element is reached, or until error.
+ The custom parser must consume tokens from \a reader until the
+ EndElement matching the initial start element is reached, or until
+ error.
On return, \c *ok indicates success.
- The returned QByteArray contains data meaningful only to the custom parser; the
- type engine will pass this same data to create() when making an instance of the data.
+ The returned QByteArray contains data meaningful only to the
+ custom parser; the type engine will pass this same data to
+ create() when making an instance of the data.
- The QByteArray may be cached between executions of the system, so it must contain
- correctly-serialized data (not, for example, pointers to stack objects).
+ The QByteArray may be cached between executions of the system, so
+ it must contain correctly-serialized data (not, for example,
+ pointers to stack objects).
*/
-/*!
+/*
\fn QVariant QmlCustomParser::create(const QByteArray &data)
- This function returns a QVariant containing the value represented by \a data, which
- is a block of data previously returned by a call to compile().
+ This function returns a QVariant containing the value represented
+ by \a data, which is a block of data previously returned by a call
+ to compile().
- If the compile is for a type, the variant should be a pointer to the
- correctly-named QObject subclass (i.e. the one defined by QML_DEFINE_TYPE for
- the same-named type as this custom parser is defined for).
+ If the compile is for a type, the variant should be a pointer to
+ the correctly-named QObject subclass (i.e. the one defined by
+ QML_DEFINE_TYPE for the same-named type as this custom parser is
+ defined for).
*/
QmlCustomParserNode
diff --git a/src/declarative/qml/qmlmetaproperty.cpp b/src/declarative/qml/qmlmetaproperty.cpp
index 1a511eb..14a45dc 100644
--- a/src/declarative/qml/qmlmetaproperty.cpp
+++ b/src/declarative/qml/qmlmetaproperty.cpp
@@ -261,6 +261,33 @@ QmlMetaProperty::QmlMetaProperty(const QmlMetaProperty &other)
}
/*!
+ \enum QmlMetaProperty::PropertyCategory
+
+ This enum specifies a category of QML property.
+
+ \value Unknown
+ \value InvalidProperty
+ \value Bindable
+ \value List
+ \value QmlList
+ \value Object
+ \value Normal
+ */
+
+/*!
+ \enum QmlMetaProperty::Type
+
+ This enum specifies a type of QML property.
+
+ \value Invalid
+ \value Property
+ \value SignalProperty
+ \value Signal
+ \value Default
+ \value Attached
+*/
+
+/*!
Returns the property category.
*/
QmlMetaProperty::PropertyCategory QmlMetaProperty::propertyCategory() const
@@ -472,13 +499,17 @@ QStringList QmlMetaProperty::properties(QObject *obj)
}
/*!
- Return the name of this property.
+ Return the name of this QML property.
*/
QString QmlMetaProperty::name() const
{
return d->name;
}
+/*!
+ Returns the \l{QMetaProperty} {Qt property} associated with
+ this QML property.
+ */
const QMetaProperty &QmlMetaProperty::property() const
{
return d->prop;
@@ -1037,9 +1068,10 @@ quint32 QmlMetaProperty::save() const
}
/*!
- Restore a QmlMetaProperty from a previously saved id. \a obj must be the
- same object as used in the previous call to QmlMetaProperty::save(). Only
- the bottom 24-bits are used, the high bits can be set to any value.
+ Restore a QmlMetaProperty from a previously saved \a id.
+ \a obj must be the same object as used in the previous call
+ to QmlMetaProperty::save(). Only the bottom 24-bits are
+ used, the high bits can be set to any value.
*/
void QmlMetaProperty::restore(quint32 id, QObject *obj)
{