diff options
author | Chris Adams <christopher.adams@nokia.com> | 2012-07-17 12:19:31 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-19 10:02:40 +0200 |
commit | b523301a668e6c6cc5fc93440842ad063066f12b (patch) | |
tree | 236d84bdd510a7d64f6a5cc08699da2ecd0246be /src/quick/doc/src/concepts | |
parent | 9fe378497773dc2b8682b8c49375c7d913de5f8d (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/quick/doc/src/concepts')
4 files changed, 105 insertions, 129 deletions
diff --git a/src/quick/doc/src/concepts/convenience/topic.qdoc b/src/quick/doc/src/concepts/convenience/topic.qdoc new file mode 100644 index 0000000000..ad70b9a990 --- /dev/null +++ b/src/quick/doc/src/concepts/convenience/topic.qdoc @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** 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 qtquick-convenience-topic.html +\title Important Concepts In Qt Quick - Convenience Types +\brief Overview of the convenience types for QML core features + +In a highly dynamic user interface, the application developer will often wish +to react to events and trigger various response logic. QML has built-in +support for these concepts through bindings, signals and signal handlers, and +dynamic object instantiation, but Qt Quick expands upon the support +provided by the language with various convenience types. + +\section1 Dynamic Object Instantiation + +QML provides a number of ways to dynamically create and manage QML objects. + +Objects can be created dynamically from within imperative JavaScript code +in various ways. See \l{qtqml-javascript-dynamicobjectcreation.html} +{Dynamic QML object creation from JavaScript} for more details. + +Qt Quick provides the \l{Loader}, \l{Repeater}, \l{ListView}, \l{GridView} and +\l{PathView} types which also support dynamic object management, and provide +a declarative API. + +Please see the \l{qtquick-performance.html}{performance guide} for more +information on using dynamic instantiation and lazy initialization to improve +application performance. + +\section1 Dynamic Bindings + +Assigning binding expressions to properties is a fundamental concept of QML, +and Qt Quick extends upon the idea with the \l Binding type. While bindings +are typically specified as property initialization assignments, the \l Binding +type allows the target of a binding to be defined explicitly and separately +from the definition of the binding expression itself. +By declaring a \l Binding instance, the client can dynamically bind properties +from arbitrary objects at run-time, and can modify the binding target when +required (or when it becomes available). + +\section1 Dynamic Signal Connections + +QML supports dynamic signal connections through a signal's \c{connect()} +method. The QtQuick module provides the convenience \l Connections type which +allows setting up a signal connection involving an object which isn't part of +the static object hierarchy. It also allows the connection to be dynamically +retargeted at runtime, which allows an application to process different signal +notifications with different functions depending on the program state. + +By declaring a \l Connections instance, the client can dynamically cause +signals emitted by one object to trigger methods of another object, and can +modify the connection target when required (or when it becomes available). + +\section1 Timer-Based Events + +Another common use-case is to trigger functionality some specified period of +time after a particular event occurs. These sort of timer-based triggers are +supported in Qt Quick through the \l Timer type. Both single-shot and +recurring timers are supported. + +*/ + diff --git a/src/quick/doc/src/concepts/dynamicinstantiation/topic.qdoc b/src/quick/doc/src/concepts/dynamicinstantiation/topic.qdoc deleted file mode 100644 index 4040a63655..0000000000 --- a/src/quick/doc/src/concepts/dynamicinstantiation/topic.qdoc +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -** -** 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 qtquick-dynamicinstantiation-topic.html -\title Important Concepts In Qt Quick - Dynamic and Lazy Instantiation -\brief Overview of the dynamic and lazy instantiation concepts - -QML provides a number of ways to dynamically create and manage QML objects. -The \l{Loader}, \l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView} elements -all support dynamic object management. - -Objects can be created and deleted at runtime from JavaScript code. See -\l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML object creation from JavaScript} -for more details. - -Qt Quick also provides the Loader type which may be used in conjuction with a -Component or a QML document to instantiate objects lazily and on-demand. -Please see the \l{qtquick-performance.html}{performance guide} for more -information on using dynamic instantiation and lazy initialization to improve -application performance. - -*/ - diff --git a/src/quick/doc/src/concepts/eventinterceptors/topic.qdoc b/src/quick/doc/src/concepts/eventinterceptors/topic.qdoc deleted file mode 100644 index f6d2e7fe14..0000000000 --- a/src/quick/doc/src/concepts/eventinterceptors/topic.qdoc +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** 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 qtquick-eventinterceptors-topic.html -\title Important Concepts In Qt Quick - Event Interceptors -\brief Overview of event interceptor concepts - -In a highly dynamic user-interface, the application developer will often wish -to intercept some events (such as property assignments) so that the change can -be animated. Interceptors are a first-class concept in Qt Quick, and -application developers can dynamically intercept property assignments and -signal emissions, and define dynamic bindings. - -\section1 Animating Property Assignments - -When the location of a visual item changes, it is often suboptimal to simply -change the location instantaneously. It may be better to animate the update -to allow the user's eye to follow the change, thus providing a seamless -user-experience. See the documentation on -\l{qtquick-concepts-interceptors.html#animating-property-assignments} -{Animating Property Assignments} for more information about property assignment -interception. - -\section1 Dynamic Bindings - -Assigning binding expressions to properties is a fundamental concept of QML, -and Qt Quick extends upon the idea with dynamic bindings where the target of -the binding can be defined outside of the binding expression itself. See the -\l{qtquick-concepts-interceptors.html#dynamic-bindings}{Dynamic Bindings} page -for more information about this concept. - -\section1 Dynamic Signal Connections - -Just as bindings can be retargeted dynamically in Qt Quick, so too can signal -connections. This allows highly dynamic dispatch to be implemented in a user -interface where different visual items need to handle different events, -depending on the situation, at run-time. See the documentation about -\l{qtquick-concepts-interceptors.html#dynamic-signal-connections} -{Dynamic Signal Connections} for in-depth information. - -\section1 Timer-Based Events - -*/ - diff --git a/src/quick/doc/src/concepts/statesanimations/topic.qdoc b/src/quick/doc/src/concepts/statesanimations/topic.qdoc index 8ca02fd444..25b0958162 100644 --- a/src/quick/doc/src/concepts/statesanimations/topic.qdoc +++ b/src/quick/doc/src/concepts/statesanimations/topic.qdoc @@ -89,22 +89,28 @@ and transition elements. See the documentation on {Animations and Transitions In Qt Quick} for information about these elements and how to use them. -Animations are not only related to states and transitions between states; for + +\section1 Animating Property Assignments + +Animations are not only related to states and transitions between states. For example, an animation might be triggered by other events, which are not -associated with a distinct state. It is often beneficial to always animate -changes to certain properties of visual items, regardless of the cause of the -change (for example, opacity effects). +associated with a distinct state. + +It is often beneficial to always animate changes to certain properties of +visual items, regardless of the cause of the change (for example, opacity +effects). Qt Quick provides the \l Behavior type which allows the client to +specify animation behavior for changes to properties. The \l Behavior type +is an example of a QML object +\l{qtqml-typesystem-topic.html#property-modifier-types}{property modifier}. -This type of animation is supported in Qt Quick with the \c{Behavior} element -through the \tt{"Behavior on <Property>"} syntax. Please see the documentation -about +Please see the documentation about \l{qtquick-statesanimations-animations.html#default-animation-as-behaviors} -{default property animation behaviors} for more information about the Behavior -element and how to use it. +{default property animations} for more information about using the \l Behavior +element to provide default property change animations. -It is important to note, however, that using default property animations -(using Behavior elements) as well as state-transition animations can sometimes -results in undefined behavior occurring. Please see the documentation about +It is important to note, that using default property animations (via the +\l Behavior type) in combination with state-transition animations can sometimes +result in undefined behavior occurring. Please see the documentation about \l{qtquick-statesanimations-behaviors.html} {using Qt Quick Behaviors with States} for more information about this topic. |