summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@nokia.com>2011-02-17 09:28:49 (GMT)
committerJerome Pasion <jerome.pasion@nokia.com>2011-02-17 09:29:51 (GMT)
commit9c080688f49c19c362d3f69f7d1762521efc045f (patch)
tree7cc063a17c0887d6c4c74cd6a5ac8a2a20b447df
parente91a42b7dfe9805e4025467f81af9ec713e0904b (diff)
downloadQt-9c080688f49c19c362d3f69f7d1762521efc045f.zip
Qt-9c080688f49c19c362d3f69f7d1762521efc045f.tar.gz
Qt-9c080688f49c19c362d3f69f7d1762521efc045f.tar.bz2
Removed section names and added a link to Qt Quick page.
Task-number: QTBUG-16071
-rw-r--r--doc/src/declarative/anchor-layout.qdoc2
-rw-r--r--doc/src/declarative/animation.qdoc2
-rw-r--r--doc/src/declarative/declarativeui.qdoc2
-rw-r--r--doc/src/declarative/elements.qdoc5
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc2
-rw-r--r--doc/src/declarative/positioners.qdoc2
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc2
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc1
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc2
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc2
-rw-r--r--doc/src/declarative/qtquick-intro.qdoc37
-rw-r--r--doc/src/declarative/scope.qdoc122
12 files changed, 76 insertions, 105 deletions
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index 7fc16d8..4dd5eb9 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -33,8 +33,6 @@
\nextpage {QML Mouse Events}{Mouse Events}
\title Anchor-based Layout in QML
-\section1 Overview
-
In addition to the more traditional \l Grid, \l Row, and \l Column,
QML also provides a way to layout items using the concept of \e anchors.
Each item can be thought of as having a set of 7 invisible "anchor lines":
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index bd6813c..7247e73 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -59,8 +59,6 @@ Elements that animate properties based on data types
\o \l {AnchorAnimation} - Animates anchor changes
\endlist
-\section1 Overview
-
In QML, animations are created by applying animation elements to property
values. Animation elements will interpolate property values to create smooth
transitions. As well, state transitions may assign animations to state changes.
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 580541a..ff38ac6 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -33,8 +33,6 @@
\brief Qt Quick provides a declarative framework for building highly
dynamic user interfaces.
-\section1 Introduction
-
Qt Quick is a collection of technologies that are designed to help
developers create the kind of intuitive, modern, fluid user
interfaces that are increasingly used on mobile phones, media players,
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 466b940..c087f17 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -31,7 +31,8 @@
\title QML Elements
\brief A listing of standard QML elements.
-These are the functionally grouped lists of QML elements.
+These are the functionally grouped lists of QML elements as part of
+\l{Qt Quick}.
Elements are declared with the their name and two curly braces. Elements may
be nested in elements, thereby creating a parent-child relationship between the
@@ -44,7 +45,7 @@ To see the QML elements listed by functional area, see the
\list
\o \l {Item} - Basic item element inherited by QML elements
\o \l {Component} - Encapsulates QML elements during importing
-\o \l {QML:QtObject} {QtObject} - Basic element containing only the objectName property
+\o \l {QML:QtObject} {QtObject} - Basic element containing only the \c {objectName} property
\endlist
\section1 Graphics
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index 9f84ee6..54ee2c7 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -33,8 +33,6 @@ This example shows how to create a reusable switch component in QML.
The code for this example can be found in the \c $QTDIR/examples/declarative/ui-components/slideswitch directory.
-\section1 Overview
-
The elements that composed the switch are:
\list
diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc
index c91ed9a..0ac6a2b 100644
--- a/doc/src/declarative/positioners.qdoc
+++ b/doc/src/declarative/positioners.qdoc
@@ -34,8 +34,6 @@
\title Using QML Positioner and Repeater Items
-\section1 Introduction
-
Positioner items are container items that manage the positions and sizes of
items in a declarative user interface. Positioners behave in a similar way to
the \l{Widgets and Layouts}{layout managers} used with standard Qt widgets,
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
index f2147de..423d77c 100644
--- a/doc/src/declarative/qdeclarativedocument.qdoc
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -30,8 +30,6 @@
\title QML Documents
\brief A description of QML documents and the kind of content they contain.
-\section1 Introduction
-
A QML document is a block of QML source code. QML documents generally correspond to files
stored on a disk or at a location on a network, but they can also be constructed directly
from text data.
diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
index 3d97113..bbee37c 100644
--- a/doc/src/declarative/qdeclarativei18n.qdoc
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -33,7 +33,6 @@
\nextpage {QML Features}
\title QML Internationalization
-\section1 Overview
Strings in QML can be marked for translation using the qsTr(), qsTranslate(),
QT_TR_NOOP(), and QT_TRANSLATE_NOOP() functions.
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index 3f05c9b..b1a97d7 100644
--- a/doc/src/declarative/qdeclarativestates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -44,8 +44,6 @@
\o \l AnchorChanges
\endlist
-\section1 Overview
-
Many user interface designs are \e state driven; interfaces have configurations
that differ depending on the current state. For example, a traffic signal will
configure its flags or lights depending on its state. While in the signal's
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
index 97caf80..e48dc9a 100644
--- a/doc/src/declarative/qtprogrammers.qdoc
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -30,8 +30,6 @@
\target qtprogrammers
\title QML for Qt Programmers
-\section1 Overview
-
While QML does not require Qt knowledge to use, if you \e are already familiar with Qt,
much of your knowledge is directly relevant to learning and using QML. Of course,
an application with a UI defined in QML also uses Qt for all the non-UI logic.
diff --git a/doc/src/declarative/qtquick-intro.qdoc b/doc/src/declarative/qtquick-intro.qdoc
index 2315030..1bbae8f 100644
--- a/doc/src/declarative/qtquick-intro.qdoc
+++ b/doc/src/declarative/qtquick-intro.qdoc
@@ -29,25 +29,34 @@
\page qml-intro.html
\title Intro to Qt Quick
-Qt Quick is a collection of technologies that are designed to help developers create the kind of intuitive, modern, and fluid user interfaces that are increasingly used on mobile phones, media players, set-top boxes, and other portable devices. Qt Quick consists of a rich set of user interface \l{QML Elements}{elements}, a \l{QML Syntax}{declarative} language for describing user interfaces, and a language \l{QtDeclarative Module}{runtime}. A collection of C++ APIs is used to integrate these high level features with classic Qt applications. Version 2.1 of the Qt Creator integrated development environment (IDE) introduces tools for developing Qt Quick applications.
+Qt Quick is a collection of technologies that are designed to help developers
+create the kind of intuitive, modern, and fluid user interfaces that are
+increasingly used on mobile phones, media players, set-top boxes, and other
+portable devices. Qt Quick consists of a rich set of user interface
+\l{QML Elements}{elements}, a \l{QML Syntax}{declarative} language for
+describing user interfaces, and a language \l{QtDeclarative Module}{runtime}. A
+collection of C++ APIs is used to integrate these high level features with
+classic Qt applications. Version 2.1 of the Qt Creator integrated development
+environment (IDE) introduces tools for developing Qt Quick applications.
\image qml-clocks-example.png
\section1 The QML Language
-QML is a high level, scripted language. Its commands, more correctly \e elements,
-leverage the power and efficiency of the Qt libraries to make easy to use
-commands that perform intuitive functions. Drawing a rectangle, displaying an
-image, and application events -- all are possible with declarative programming.
+QML is a high level, scripted language. Its commands, more correctly
+\e elements, leverage the power and efficiency of the Qt libraries to make easy
+to use commands that perform intuitive functions. Drawing a rectangle,
+displaying an image, and application events -- all are possible with declarative
+programming.
The language also allows more flexibility of these commands by using
\l{About JavaScript}{JavaScript} to implement the high level user interface
logic.
-A QML element usually has various \e properties that help define the element. For
-example, if we created an element called Circle then the radius of the circle
-would be a property. Building user interfaces by importing these elements is one
-of the great feature of QML and Qt Quick.
+A QML element usually has various \e properties that help define the element.
+For example, if we created an element called Circle then the radius of the
+circle would be a property. Building user interfaces by importing these elements
+is one of the great feature of QML and Qt Quick.
\image qml-texteditor5_newfile.png
\section1 QtDeclarative Module
@@ -55,7 +64,8 @@ of the great feature of QML and Qt Quick.
To make Qt Quick possible, Qt introduces the \l {QtDeclarative} module. The
module creates a JavaScript runtime that QML runs under with a Qt based backend.
Because QtDeclarative and QML are built upon Qt, they inherit many of Qt's
-technology, namely the \l{Signals and Slots}{signals and slots} mechanism and the \l{The Meta-Object System}{meta-object} system. Data created using C++ are
+technology, namely the \l{Signals and Slots}{signals and slots} mechanism and
+the \l{The Meta-Object System}{meta-object} system. Data created using C++ are
directly accessible from QML and QML objects are also accessible from C++ code.
In conjunction with the QML language, the QtDeclarative module separates the
@@ -63,7 +73,8 @@ interface logic in QML from the application logic in C++.
\section1 Creator Tools
-Qt Creator is a complete integrated development environment (IDE) for creating applications with Qt Quick and the Qt application framework.
+Qt Creator is a complete integrated development environment (IDE) for creating
+applications with Qt Quick and the Qt application framework.
\image qmldesigner-visual-editor.png
@@ -98,8 +109,8 @@ system.
\section1 Where to Go from Here
-The \l {Qt Quick} page has links to various Qt Quick topics such as QML features,
-addons, and tools.
+The \l {Qt Quick} page has links to various Qt Quick topics such as QML
+features, addons, and tools.
The \l {QML Examples and Demos} page has a gallery of QML applications.
*/
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
index 3317037..9a9934a 100644
--- a/doc/src/declarative/scope.qdoc
+++ b/doc/src/declarative/scope.qdoc
@@ -24,41 +24,17 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-/*
-
-
-
-and requires extension to
-fit naturally with QML.
-
-
-JavaScript has only b
-JavaScript has a very simple built in scope is very simple
-
-script, and the precede d
-
-and \l {Integrating JavaScript}{JavaScript} are executed in a scope chain
-automatically established by QML when a component instance is constructed. QML is a \e {dynamically scoped}
-language. Different object instances instantiated from the same component can exist in
-different scope chains.
-
-\image qml-scope.png
-
-
-*/
-
/*!
\page qdeclarativescope.html
\title QML Scope
\tableofcontents
-QML property bindings, inline functions and imported JavaScript files all
-run in a JavaScript scope. Scope controls which variables an expression can
+QML property bindings, inline functions and imported JavaScript files all
+run in a JavaScript scope. Scope controls which variables an expression can
access, and which variable takes precedence when two or more names conflict.
-As JavaScript's built-in scope mechanism is very simple, QML enhances it to fit
+As JavaScript's built-in scope mechanism is very simple, QML enhances it to fit
more naturally with the QML language extensions.
\section1 JavaScript Scope
@@ -67,8 +43,8 @@ QML's scope extensions do not interfere with JavaScript's natural scoping.
JavaScript programmers can reuse their existing knowledge when programming
functions, property bindings or imported JavaScript files in QML.
-In the following example, the \c {addConstant()} method will add 13 to the
-parameter passed just as the programmer would expect irrespective of the
+In the following example, the \c {addConstant()} method will add 13 to the
+parameter passed just as the programmer would expect irrespective of the
value of the QML object's \c a and \c b properties.
\code
@@ -83,8 +59,8 @@ QtObject {
}
\endcode
-That QML respects JavaScript's normal scoping rules even applies in bindings.
-This totally evil, abomination of a binding will assign 12 to the QML object's
+That QML respects JavaScript's normal scoping rules even applies in bindings.
+This totally evil, abomination of a binding will assign 12 to the QML object's
\c a property.
\code
@@ -101,13 +77,13 @@ with local variables declared in another.
\section1 Element Names and Imported JavaScript Files
-\l {QML Document}s include import statements that define the element names
-and JavaScript files visible to the document. In addition to their use in the
-QML declaration itself, element names are used by JavaScript code when accessing
-\l {Attached Properties} and enumeration values.
+\l {QML Document}s include import statements that define the element names
+and JavaScript files visible to the document. In addition to their use in the
+QML declaration itself, element names are used by JavaScript code when accessing
+\l {Attached Properties} and enumeration values.
-The effect of an import applies to every property binding, and JavaScript
-function in the QML document, even those in nested inline components. The
+The effect of an import applies to every property binding, and JavaScript
+function in the QML document, even those in nested inline components. The
following example shows a simple QML file that accesses some enumeration
values and calls an imported JavaScript function.
@@ -130,10 +106,10 @@ ListView {
\section1 Binding Scope Object
-Property bindings are the most common use of JavaScript in QML. Property
+Property bindings are the most common use of JavaScript in QML. Property
bindings associate the result of a JavaScript expression with a property of an
-object. The object to which the bound property belongs is known as the binding's
-scope object. In this QML simple declaration the \l Item object is the
+object. The object to which the bound property belongs is known as the binding's
+scope object. In this QML simple declaration the \l Item object is the
binding's scope object.
\code
@@ -144,21 +120,21 @@ Item {
Bindings have access to the scope object's properties without qualification.
In the previous example, the binding accesses the \l Item's \c parent property
-directly, without needing any form of object prefix. QML introduces a more
-structured, object-oriented approach to JavaScript, and consequently does not
+directly, without needing any form of object prefix. QML introduces a more
+structured, object-oriented approach to JavaScript, and consequently does not
require the use of the JavaScript \c this property.
Care must be used when accessing \l {Attached Properties} from bindings due
to their interaction with the scope object. Conceptually attached properties
exist on \e all objects, even if they only have an effect on a subset of those.
-Consequently unqualified attached property reads will always resolve to an
-attached property on the scope object, which is not always what the programmer
+Consequently unqualified attached property reads will always resolve to an
+attached property on the scope object, which is not always what the programmer
intended.
-For example, the \l PathView element attaches interpolated value properties to
+For example, the \l PathView element attaches interpolated value properties to
its delegates depending on their position in the path. As PathView only
-meaningfully attaches these properties to the root element in the delegate, any
-sub-element that accesses them must explicitly qualify the root object, as shown
+meaningfully attaches these properties to the root element in the delegate, any
+sub-element that accesses them must explicitly qualify the root object, as shown
below.
\code
@@ -181,7 +157,7 @@ the unset \c {PathView.scale} attached property on itself.
Each QML component in a QML document defines a logical scope. Each document
has at least one root component, but can also have other inline sub-components.
-The component scope is the union of the object ids within the component and the
+The component scope is the union of the object ids within the component and the
component's root element's properties.
\code
@@ -195,7 +171,7 @@ Item {
anchors.top: parent.top
}
- Text {
+ Text {
text: titleElement.text
font.pixelSize: 18
anchors.bottom: parent.bottom
@@ -203,7 +179,7 @@ Item {
}
\endcode
-The example above shows a simple QML component that displays a rich text title
+The example above shows a simple QML component that displays a rich text title
string at the top, and a smaller copy of the same text at the bottom. The first
\c Text element directly accesses the component's \c title property when
forming the text to display. That the root element's properties are directly
@@ -211,18 +187,18 @@ accessible makes it trivial to distribute data throughout the component.
The second \c Text element uses an id to access the first's text directly. IDs
are specified explicitly by the QML programmer so they always take precedence
-over other property names (except for those in the \l {JavaScript Scope}). For
-example, in the unlikely event that the binding's \l {Binding Scope Object}{scope
-object} had a \c titleElement property in the previous example, the \c titleElement
+over other property names (except for those in the \l {JavaScript Scope}). For
+example, in the unlikely event that the binding's \l {Binding Scope Object}{scope
+object} had a \c titleElement property in the previous example, the \c titleElement
id would still take precedence.
\section1 Component Instance Hierarchy
-In QML, component instances connect their component scopes together to form a
-scope hierarchy. Component instances can directly access the component scopes of
+In QML, component instances connect their component scopes together to form a
+scope hierarchy. Component instances can directly access the component scopes of
their ancestors.
-The easiest way to demonstrate this is with inline sub-components whose component
+The easiest way to demonstrate this is with inline sub-components whose component
scopes are implicitly scoped as children of the outer component.
\code
@@ -239,16 +215,16 @@ Item {
}
\endcode
-The component instance hierarchy allows instances of the delegate component
+The component instance hierarchy allows instances of the delegate component
to access the \c defaultColor property of the \c Item element. Of course,
-had the delegate component had a property called \c defaultColor that would
-have taken precedence.
+had the delegate component had a property called \c defaultColor that would
+have taken precedence.
The component instance scope hierarchy extends to out-of-line components, too.
-In the following example, the \c TitlePage.qml component creates two
-\c TitleText instances. Even though the \c TitleText element is in a separate
-file, it still has access to the \c title property when it is used from within
-the \c TitlePage. QML is a dynamically scoped language - depending on where it
+In the following example, the \c TitlePage.qml component creates two
+\c TitleText instances. Even though the \c TitleText element is in a separate
+file, it still has access to the \c title property when it is used from within
+the \c TitlePage. QML is a dynamically scoped language - depending on where it
is used, the \c title property may resolve differently.
\code
@@ -256,13 +232,13 @@ is used, the \c title property may resolve differently.
import QtQuick 1.0
Item {
property string title
-
- TitleText {
+
+ TitleText {
size: 22
anchors.top: parent.top
}
- TitleText {
+ TitleText {
size: 18
anchors.bottom: parent.bottom
}
@@ -277,10 +253,10 @@ Text {
}
\endcode
-Dynamic scoping is very powerful, but it must be used cautiously to prevent
+Dynamic scoping is very powerful, but it must be used cautiously to prevent
the behavior of QML code from becoming difficult to predict. In general it
-should only be used in cases where the two components are already tightly
-coupled in another way. When building reusable components, it is preferable
+should only be used in cases where the two components are already tightly
+coupled in another way. When building reusable components, it is preferable
to use property interfaces, like this:
\code
@@ -289,14 +265,14 @@ import QtQuick 1.0
Item {
id: root
property string title
-
- TitleText {
+
+ TitleText {
title: root.title
size: 22
anchors.top: parent.top
}
- TitleText {
+ TitleText {
title: root.title
size: 18
anchors.bottom: parent.bottom
@@ -322,7 +298,7 @@ QML specific tasks a little easier. These extensions are described in the
\l {QML Global Object} documentation.
QML disallows element, id and property names that conflict with the properties
-on the global object to prevent any confusion. Programmers can be confident
+on the global object to prevent any confusion. Programmers can be confident
that \c Math.min(10, 9) will always work as expected!
*/