aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorChris Adams <christopher.adams@nokia.com>2012-07-17 12:19:31 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-19 10:02:40 +0200
commitb523301a668e6c6cc5fc93440842ad063066f12b (patch)
tree236d84bdd510a7d64f6a5cc08699da2ecd0246be /src/qml/doc
parent9fe378497773dc2b8682b8c49375c7d913de5f8d (diff)
Add documentation about property value modifiers
Previously, property value modifiers were only documented in QtQuick, when really they are a QtQml module / QML language feature. This commit also improves the QtQuick documentation for convenience types, and rearranges some links and content for improved consistency. Change-Id: Ic4dbe0b8bb85bdfbb8ac2f336c13c2960f8d1842 Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/cppclasses/topic.qdoc10
-rw-r--r--src/qml/doc/src/cppclasses/valuesource.qdoc36
-rw-r--r--src/qml/doc/src/qtqml.qdoc3
-rw-r--r--src/qml/doc/src/typesystem/topic.qdoc50
4 files changed, 99 insertions, 0 deletions
diff --git a/src/qml/doc/src/cppclasses/topic.qdoc b/src/qml/doc/src/cppclasses/topic.qdoc
index 64f02c985b..93d7bb3190 100644
--- a/src/qml/doc/src/cppclasses/topic.qdoc
+++ b/src/qml/doc/src/cppclasses/topic.qdoc
@@ -77,4 +77,14 @@ See \l{qtqml-cppclasses-expression.html}
{Qt QML Module C++ Classes - QQmlExpression} for in depth information about
QQmlExpression.
+\section1 The QQmlPropertyValueSource Class
+
+The QQmlPropertyValueSource class is an abstract class which may be inherited
+to provide unique \l{qtqml-typesystem-topic.html#property-modifier-types}
+{property value sources}.
+
+See \l{qtqml-cppclasses-valuesource.html}
+{Qt QML Module C++ Classes - QQmlPropertyValueSource} for in depth information
+about QQmlPropertyValueSource.
+
*/
diff --git a/src/qml/doc/src/cppclasses/valuesource.qdoc b/src/qml/doc/src/cppclasses/valuesource.qdoc
new file mode 100644
index 0000000000..92c8c3acd1
--- /dev/null
+++ b/src/qml/doc/src/cppclasses/valuesource.qdoc
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qtqml-cppclasses-valuesource.html
+\title Qt QML Module C++ Classes - QQmlPropertyValueSource
+\brief Description of QQmlPropertyValueSource
+
+QQmlPropertyValueSource may be inherited by client-defined classes to provide
+a custom property value source kind of property value modifier.
+
+*/
diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc
index 7bb3453271..be4232eab1 100644
--- a/src/qml/doc/src/qtqml.qdoc
+++ b/src/qml/doc/src/qtqml.qdoc
@@ -75,6 +75,8 @@ types, animation classes, and canvas integration) for the QML language.
\li \l{qtqml-cppclasses-engine.html}{QQmlEngine}
\li \l{qtqml-cppclasses-context.html}{QQmlContext}
\li \l{qtqml-cppclasses-component.html}{QQmlComponent}
+ \li \l{qtqml-cppclasses-expression.html}{QQmlExpression}
+ \li \l{qtqml-cppclasses-valuesource.html}{QQmlPropertyValueSource}
\endlist
\li \l{qtqml-typesystem-topic.html}{The QML Type System}
@@ -86,6 +88,7 @@ types, animation classes, and canvas integration) for the QML language.
\li \l{qtqml-documents-definetypes.html}{Defining Object Types from QML}
\li \l{qtqml-cppintegration-registercpptypes.html}{Defining Object Types from C++}
\endlist
+ \li \l{qtqml-typesystem-topic.html#property-modifier-types}{Property Modifier Types}
\endlist
\li \l{qtqml-modules-topic.html}{QML Modules}
diff --git a/src/qml/doc/src/typesystem/topic.qdoc b/src/qml/doc/src/typesystem/topic.qdoc
index 1de87b542d..e12873547e 100644
--- a/src/qml/doc/src/typesystem/topic.qdoc
+++ b/src/qml/doc/src/typesystem/topic.qdoc
@@ -98,4 +98,54 @@ re-used in other QML documents. See the documentation about
\l{qtqml-typesystem-objecttypes.html}{object types in the QML type system} for
in-depth information about object types.
+\section1 Property Modifier Types
+
+A property modifier type is a special kind of QML object type. A property
+modifier type instance affects a property (of a QML object instance) which it
+is applied to. There are two different kinds of property modifier types:
+\list
+\li property value write interceptors
+\li property value sources
+\endlist
+
+A property value write interceptor can be used to filter or modify values as
+they are written to properties. Currently, the only supported property
+value write interceptor is the \l Behavior type provided by the \c QtQuick
+import.
+
+A property value source can be used to automatically update the value of a
+property over time. Clients can define their own property value source types.
+The various \l{qtquick-statesanimations-animations.html}{property animation}
+types provided by the \c QtQuick import are examples of property value
+sources.
+
+Property modifier type instances can be created and applied to a property of
+a QML object through the "<ModifierType> on <propertyName>" syntax, as the
+following example shows:
+
+\qml
+import QtQuick 2.0
+
+Item {
+ width: 400
+ height: 50
+
+ Rectangle {
+ width: 50
+ height: 50
+ color: "red"
+
+ NumberAnimation on x {
+ from: 0
+ to: 350
+ loops: Animation.Infinite
+ duration: 2000
+ }
+ }
+}
+\endqml
+
+See the documentation on \l QQmlPropertyValueSource for information about how
+to define your own property value source types.
+
*/