summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/declarativeui.qdoc104
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc2
-rw-r--r--doc/src/declarative/qmldocument.qdoc4
-rw-r--r--doc/src/declarative/qmlintro.qdoc35
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc54
-rw-r--r--doc/src/declarative/scope.qdoc20
-rw-r--r--doc/src/index.qdoc2
7 files changed, 133 insertions, 88 deletions
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
new file mode 100644
index 0000000..7df87c5
--- /dev/null
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\title Declarative UI
+\page declarativeui.html
+
+\brief The Qt Declarative module provides a declarative framework for building
+highly dynamic, custom user interfaces.
+
+Qt Declarative aids programmers and designers in building the animation rich,
+highly fluid user interfaces that are becoming common in portable consumer
+electronics devices, such as mobile phones, media players, set-top boxes and
+netbooks. The Qt Declarative module provides an engine for interpreting the
+declarative QML language, and a rich set of \l {QML Elements}{QML elements} that can be used
+from QML.
+
+QML is an extension to \l {http://www.ecma-international.org/publications/standards/Ecma-262.htm}
+{ECMAScript}, that provides a mechanism to declaratively build an object tree
+of QML elements. QML improves the integration between ECMAScript and Qt's
+existing QObject based type system, adds support for automatic
+\l {Property Binding}{property bindings} and provides \l {Network Transparency}{network transparency} at the language
+level.
+
+The QML elements are a sophisticated set of graphical and behavioral building
+blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
+ranging in complexity from simple buttons and sliders, to complete
+internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser.
+
+Qt Declarative builds on \l {QML for Qt programmers}{Qt's existing strengths}.
+QML can be be used to incrementally extend an existing application or to build
+completely new applications. QML is fully \l {Extending QML}{extensible from C++}.
+
+\section1 Getting Started:
+\list
+\o \l {Introduction to the QML language}
+\o \l {Tutorial}{Tutorial: 'Hello World'}
+\o \l {advtutorial.html}{Tutorial: 'Same Game'}
+\o \l {QML Examples and Walkthroughs}
+\o \l {Using QML in C++ Applications}
+\endlist
+
+\section1 Core QML Features:
+\list
+\o \l {QML Documents}
+\o \l {Property Binding}
+\o \l {ECMAScript Blocks}
+\o \l {QML Scope}
+\o \l {Network Transparency}
+\o \l {qmlmodels}{Data Models}
+\o \l {anchor-layout}{Anchor-based Layout}
+\o \l {qmlstates}{States}
+\o \l {qmlanimation.html}{Animation}
+\o \l {qmlmodules.html}{Modules}
+\o \l {qmlfocus}{Keyboard Focus}
+\o \l {Extending types from QML}
+\endlist
+
+\section1 Reference:
+\list
+\o \l {QML Elements}
+\o \l {QML Global Object}
+\o \l {Extending QML}
+\o \l {QtDeclarative Module}
+\endlist
+*/
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index c942918..a8376eb 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -127,7 +127,7 @@ For more information on scripts see \l{qmlecmascript.html}{ECMAScript Blocks}.
\snippet examples/declarative/slideswitch/content/Switch.qml 7
At this point, when the switch toggles between the two states the knob will instantly change its \c x position between 1 and 78.
-In order for the the knob to move smoothly we add a transistion that will animate the \c x property with an easing curve for a duration of 200ms.
+In order for the the knob to move smoothly we add a transition that will animate the \c x property with an easing curve for a duration of 200ms.
For more information on transitions see \l{state-transitions}{QML Transitions}.
diff --git a/doc/src/declarative/qmldocument.qdoc b/doc/src/declarative/qmldocument.qdoc
index 2775ea6..453c023 100644
--- a/doc/src/declarative/qmldocument.qdoc
+++ b/doc/src/declarative/qmldocument.qdoc
@@ -44,9 +44,9 @@
\title QML Documents
A QML document is a block of QML source code. QML documents generally correspond to files
-stored on a disk or network resource, but can be constructed directly from text data.
+stored on a disk or network resource, but can also be constructed directly from text data.
-A simple QML document looks like this:
+Here is a simple QML document:
\code
import Qt 4.6
diff --git a/doc/src/declarative/qmlintro.qdoc b/doc/src/declarative/qmlintro.qdoc
index ab9416b..78462db 100644
--- a/doc/src/declarative/qmlintro.qdoc
+++ b/doc/src/declarative/qmlintro.qdoc
@@ -45,19 +45,15 @@
\tableofcontents
-\section1 What is QML?
-
QML is a declarative language designed to describe the user interface of a
-program: both what it looks like and how it behaves. In QML, a user
+program: both what it looks like, and how it behaves. In QML, a user
interface is specified as a tree of objects with properties.
-\section1 What should I know before starting?
-
This introduction is meant for those with little or no programming
experience. JavaScript is used as a scripting language in QML, so you may want
to learn a bit more about it (\l{JavaScript: The Definitive Guide}) before diving
-too deep into QML. It's also helpful to have a basic understanding of other web
-technologies like HTML and CSS, but not required.
+deeper into QML. It's also helpful to have a basic understanding of other web
+technologies like HTML and CSS, but it's not required.
\section1 Basic QML Syntax
@@ -80,10 +76,9 @@ types always begin with a capital letter. In the above example, there are
two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify
information about the object, such as its properties.
-Properties are specified as \c {property: value} (much like CSS). In the above
-example, we can see the Image has a property named \c source, which has been
-assigned the value \c "pics/logo.png". The property and its value are
-separated by a colon.
+Properties are specified as \c {property: value}. In the above example, we
+can see the Image has a property named \c source, which has been assigned the
+value \c "pics/logo.png". The property and its value are separated by a colon.
Properties can be specified one-per-line:
@@ -131,18 +126,18 @@ Item {
}
\endcode
-In the example above, the Text2 object will display the same text as Text1. If Text1 is updated,
-Text2 will be updated as well.
+In the example above, the \c text2 object will display the same text as \c text1. If \c text1 is changed,
+\c text2 is automatically changed to the same value.
-Note that to refer to other objects, we use their \e id (more information on the id property can be
-found in a following section).
+Note that to refer to other objects, we use their \e id values. (See below for more
+information on the \e id property.)
\section1 QML Comments
Commenting in QML is similar to JavaScript.
\list
-\o Single line comments begin with // and end at the end of the line.
-\o Multiline comments begin with /* and end with *\/
+\o Single line comments start with // and finish at the end of the line.
+\o Multiline comments start with /* and finish with *\/
\endlist
\quotefile doc/src/snippets/declarative/comments.qml
@@ -173,7 +168,7 @@ Properties begin with a lowercase letter (with the exception of \l{Attached Prop
\section2 Property types
-QML supports properties of many types (\l{Common QML Types}). The basic types include int,
+QML supports properties of many types (see \l{Common QML Types}). The basic types include int,
real, bool, string, color, and lists.
\code
@@ -186,12 +181,12 @@ Item {
\endcode
QML properties are what is known as \e typesafe. That is, they only allow you to assign a value that
-matches the property type. For example, the scale property of item is a real, and if you try to assign
+matches the property type. For example, the \c x property of item is a real, and if you try to assign
a string to it you will get an error.
\badcode
Item {
- scale: "hello" //illegal!
+ x: "hello" // illegal!
}
\endcode
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index e46cbab..5947429 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -47,58 +47,4 @@
\brief The Qt Declarative module provides a declarative framework for building
highly dynamic, custom user interfaces.
-Qt Declarative aids programmers and designers in building the animation rich,
-highly fluid user interfaces that are becoming common in portable consumer
-electronics devices, such as mobile phones, media players, set-top boxes and
-netbooks. The Qt Declarative module provides an engine for interpreting the
-declarative QML language, and a rich set of \l {QML Elements}{QML elements} that can be used
-from QML.
-
-QML is an extension to \l {http://www.ecma-international.org/publications/standards/Ecma-262.htm}
-{ECMAScript}, that provides a mechanism to declaratively build an object tree
-of QML elements. QML improves the integration between ECMAScript and Qt's
-existing QObject based type system, adds support for automatic
-\l {Property Binding}{property bindings} and provides \l {Network Transparency}{network transparency} at the language
-level.
-
-The QML elements are a sophisticated set of graphical and behavioral building
-blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
-ranging in complexity from simple buttons and sliders, to complete
-internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser.
-
-Qt Declarative builds on \l {QML for Qt programmers}{Qt's existing strengths}.
-QML can be be used to incrementally extend an existing application or to build
-completely new applications. QML is fully \l {Extending QML}{extensible from C++}.
-
-\section1 Getting Started:
-\list
-\o \l {Introduction to the QML language}
-\o \l {Tutorial}{Tutorial: 'Hello World'}
-\o \l {advtutorial.html}{Tutorial: 'Same Game'}
-\o \l {QML Examples and Walkthroughs}
-\o \l {Using QML in C++ Applications}
-\endlist
-
-\section1 Core QML Features:
-\list
-\o \l {QML Documents}
-\o \l {Property Binding}
-\o \l {ECMAScript Blocks}
-\o \l {QML Scope}
-\o \l {Network Transparency}
-\o \l {qmlmodels}{Data Models}
-\o \l {anchor-layout}{Anchor-based Layout}
-\o \l {qmlstates}{States}
-\o \l {qmlanimation.html}{Animation}
-\o \l {qmlmodules.html}{Modules}
-\o \l {qmlfocus}{Keyboard Focus}
-\o \l {Extending types from QML}
-\endlist
-
-\section1 Reference:
-\list
-\o \l {QML Elements}
-\o \l {QML Global Object}
-\o \l {Extending QML}
-\endlist
*/
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
index fc678d1..f7f25f5 100644
--- a/doc/src/declarative/scope.qdoc
+++ b/doc/src/declarative/scope.qdoc
@@ -44,7 +44,7 @@
\title QML Scope
\l {Property Binding}s and \l {ECMAScript Blocks} are executed in a scope chain automatically
-established by QML when constructing a component instance. QML is a \e {dynamically scoped}
+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.
@@ -91,8 +91,8 @@ Text {
\section1 QML Local Scope
Most variables references are resolved in the local scope. The local scope is controlled by the
-QML component in which the binding or script block was declarated. The following example shows
-three different bindings, and the component that dictates their local scope.
+QML component in which the binding or script block was defined. The following example shows
+three different bindings, and the component that dictates each local scope.
\table
\row
@@ -135,15 +135,15 @@ Rectangle { // Local scope component for binding 3
\endcode
\endtable
-Inside the local scope, four "sub-scopes" exist. Each "sub-scope" is searched in order when
-resolving a name - names in a higher "sub-scopes" shadow those in lower sub-scopes.
+Inside the local scope, four "sub-scopes" exist. Each sub-scope is searched in order when
+resolving a name; names in higher sub-scopes shadow those in lower sub-scopes.
\section2 IDs
IDs present in the component take precendence over other names. The QML engine enforces
uniqueness of IDs within a component, so their names cannot conflict with one another.
-This is an example of using IDs within bindings.
+Here is an example of using IDs within bindings:
\code
Item {
@@ -192,7 +192,7 @@ scope object appear in the scope chain, immediately after \l {Script Methods}.
In bindings and script blocks established explicitly in \l {QML Documents}, the scope object is
always the element containing the binding or script block. The following example shows two
bindings, one using grouped properties, and the corresponding scope object. These two bindings
-use the scope object to resolve variable references - \c height is a property on \l Rectangle,
+use the scope object to resolve variable references: \c height is a property on \l Rectangle,
and \c parent is a property on \l Text.
\code
@@ -269,7 +269,7 @@ Item {
\section1 QML Component chain
When a QML component is instantiated it is given a parent component instance. The parent
-component instance is immutable - it is not effected, for example, by changes in the instance's
+component instance is immutable - it is not affected, for example, by changes in the instance's
visual parent (in the case of visual elements). Should name resolution fail within the
\l {QML Local Scope}, this parent chain is searched.
@@ -283,8 +283,8 @@ For each component instance in the chain, the following are examined:
This list is a sub-set of that in the \l {QML Local Scope}.
-Sub-components used within a component have their parent component instance set to the component
-instance that created them. In the following example, the two \c Button instances have the
+A sub-component's parent component instance is set to the component that created it.
+In the following example, the two \c Button instances have the
\c main.qml instance as their parent component instance. If the \c Button type was used from
within another QML file, it may have a difference parent component instance, and consequently
the \c buttonClicked() method may resolve differently.
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 6b81936..762a900 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -103,7 +103,7 @@
<li><a href="paintsystem.html">Painting and Printing</a></li>
<li><a href="graphicsview.html">Canvas UI with Graphics View</a></li>
<li><a href="webintegration.html">Integrating Web Content</a></li>
- <li><a href="qtdeclarative.html">Declarative UI</a></li>
+ <li><a href="declarativeui.html">Declarative UI</a></li>
</ul>
</td>
<td valign="top">