summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/declarative/advtutorial.qdoc4
-rw-r--r--doc/src/declarative/declarativeui.qdoc2
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc18
-rw-r--r--doc/src/declarative/examples.qdoc34
-rw-r--r--doc/src/declarative/extending-tutorial.qdoc8
-rw-r--r--doc/src/declarative/globalobject.qdoc246
-rw-r--r--doc/src/declarative/integrating.qdoc2
-rw-r--r--doc/src/declarative/qml-intro.qdoc967
-rw-r--r--doc/src/declarative/qtdeclarative.qdoc6
-rw-r--r--doc/src/demos/boxes.qdoc2
-rw-r--r--doc/src/deployment/deployment.qdoc26
-rw-r--r--doc/src/examples/diagramscene.qdoc12
-rw-r--r--doc/src/examples/drilldown.qdoc12
-rw-r--r--doc/src/examples/mandelbrot.qdoc2
-rw-r--r--doc/src/examples/qml-examples.qdoc41
-rw-r--r--doc/src/examples/qml-flickr.qdoc2
-rw-r--r--doc/src/examples/qml-minehunt.qdoc5
-rw-r--r--doc/src/examples/qml-photoviewer.qdoc2
-rw-r--r--doc/src/examples/qml-rssnews.qdoc2
-rw-r--r--doc/src/examples/qml-samegame.qdoc5
-rw-r--r--doc/src/examples/qml-snake.qdoc5
-rw-r--r--doc/src/examples/qml-twitter.qdoc50
-rw-r--r--doc/src/examples/transformations.qdoc4
-rw-r--r--doc/src/examples/undoframework.qdoc2
-rw-r--r--doc/src/external-resources.qdoc5
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc6
-rw-r--r--doc/src/frameworks-technologies/dnd.qdoc6
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc18
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc463
-rw-r--r--doc/src/getting-started/demos.qdoc19
-rw-r--r--doc/src/getting-started/examples.qdoc573
-rw-r--r--doc/src/getting-started/how-to-learn-qt.qdoc10
-rw-r--r--doc/src/getting-started/installation.qdoc12
-rw-r--r--doc/src/getting-started/known-issues.qdoc2
-rw-r--r--doc/src/howtos/guibooks.qdoc2
-rw-r--r--doc/src/images/qml-clocks-example.pngbin0 -> 40742 bytes
-rw-r--r--doc/src/images/qml-corkboards-example.pngbin0 -> 179625 bytes
-rw-r--r--doc/src/images/qml-dial.pngbin0 -> 43754 bytes
-rw-r--r--doc/src/images/qml-dialcontrol-example.pngbin0 -> 33569 bytes
-rw-r--r--doc/src/images/qml-dynamicscene-example.pngbin0 -> 65247 bytes
-rw-r--r--doc/src/images/qml-flickr-demo.png (renamed from doc/src/images/qml-flickr-example.png)bin280730 -> 280730 bytes
-rw-r--r--doc/src/images/qml-flipable-example.pngbin0 -> 13301 bytes
-rw-r--r--doc/src/images/qml-intro-anchors1.pngbin0 -> 15198 bytes
-rw-r--r--doc/src/images/qml-intro-anchors2.pngbin0 -> 15343 bytes
-rw-r--r--doc/src/images/qml-intro-anchors3.pngbin0 -> 16745 bytes
-rw-r--r--doc/src/images/qml-intro-helloa.pngbin0 -> 18246 bytes
-rw-r--r--doc/src/images/qml-minehunt-demo.png (renamed from doc/src/images/qml-minehunt-example.png)bin170648 -> 170648 bytes
-rw-r--r--doc/src/images/qml-photoviewer-demo.png (renamed from doc/src/images/qml-photoviewer-example.png)bin473306 -> 473306 bytes
-rw-r--r--doc/src/images/qml-progressbar-example.pngbin0 -> 15188 bytes
-rw-r--r--doc/src/images/qml-rssnews-demo.png (renamed from doc/src/images/qml-rssnews-example.png)bin143314 -> 143314 bytes
-rw-r--r--doc/src/images/qml-samegame-demo.png (renamed from doc/src/images/qml-samegame-example.png)bin285415 -> 285415 bytes
-rw-r--r--doc/src/images/qml-searchbox-example.pngbin0 -> 8170 bytes
-rw-r--r--doc/src/images/qml-slideswitch-example.pngbin0 -> 8298 bytes
-rw-r--r--doc/src/images/qml-snake-demo.png (renamed from doc/src/images/qml-snake-example.png)bin105053 -> 105053 bytes
-rw-r--r--doc/src/images/qml-spinner-example.pngbin0 -> 5637 bytes
-rw-r--r--doc/src/images/qml-tabwidget-example.pngbin0 -> 6487 bytes
-rw-r--r--doc/src/images/qml-tic-tac-toe-example.pngbin0 -> 24275 bytes
-rw-r--r--doc/src/images/qml-tvtennis-example.pngbin0 -> 2070 bytes
-rw-r--r--doc/src/images/qml-twitter-demo.pngbin0 -> 95812 bytes
-rw-r--r--doc/src/legal/opensourceedition.qdoc16
-rw-r--r--doc/src/objectmodel/object.qdoc6
-rw-r--r--doc/src/painting-and-printing/paintsystem.qdoc12
-rw-r--r--doc/src/porting/porting4-canvas.qdoc2
-rw-r--r--doc/src/porting/porting4.qdoc4
-rw-r--r--doc/src/scripting/scripting.qdoc8
-rw-r--r--doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp6
-rw-r--r--doc/src/snippets/declarative/Sprite.qml43
-rw-r--r--doc/src/snippets/declarative/borderimage.qml41
-rw-r--r--doc/src/snippets/declarative/codingconventions/dotproperties.qml41
-rw-r--r--doc/src/snippets/declarative/codingconventions/javascript-imports.qml41
-rw-r--r--doc/src/snippets/declarative/codingconventions/javascript.qml41
-rw-r--r--doc/src/snippets/declarative/codingconventions/lists.qml41
-rw-r--r--doc/src/snippets/declarative/codingconventions/photo.qml41
-rw-r--r--doc/src/snippets/declarative/comments.qml41
-rw-r--r--doc/src/snippets/declarative/createComponent.qml43
-rw-r--r--doc/src/snippets/declarative/createQmlObject.qml41
-rw-r--r--doc/src/snippets/declarative/drag.qml41
-rw-r--r--doc/src/snippets/declarative/dynamicObjects.qml41
-rw-r--r--doc/src/snippets/declarative/flickableScrollbar.qml41
-rw-r--r--doc/src/snippets/declarative/flipable.qml41
-rw-r--r--doc/src/snippets/declarative/focusscopes.qml41
-rw-r--r--doc/src/snippets/declarative/folderlistmodel.qml41
-rw-r--r--doc/src/snippets/declarative/gradient.qml43
-rw-r--r--doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml41
-rw-r--r--doc/src/snippets/declarative/gridview/gridview.qml41
-rw-r--r--doc/src/snippets/declarative/listview/ContactModel.qml41
-rw-r--r--doc/src/snippets/declarative/listview/highlight.qml41
-rw-r--r--doc/src/snippets/declarative/listview/listview.qml41
-rw-r--r--doc/src/snippets/declarative/mouseregion.qml41
-rw-r--r--doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml41
-rw-r--r--doc/src/snippets/declarative/pathview/pathattributes.qml41
-rw-r--r--doc/src/snippets/declarative/pathview/pathview.qml41
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.qml41
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.qml41
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.qml41
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.qml41
-rw-r--r--doc/src/snippets/declarative/repeater-index.qml41
-rw-r--r--doc/src/snippets/declarative/repeater.qml41
-rw-r--r--doc/src/snippets/declarative/rotation.qml41
-rw-r--r--doc/src/snippets/declarative/texteditor.qml73
-rw-r--r--doc/src/snippets/declarative/workerscript.qml41
-rw-r--r--doc/src/snippets/declarative/xmlrole.qml81
-rw-r--r--doc/src/snippets/declarative/xmlrole.xml14
-rw-r--r--doc/src/sql-programming/qsqldatatype-table.qdoc2
-rw-r--r--doc/src/sql-programming/sql-programming.qdoc7
-rwxr-xr-xdoc/src/template/scripts/functions.js39
-rwxr-xr-xdoc/src/template/style/style.css41
-rw-r--r--doc/src/tutorials/addressbook-fr.qdoc30
-rw-r--r--doc/src/tutorials/addressbook.qdoc235
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc2
-rw-r--r--doc/src/widgets-and-layouts/focus.qdoc2
-rw-r--r--doc/src/widgets-and-layouts/styles.qdoc2
-rw-r--r--doc/src/widgets-and-layouts/widgets.qdoc14
-rw-r--r--doc/src/windows-and-dialogs/mainwindow.qdoc3
114 files changed, 3158 insertions, 1416 deletions
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index 47504ae..116c4e4 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -178,7 +178,7 @@ The \c createBlock() function creates a block from the \c Block.qml file
and moves the new block to its position on the game canvas. This involves several steps:
\list
-\o \l {Qt.createComponent(url file)}{Qt.createComponent()} is called to generate an element from \c Block.qml.
+\o \l {Qt::createComponent()}{Qt.createComponent()} is called to generate an element from \c Block.qml.
If the component is ready, we can call \c createObject() to create an instance of the \c Block item.
\o If \c createObject() returned null (i.e. if there was an error while
loading the object), print the error information.
@@ -468,6 +468,6 @@ By following this tutorial you've seen how you can write a fully functional appl
\endlist
There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the
-demos and examples and the \l {Declarative UI Using QML}{documentation} to find out all the things you can do with QML!
+demos and examples and the \l {Qt Quick}{documentation} to see all the things you can do with QML!
*/
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 5283ba8..1199b26 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -98,7 +98,7 @@ application or to build completely new applications. QML is fully \l
\o \l {qdeclarativemodules.html}{Modules}
\o \l {qdeclarativefocus.html}{Keyboard Focus}
\o \l {Extending types from QML}
-\o \l {Dynamic Object Creation}
+\o \l {qdeclarativedynamicobjects.html}{Dynamic Object Creation}
\o \l {qmlruntime.html}{The Qt Declarative Runtime}
\endlist
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index 2688ee5..5e606f4 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -56,15 +56,15 @@ application, and there are no C++ components involved.
\section1 Creating Objects Dynamically
There are two ways to create objects dynamically from JavaScript. You can either call
-\l {Qt.createComponent(url file)}{Qt.createComponent()} to create
-a component which instantiates items, or use \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()}
+\l {Qt::createComponent()}{Qt.createComponent()} to create
+a component which instantiates items, or use \l{Qt::createQmlObject()}{Qt.createQmlObject()}
to create an item from a string of QML.
Creating a component is better if you have a predefined
item, and you want to create dynamic instances of that item; creating an item from
a string of QML is useful when the item QML itself is generated at runtime.
If you have a component specified in a QML file, you can dynamically load it with
-the \l {Qt.createComponent(url file)}{Qt.createComponent()} function on the \l{QML Global Object}.
+the \l {Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}.
This function takes the URL of the QML file as its only argument and returns
a component object which can be used to create and load that QML file.
@@ -75,12 +75,12 @@ the parent later you can safely pass null to this function.
Here is an example. Here is a \c Sprite.qml, which defines a simple QML component:
-\quotefile doc/src/snippets/declarative/Sprite.qml
+\snippet doc/src/snippets/declarative/Sprite.qml 0
Our main application file, \c main.qml, imports a \c componentCreation.js JavaScript file
that will create \c Sprite objects:
-\quotefile doc/src/snippets/declarative/createComponent.qml
+\snippet doc/src/snippets/declarative/createComponent.qml 0
Here is \c componentCreation.js. Remember that QML files that might be loaded
over the network cannot be expected to be ready immediately:
@@ -98,10 +98,10 @@ in \c main.qml). After creating an item, you must set its parent to an item with
Otherwise your dynamically created item will not appear in the scene.
When using files with relative paths, the path should
-be relative to the file where \l {Qt.createComponent(url file)}{Qt.createComponent()} is executed.
+be relative to the file where \l {Qt::createComponent()}{Qt.createComponent()} is executed.
If the QML component does not exist until runtime, you can create a QML item from
-a string of QML using the \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()} function, as in the following example:
+a string of QML using the \l{Qt::createQmlObject()}{Qt.createQmlObject()} function, as in the following example:
\snippet doc/src/snippets/declarative/createQmlObject.qml 0
@@ -121,9 +121,9 @@ the bindings in the dynamic item will no longer work.
The actual creation context depends on how an item is created:
\list
-\o If \l {Qt.createComponent(url file)}{Qt.createComponent()} is used, the creation context
+\o If \l {Qt::createComponent()}{Qt.createComponent()} is used, the creation context
is the QDeclarativeContext in which this method is called
-\o If \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()}
+\o If \l{Qt::createQmlObject()}{Qt.createQmlObject()}
if called, it is the context of the item used as the second argument to this method
\o If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()}
is called on that item, it is the context in which the \c Component is defined
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index a355f9f..8f39685 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -42,12 +42,9 @@
/*!
\page qdeclarativeexamples.html
\title QML Examples and Demos
+ \brief Building UI's with QML
\ingroup all-examples
-\previouspage Graphics View Examples
-\contentspage Qt Examples
-\nextpage Painting Examples
-
\section1 Running the examples
You can find many simple examples in the \c examples/declarative
@@ -56,17 +53,17 @@ sub-directory that show how to use various aspects of QML. In addition, the
applications. These demos are intended to show integrated functionality
rather than being instructive on specific elements.
-To run the examples and demos, you can use Qt Creator or the included \l {Qt Declarative UI Runtime}{qml}
+To run the examples and demos, you can use Qt Creator or the included \l {Qt Declarative UI Runtime}{qmlviewer}
command-line application. It has some useful options, revealed by:
\code
- bin/qml -help
+ bin/qmlviewer -help
\endcode
For example, from your build directory, run:
\code
- bin/qml $QTDIR/demos/declarative/samegame/samegame.qml
+ bin/qmlviewer $QTDIR/demos/declarative/samegame/samegame.qml
\endcode
\section1 Examples
@@ -84,7 +81,10 @@ For example, from your build directory, run:
\o \l{declarative/imageelements/borderimage}{BorderImage}
\endlist
-\section2 \l{declarative/positioners}{Positioners}
+\section2 Positioners
+\list
+\o \l{declarative/positioners}{Example}
+\endlist
\section2 Key Interaction
\list
@@ -99,6 +99,7 @@ For example, from your build directory, run:
\section2 UI Components
\list
+\o \l{declarative/ui-components/dialcontrol}{Dial control}
\o \l{declarative/ui-components/flipable}{Flipable}
\o \l{declarative/ui-components/progressbar}{Progress bar}
\o \l{declarative/ui-components/scrollbar}{Scroll bar}
@@ -112,10 +113,10 @@ For example, from your build directory, run:
\list
\o \l{declarative/modelviews/gridview}{GridView}
\o \l{declarative/modelviews/listview}{ListView}
-\o \l{declarative/modelviews/objectlistmodel}{Object list model}
+\o \l{declarative/modelviews/objectlistmodel}{Object ListModel}
\o \l{declarative/modelviews/package}{Package}
\o \l{declarative/modelviews/parallax}{Parallax}
-\o \l{declarative/modelviews/stringlistmodel}{String list model}
+\o \l{declarative/modelviews/stringlistmodel}{String ListModel}
\o \l{declarative/modelviews/webview}{WebView}
\endlist
@@ -124,7 +125,10 @@ For example, from your build directory, run:
\o \l{declarative/xml/xmlhttprequest}{XmlHttpRequest}
\endlist
-\section2 \l{declarative/i18n}{Internationalization (i18n)}
+\section2 Internationalization (i18n)
+\list
+\o \l{declarative/i18n}{Example}
+\endlist
\section2 Threading
\list
@@ -132,11 +136,14 @@ For example, from your build directory, run:
\o \l{declarative/threading/workerscript}{WorkerScript}
\endlist
-\section2 \l{declarative/sqllocalstorage}{SQL Local Storage}
+\section2 SQL Local Storage
+\list
+\o \l{declarative/sqllocalstorage}{Example}
+\endlist
\section2 C++ Extensions
\list
-\o \l{declarative-cppextensions-reference.html}{Reference examples} (discussed in \l {Extending QML in C++})
+\o \l{declarative-cppextensions-reference.html}{Reference examples}
\o \l{declarative/cppextensions/plugins}{Plugins}
\o \l{declarative-cppextensions-qgraphicslayouts.html}{QGraphicsLayouts}
\o \l{declarative/cppextensions/qwidgets}{QWidgets}
@@ -148,7 +155,6 @@ For example, from your build directory, run:
\list
\o \l{declarative/toys/clocks}{Clocks}
\o \l{declarative/toys/corkboards}{Corkboards}
-\o \l{declarative/toys/dial}{Dial}
\o \l{declarative/toys/dynamicscene}{Dynamic Scene}
\o \l{declarative/toys/tic-tac-toe}{Tic Tac Toe}
\o \l{declarative/toys/tvtennis}{TV Tennis}
diff --git a/doc/src/declarative/extending-tutorial.qdoc b/doc/src/declarative/extending-tutorial.qdoc
index f00b858..7ec9087 100644
--- a/doc/src/declarative/extending-tutorial.qdoc
+++ b/doc/src/declarative/extending-tutorial.qdoc
@@ -107,7 +107,7 @@ The class implementation in \c musician.cpp simply sets and returns the \c m_nam
Our QML file, \c app.qml, creates a \c Musician item and display the musician's details
using a standard QML \l Text item:
-\quotefile declarative/tutorials/extending/chapter1-basics/app.qml
+\snippet declarative/tutorials/extending/chapter1-basics/app.qml 0
We'll also create a C++ application that uses a QDeclarativeView to run and
display \c app.qml. The application must register the \c Musician type
@@ -147,7 +147,7 @@ to the console and then emits a "performanceEnded" signal.
Other elements would be able to call \c perform() and receive
\c performanceEnded() signals like this:
-\quotefile declarative/tutorials/extending/chapter2-methods/app.qml
+\snippet declarative/tutorials/extending/chapter2-methods/app.qml 0
To do this, we add a \c perform() method and a \c performanceEnded() signal
to our C++ class:
@@ -193,7 +193,7 @@ other elements' values when property values change.
Let's enable property bindings for the \c instrument property. That means
if we have code like this:
-\quotefile declarative/tutorials/extending/chapter3-bindings/app.qml
+\snippet declarative/tutorials/extending/chapter3-bindings/app.qml 0
The "instrument: reddy.instrument" statement binds the \c instrument value of
\c craig to the \c instrument of \c reddy.
@@ -275,7 +275,7 @@ For example, let's change the type of the \c instrument property from a string t
new type called "Instrument". Instead of assigning a string value to \c instrument,
we assign an \c Instrument value:
-\quotefile declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml
+\snippet declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml 0
Like \c Musician, this new \c Instrument type has to inherit from QObject and declare
its properties with Q_PROPERTY():
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index bd0a9f5..7d4f9b9 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -49,251 +49,9 @@ Contains all the properties of the JavaScript global object, plus:
\section1 Qt Object
-The Qt object provides useful enums and functions from Qt, for use in all QML
+The \l{qml-qt.html}{Qt object} provides useful enums and functions from Qt, for use in all QML
files.
-\section2 Enums
-The Qt object contains all enums in the Qt namespace. For example, you can
-access the AlignLeft member of the Qt::AlignmentFlag enum with \c Qt.AlignLeft.
-
-For a full list of enums, see the \l{Qt Namespace} documentation.
-
-\section2 Types
-The Qt object also contains helper functions for creating objects of specific
-data types. This is primarily useful when setting the properties of an item
-when the property has one of the following types:
-
-\list
-\o Color
-\o Rect
-\o Point
-\o Size
-\o Vector3D
-\endlist
-
-There are also string based constructors for these types, see \l{qdeclarativebasictypes.html}{Qml Types}.
-
-\section3 Qt.rgba(qreal red, qreal green, qreal blue, qreal alpha)
-This function returns a Color with the specified \c red, \c green, \c blue and \c alpha components. All components should be in the range 0-1 inclusive.
-
-\section3 Qt.hsla(qreal hue, qreal saturation, qreal lightness, qreal alpha)
-This function returns a Color with the specified \c hue, \c saturation, \c lightness and \c alpha components. All components should be in the range 0-1 inclusive.
-
-\section3 Qt.rect(int x, int y, int width, int height)
-This function returns a Rect with the top-left corner at \c x, \c y and the specified \c width and \c height.
-\section3 Qt.point(int x, int y)
-This function returns a Point with the specified \c x and \c y coordinates.
-\section3 Qt.size(int width, int height)
-This function returns as Size with the specified \c width and \c height.
-\section3 Qt.vector3d(real x, real y, real z)
-This function returns a Vector3D with the specified \c x, \c y and \c z.
-
-\section2 Formatters
-The Qt object contains several functions for formatting dates and times.
-
-\section3 Qt.formatDate(datetime date, variant format)
-This function returns the string representation of \c date, formatted according to \c format.
-\section3 Qt.formatTime(datetime time, variant format)
-This function returns the string representation of \c time, formatted according to \c format.
-\section3 Qt.formatDateTime(datetime dateTime, variant format)
-This function returns the string representation of \c dateTime, formatted according to \c format.
-
-\c format for the above formatting functions can be specified as follows.
-
- These expressions may be used for the date:
-
- \table
- \header \i Expression \i Output
- \row \i d \i the day as number without a leading zero (1 to 31)
- \row \i dd \i the day as number with a leading zero (01 to 31)
- \row \i ddd
- \i the abbreviated localized day name (e.g. 'Mon' to 'Sun').
- Uses QDate::shortDayName().
- \row \i dddd
- \i the long localized day name (e.g. 'Monday' to 'Qt::Sunday').
- Uses QDate::longDayName().
- \row \i M \i the month as number without a leading zero (1-12)
- \row \i MM \i the month as number with a leading zero (01-12)
- \row \i MMM
- \i the abbreviated localized month name (e.g. 'Jan' to 'Dec').
- Uses QDate::shortMonthName().
- \row \i MMMM
- \i the long localized month name (e.g. 'January' to 'December').
- Uses QDate::longMonthName().
- \row \i yy \i the year as two digit number (00-99)
- \row \i yyyy \i the year as four digit number
- \endtable
-
- These expressions may be used for the time:
-
- \table
- \header \i Expression \i Output
- \row \i h
- \i the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
- \row \i hh
- \i the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
- \row \i m \i the minute without a leading zero (0 to 59)
- \row \i mm \i the minute with a leading zero (00 to 59)
- \row \i s \i the second without a leading zero (0 to 59)
- \row \i ss \i the second with a leading zero (00 to 59)
- \row \i z \i the milliseconds without leading zeroes (0 to 999)
- \row \i zzz \i the milliseconds with leading zeroes (000 to 999)
- \row \i AP
- \i use AM/PM display. \e AP will be replaced by either "AM" or "PM".
- \row \i ap
- \i use am/pm display. \e ap will be replaced by either "am" or "pm".
- \endtable
-
- All other input characters will be ignored. Any sequence of characters that
- are enclosed in singlequotes will be treated as text and not be used as an
- expression. Two consecutive singlequotes ("''") are replaced by a singlequote
- in the output.
-
- Example format strings (assumed that the date and time is 21 May 2001
- 14:13:09):
-
- \table
- \header \i Format \i Result
- \row \i dd.MM.yyyy \i 21.05.2001
- \row \i ddd MMMM d yy \i Tue May 21 01
- \row \i hh:mm:ss.zzz \i 14:13:09.042
- \row \i h:m:s ap \i 2:13:9 pm
- \endtable
-
-If no format is specified the locale's short format is used. Alternatively, you can specify
-\c Qt.DefaultLocaleLongDate to get the locale's long format.
-
-\section2 Functions
-The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML.
-
-\section3 Qt.lighter(color baseColor, real factor)
-This function returns a color lighter than \c baseColor by the \c factor provided.
-
-If the factor is greater than 1.0, this functions returns a lighter color.
-Setting factor to 1.5 returns a color that is 50% brighter. If the factor is less than 1.0,
-the return color is darker, but we recommend using the Qt.darker() function for this purpose.
-If the factor is 0 or negative, the return value is unspecified.
-
-The function converts the current RGB color to HSV, multiplies the value (V) component
-by factor and converts the color back to RGB.
-
-If \c factor is not supplied, returns a color 50% lighter than \c baseColor (factor 1.5).
-
-\section3 Qt.darker(color baseColor, real factor)
-This function returns a color darker than \c baseColor by the \c factor provided.
-
-If the factor is greater than 1.0, this function returns a darker color.
-Setting factor to 3.0 returns a color that has one-third the brightness.
-If the factor is less than 1.0, the return color is lighter, but we recommend using
-the Qt.lighter() function for this purpose. If the factor is 0 or negative, the return
-value is unspecified.
-
-The function converts the current RGB color to HSV, divides the value (V) component
-by factor and converts the color back to RGB.
-
-If \c factor is not supplied, returns a color 50% darker than \c baseColor (factor 2.0).
-
-\section3 Qt.tint(color baseColor, color tintColor)
- This function allows tinting one color with another.
-
- The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque.
-
- \qml
- Rectangle { x: 0; width: 80; height: 80; color: "lightsteelblue" }
- Rectangle { x: 100; width: 80; height: 80; color: Qt.tint("lightsteelblue", "#10FF0000") }
- \endqml
- \image declarative-rect_tint.png
-
- Tint is most useful when a subtle change is intended to be conveyed due to some event; you can then use tinting to more effectively tune the visible color.
-
-\section3 Qt.openUrlExternally(url target)
-This function attempts to open the specified \c target url in an external application, based on the user's desktop preferences. It will return true if it succeeds, and false otherwise.
-
-\section3 Qt.md5(data)
-This function returns a hex string of the md5 hash of \c data.
-
-\section3 Qt.btoa(data)
-Binary to ASCII - this function returns a base64 encoding of \c data.
-
-\section3 Qt.atob(data)
-ASCII to binary - this function returns a base64 decoding of \c data.
-
-\section3 Qt.quit()
-This function causes the QDeclarativeEngine::quit() signal to be emitted.
-Within the \l {Qt Declarative UI Runtime}{qml} application this causes the
-launcher application to exit.
-
-\section3 Qt.resolvedUrl(url)
-This function returns \c url resolved relative to the URL of the
-caller.
-
-\section3 Qt.fontFamilies()
-This function returns a list of the font families available to the application.
-
-\section3 Qt.isQtObject(object)
-Returns true if \c object is a valid reference to a Qt or QML object, otherwise false.
-
-\section1 Dynamic Object Creation
-The following functions on the global object allow you to dynamically create QML
-items from files or strings. See \l{Dynamic Object Management} for an overview
-of their use.
-
-
-\section2 Qt.createComponent(url file)
-
-This function takes the URL of a QML file as its only argument. It returns
-a component object which can be used to create and load that QML file.
-
-Here is an example. Remember that QML files that might be loaded
-over the network cannot be expected to be ready immediately.
-
-\snippet doc/src/snippets/declarative/componentCreation.js 0
-\codeline
-\snippet doc/src/snippets/declarative/componentCreation.js 1
-
-If you are certain the files will be local, you could simplify to:
-
-\snippet doc/src/snippets/declarative/componentCreation.js 2
-
-The methods and properties of the Component element are defined in its own
-page, but when using it dynamically only two methods are usually used.
-\c Component.createObject() returns the created object or \c null if there is an error.
-If there is an error, \l {Component::errorString()}{Component.errorString()} describes
-the error that occurred. Note that createObject() takes exactly one argument, which is set
-to the parent of the created object. Graphical objects without a parent will not appear
-on the scene, but if you do not wish to parent the item at this point you can safely pass
-in null.
-
-If you want to just create an arbitrary string of QML, instead of
-loading a QML file, consider the \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()} function.
-
-
-\section2 Qt.createQmlObject(string qml, object parent, string filepath)
-
-Creates a new object from the specified string of QML. It requires a
-second argument, which is the id of an existing QML object to use as
-the new object's parent. If a third argument is provided, this is used
-for error reporting as the filepath that the QML came from.
-
-Example (where \c targetItem is the id of an existing QML item):
-
-\snippet doc/src/snippets/declarative/createQmlObject.qml 0
-
-This function is intended for use inside QML only. It is intended to behave
-similarly to eval, but for creating QML elements.
-
-Returns the created object, \c or null if there is an error. In the case of an
-error, a QtScript Error object is thrown. This object has the additional property,
-qmlErrors, which is an array of all the errors encountered when trying to execute the
-QML. Each object in the array has the members \c lineNumber, \c columnNumber, \c fileName and \c message.
-
-Note that this function returns immediately, and therefore may not work if
-the QML loads new components. If you are trying to load a new component,
-for example from a QML file, consider the \l{Qt.createComponent(url file)}{Qt.createComponent()} function
-instead. 'New components' refers to external QML files that have not yet
-been loaded, and so it is safe to use \c Qt.createQmlObject() to load built-in
-components.
-
\section1 XMLHttpRequest
\target XMLHttpRequest
@@ -383,7 +141,7 @@ of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases.
The API can be used from JavaScript functions in your QML:
-\quotefile declarative/sqllocalstorage/hello.qml
+\snippet declarative/sqllocalstorage/hello.qml 0
The API conforms to the Synchronous API of the HTML5 Web Database API,
\link http://www.w3.org/TR/2009/WD-webdatabase-20091029/ W3C Working Draft 29 October 2009\endlink.
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index c6f754b..728eb13 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -81,7 +81,7 @@ of simple and dynamic elements.
\section2 Adding QML widgets to a QGraphicsScene
-If you have an existing UI based on the \l{The Graphics View Framework}{Graphics View Framework},
+If you have an existing UI based on the \l{Graphics View Framework},
you can integrate QML widgets directly into your QGraphicsScene. Use
QDeclarativeComponent to create a QGraphicsObject from a QML file, and
place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or
diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
new file mode 100644
index 0000000..64a4949
--- /dev/null
+++ b/doc/src/declarative/qml-intro.qdoc
@@ -0,0 +1,967 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+/*!
+
+\page qml-intro.html
+\title Beginning Qt Quick
+
+
+\section1 Overview
+
+
+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. Draw a rectangle, display an image at
+a position and so on. Behind these elements are complex C++ libraries that
+efficiently perform the action. As with any graphical application, always
+consider that this ability to easily build graphically rich applications means
+that some care may be needed to prevent performance problems.
+
+The language also allows more flexibility of these commands by using
+Javascript rather than C++ to add new layers of logic to your application.
+Javascript is easier to learn than C++ and can be embedded into the QML
+files or imported from a separate file.
+
+\bold{In QML the types of various 'objects' are referred to as \l {QML
+Elements}{ elements}}.
+
+An 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.
+
+
+\section1 A First Look
+
+The basic syntax of an \l {QML Elements}{element} is
+
+ \code
+ SomeElement {
+ id: myObject
+ ... some other things here ...
+ }
+ \endcode
+
+Here we are defining a new object. We specify its 'type' first as SomeElement.
+Then within matching braces { ... } we specify the various parts of our
+element.
+
+The \c id is a unique identifier for the element, it must start with a lower
+case letter and only contain letters, numbers and underscores. It is this
+particular object's name. If this SomeElement \l {QML Elements}{element} was
+a Rectangle instead and it was one of many then the \e optional unique id
+would allow us to manipulate each element individually.
+
+Each visual element is ultimately based on, or inherits from, an element
+called \l Item. \l Item has certain properties and actions that may be
+useful. The properties have default values so you need only specify the
+ones you will need.
+
+Take a simple element such as a \l Rectangle. It has an \c id, we will call
+it \e myRectangle, it has a \c width and a \c height. Imagine that we
+want a rectangle that is 500 pixels by 400 pixels in the x and y directions
+(horizontal by vertical).
+
+We can implement this \l Rectangle with these properties this way
+
+ \code
+ import Qt 4.7
+
+ // This is a comment. And below myRectangle is defined.
+ Rectangle {
+ id: myRectangle
+ width: 500
+ height: 400
+ }
+ \endcode
+
+This is a valid QML script. To run it, copy it and save it to a file, say
+myexample.qml, and on the command line run the command
+
+ \code
+ qml myexample.qml
+ \endcode
+
+It will create a very boring rectangle in its own window.
+
+
+
+\section1 Hello World!
+
+We can now add some color and text to make a Hello World QML program.
+
+\l Rectangle has the property \l {Rectangle::color}{color} to produce a
+background color.
+
+Text is handled by a different element called \l Text. We need to create a
+\l Text object inside the \l Rectangle and set its \l {Text::text}{text}
+property to "Hello World!". So to set the text to 'Hello world' and the
+background colour to light gray,
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: myRectangle
+ width: 500
+ height: 400
+
+ Text { text: "Hello World!" }
+
+ color: "lightgray"
+ }
+ \endcode
+
+
+\section1 Hello World Again
+
+From now on we will not always show the import statement for Qt but it
+should still be there when you create your QML scripts.
+
+To make our Hello World example a little nicer set the position of the text
+to be at pixel position x = 100, y = 100 within the displayed window. This
+position belongs to the \l Text element so we set the position inside its
+definition. Note that we separate different QML statements on the same line
+with a semi-colon, or we could have simply put each statement on a new line
+
+ \code
+ Text {
+ text: "<h2>Hello World</h2>"; color: "darkgreen"
+ x: 100; y:100
+ }
+ \endcode
+
+Not only did we reposition the text, but the text was altered by adding
+HTML tags to change the font size. The text color was also changed from the
+default black to dark green by using a standard string for the color's SVG
+name.
+
+We could also have used a hexadecimal string for the RGB (red-green-blue, as
+#rrggbb) values of the color similar to the method used in HTML. For
+example, mostly blue with a green tint,
+
+ \code
+ Text {
+ text: "<h1>Hello world again</h1>"
+ color: "#002288"
+ x: 100; y: 100
+ }
+ \endcode
+
+All of these changes occurred within the \l Text object which is the scope
+of these property changes.
+
+Other objects may use the information but it belongs to the element where
+the property has been defined.
+
+
+\section1 Images
+
+To add an image to our little application we use the \l Image element. An
+\l Image uses a path to an image file, and has properties to control
+the aspect ratio, the image size, to tile the area amongst others. The
+source of the image, the path to the file, is a URL. Therefore the file can
+be local: \e {mydir/myimage1.png}. Or it can be remote:
+\e {"http://www.example.com/images/myimage1.png"}.
+
+ \code
+ Image {
+ source: "images/qt-logo.png"
+ }
+ \endcode
+
+This displays the image, as we would expect, at the top left of the window.
+The position of the default x = 0, y = 0 coordinate. The example here uses
+a PNG file, but it could have been one of various supported formats,
+including JPG and GIF.
+
+Let us reposition the image and enlarge it. Place it at the same 'x' offset
+as the "Hello world again" text, but put it another 50 pixels below the
+text, also make it 150 by 150 pixels in size,
+
+ \code
+ Image {
+ source: "images/qt-logo.png"
+ x: 100; y: 150
+ width: 150; height: 150
+ }
+ \endcode
+
+Adding the Hello World example, with the text and the image example we can
+write a simple piece of QML that starts to look a bit better.
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: myRectangle
+ width: 500
+ height: 400
+
+ // A light gray background
+ color: "lightgray"
+
+ // Position and color some text
+ Text {
+ text: "<h1>Hello world again</h1>"
+ color: "darkgreen"
+ x: 100; y: 100
+ }
+
+ // Using the opportunity to resize the image.
+ Image {
+ source: "images/qt-logo.png"
+ x: 100; y: 150
+ width: 150; height: 150
+ }
+
+ }
+ \endcode
+
+The result is still quite simple
+
+\image qml-intro-helloa.png
+
+
+\section1 Anchors: Aligning Elements
+
+Using absolute positioning, such as saying x = 100 and y = 150, works well
+until the user or developer stretches or increases the size of the window.
+Then the positions need to be recalculated. What would be nice would be a
+relative means of positioning of objects in a window or rectangle. For
+example, we want to place an image at the bottom of a rectangle, we would
+like to specify the image's location as the 'bottom of the window', not a
+specific coordinate. We can do this with the anchors property, which
+objects inherit from Item.
+
+The anchors property is really a property group. It is a collection of
+related properties. It has properties within it which can be used by means
+of the dot notation.
+
+The dot notation uses object \c{id}s and property names to use a particular
+object or property. Say I have a rectangle r1, which contains a rectangle
+r2, which contains an Item item1, which has an 'x' property I want to
+change. I just use the dot notation to identify it: r1.r2.item1.x
+
+If we want to position an image at the bottom of the rectangle it is
+inside. I have to specify that the bottom of the image is also at the
+bottom of the rectangle
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: myWin
+ width: 500
+ height: 400
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ width: 150; height: 150
+ anchors.bottom: myWin.bottom
+ }
+ }
+ \endcode
+
+This places the logo at the bottom left of the window.
+
+\image qml-intro-anchors1.png "A simple anchor"
+
+We would like it centered and not touching the bottom of the window, for
+aesthetic reasons. For the centering we use the horizontalCenter property,
+and to prevent the touching of the image to the bottom of the rectangle,
+the bottomMargin property is used. So the new actions for the script are
+
+ \list
+ \o set the bottom of the image (anchors.bottom) to be the bottom of the window
+ \o move the image to be in the horizontal center of the window
+ \o set a margin of 10 pixels so that the image does not touch the bottom window border
+ \endlist
+
+Encoded into QML the script becomes
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: myWin
+ width: 500
+ height: 400
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ width: 150; height: 150
+ anchors.bottom: myWin.bottom
+ anchors.horizontalCenter: myWin.horizontalCenter
+ anchors.bottomMargin: 10
+ }
+ }
+ \endcode
+
+
+Run this and resize the window. You will see that now the position of the
+image adjusts during the resize.
+
+\image qml-intro-anchors2.png "Image Centered at the Bottom"
+
+You can also add another object say a block of descriptive text and place
+it above or below the image or to the side. This code places some text just
+above the image
+
+ \code
+ Text {
+ text: "<h2>The Qt Logo</h2>"
+ anchors.bottom: image1.top
+ anchors.horizontalCenter: myWin.horizontalCenter
+ anchors.bottomMargin: 15
+ }
+ \endcode
+
+\image qml-intro-anchors3.png
+
+\note \e anchors is a property group, to be used within the object. When
+referencing these properties from another object we use the property
+directly, instead of saying:
+
+ \code
+ myRectangle.anchors.top // Wrong
+ \endcode
+
+we use
+
+ \code
+ myRectangle.top // Correct
+ \endcode
+
+
+
+
+\section1 Transformations
+
+We can transform a graphical object to get additional effects. Rotate a
+piece of text by 180 degrees to display upside-down text. Rotate an image
+by 90 degrees to lay it on its side. These transformations require
+additonal information.
+
+For rotation, the additional information includes: the origin relative to
+the object being rotated, the axis of rotation, and the angle in degrees to
+rotate the image through in a clockwise direction. The axis does not have
+to be the z-axis, the line between your eyes and the image, it could be
+along the vertical y-axis or the horizontal x-axis. We have three
+dimensions to play with. For simplicity in this example we will rotate
+about the z-axis by 90 degrees in a negative direction, anti-clockwise.
+
+Rotation of text was also suggested. It could also be useful to scale the
+text. We can do both. The \l {Item::transform}{transform} property is a
+\e list of \l Transform elements, so using the list syntax
+
+ \code
+ myList: [ listElement1, listElement2, ... } ]
+ \endcode
+
+we can produce a list of transformations.
+
+The text will be rotated by 45 degrees anti-clockwise and scaled
+vertically by a factor of 1.5 and by 1.2 horizontally.
+
+Using the example above as the basis for this we have,
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: myWin
+ width: 500
+ height: 400
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ width: 150; height: 150
+ anchors.bottom: myWin.bottom
+ anchors.horizontalCenter: myWin.horizontalCenter
+ anchors.bottomMargin: 10
+
+ transform: Rotation {
+ origin.x: 75; origin.y: 75
+ axis{ x: 0; y: 0; z:1 } angle: -90
+ }
+
+ }
+
+ Text {
+ text: "<h2>The Qt Logo -- taking it easy</h2>"
+ anchors.bottom: image1.top
+ anchors.horizontalCenter: myWin.horizontalCenter
+ anchors.bottomMargin: 15
+
+ transform: [
+ Scale { xScale: 1.5; yScale: 1.2 } ,
+
+ Rotation {
+ origin.x: 75; origin.y: 75
+ axis{ x: 0; y: 0; z:1 } angle: -45
+ }
+ ]
+ }
+ }
+ \endcode
+
+The code block in \c image1 starting with \c transform specifies that the
+\l {Item::transform}{transform} property will be a Rotation through -90
+degrees, which is anti-clockwise, about the z-axis running through the
+center of the image at (75,75), since the image is 150 x 150 pixels.
+
+The other transformation available is \l Translate. This produces a change
+in position of the item.
+
+\note In a list of transformations the order of the transformations is
+important. In the above example try swapping around the Scale transform with
+the Rotation transform, remember to remove or add the comma. The results are
+acceptable for our little test but not the same.
+
+
+\section1 Animations
+
+Animation in QML is done by animating properties of objects. Properties
+that are numbers, colors, Rectangles, points and directions. In QML these
+are \l {QML Basic Types} named as real, int, color, rect, point, size, and
+vector3d. There are a number of different ways to do animation. Here we
+will look at a few of them.
+
+\section2 Number Animation
+
+Previously we have used a rotation transformation to change the orientation
+of an image. We could easily animate this rotation so that instead of a
+straight rotation counter-clockwise of 90 degrees we could rotate the image
+through a full 360 degrees in an animation. The axis of rotation wont
+change, the position of the center of the image will not change, only the
+angle will change. Therefore, a NumberAnimation of a rotation's angle should
+be enough for the task. If we wish for a simple rotation about the center
+of the image then we can use the \c rotation property that is inherited
+from \l Item. The rotation property is a real number that specifies the
+angle in a clockwise direction for the rotation of the object. Here is the
+code for our animated rotating image.
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: mainRec
+ width: 600
+ height: 400
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ x: 200; y: 100
+ width: 100; height: 100
+
+ // Animate a rotation
+ transformOrigin: Item.Center
+ NumberAnimation on rotation {
+ from: 0; to: 360
+ duration: 2000
+ loops: Animation.Infinite
+ }
+ }
+ }
+ \endcode
+
+The \c {transformOrigin: Item.Center} is redundant since this is the default
+axis of rotation anyway. But if you change \c Center to \c BottomRight you
+will see an interesting variation.
+
+Also if instead the \l Rotation transformation had been used then we would have
+more control over the various parameters. We could vary the axis, to be not
+just a different offset from the z-axis but along the y-axis, x-axis or
+combination. For example, if the task had been to animate the rotation
+about the y-axis passing through the center of the image then the following
+code would do it.
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: mainRec
+ width: 600
+ height: 400
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ x: 200; y: 100
+ width: 100; height: 100
+
+ // Animate a rotation
+ transform: Rotation {
+ origin.x: 50; origin.y: 50; axis {x:0; y:1; z:0} angle:0
+ NumberAnimation on angle {
+ from: 0; to: 360;
+ duration: 3000;
+ loops: Animation.Infinite
+ }
+ }
+ }
+ }
+ \endcode
+
+Here there is a rectangle 600 by 400 pixels. Placed within that rectangle
+is an image 100 by 100 pixels. It is rotated about the center of the image
+about the y-axis so that it looks as if it is rotating about an invisible
+vertical string holding it up. The time it takes to complete the rotation is 3
+seconds (3,000 milliseconds). The NumberAnimation is applied to the angle
+taking it from 0 (no change) to 360 degrees, back where it started.
+Strictly speaking it isn't necessary to go from 0 to 360 since the same
+location is duplicated, but it makes it easier to read in this example and
+it has no visible effect on the animation. The number of loops that the
+animation will execute is set to \c {Animation.Infinite} which means that the
+animation is in an endless loop.
+
+To see an interesting variation. Change the axis to \c {axis { x:1; y:1; z:1
+}}. This is a line coming from the center of the image downwards to the
+right and out of the screen. Although the change is simple the rotation
+seems complex.
+
+\section2 Sequential Animation
+
+For a more complex animation we will need two images. The first image will
+be placed at the center of a window (Rectangle) and the second image will
+be at the upper left of the window. The animation will move the second
+image from the top left of the window to the bottom right. In doing so we
+will be animating the position and the size of the image.
+
+First create two images
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: mainRec
+ width: 600
+ height: 400
+ z: 0
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ x: 20; y: 20 ; z: 1
+ width: 100; height: 100
+ }
+
+ Image {
+ id: image2
+ source: "images/qt-logo.png"
+ width: 100; height: 100
+ x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
+ z: 2
+ }
+ }
+ \endcode
+
+We will add to 'image1' a SequentialAnimation from x = 20 to the target of
+x = 450. The 'from' values will be used because we will be repeating the
+animation, so the object needs to know where the original position is, both
+x and y. The SequentialAnimation of x will set it to repeat by indicating
+that the number of animation loops is infinite, meaning that the 'loop'
+counter will be set to a value Animation.Infinite that indicates an endless
+cycle. Also there will be a NumberAnimation to vary the numeric property
+between the x values and over a given duration. After the NumberAnimation
+there will be a PauseAnimation that will pause the animation for 500
+milliseconds (half a second) simply for the visual effect.
+
+ \code
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation { from: 20; to: 450; easing.type: "InOutQuad";
+duration: 2000 }
+ PauseAnimation { duration: 500 }
+ }
+ \endcode
+
+A similar block of code is written for the animation of the 'y' value of
+the position.
+
+We will also animate the scale of the object, so as it goes from top left
+to bottom right of the window it will become smaller until about midway,
+and then become larger. To complete the animation we will set the 'z'
+values of the images. 'z' is the stacking order, the z-axis effectively
+points out from the screen to your eyes with the default value of 'z' being
+0. So if we set the Rectangle to have z with value zero, just to be sure,
+and image1 to 1 and image2 to 2 then image2 will be in the foreground and
+image1 in the background. When image1 passes image2 it will pass behind it.
+The completed code looks like
+
+ \code
+ Rectangle {
+ id: mainRec
+ width: 600
+ height: 400
+ z: 0
+
+ Image {
+ id: image2
+ source: "images/qt-logo.png"
+ width: 100; height: 100
+ x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
+ z: 2
+ }
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ x: 20; y: 20 ; z: 1
+ width: 100; height: 100
+
+ SequentialAnimation on x {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 20; to: 450
+ easing.type: "InOutQuad"; duration: 2000
+ }
+ PauseAnimation { duration: 500 }
+ }
+
+ SequentialAnimation on y {
+ loops: Animation.Infinite
+ NumberAnimation {
+ from: 20; to: 250
+ easing.type: "InOutQuad"; duration: 2000
+ }
+ PauseAnimation { duration: 500 }
+ }
+
+ SequentialAnimation on scale {
+ loops: Animation.Infinite
+ NumberAnimation { from: 1; to: 0.5; duration: 1000 }
+ NumberAnimation { from: 0.5; to: 1; duration: 1000 }
+ PauseAnimation { duration: 500 }
+ }
+ }
+ }
+ \endcode
+
+The \c {easing.type} has many options, expressed as a string. It specifies the
+kind of equation that describes the acceleration of the property value, not
+necessarily position, over time.
+
+For example, \e InOutQuad means that at the start and the end of the animation the
+'velocity' is low but the acceleration or deceleration is high. Much like a car
+accelerating from stop, and decelerating to stop at the end of a journey,
+with the maximum speed being in the middle. Examine the \l {PropertyAnimation::easing.type}
+{easing} documentation and the various graphs that show the effect. The horizontal
+axis, 'progress', can be thought of as time. The vertical axis is the value
+of the particular property.
+
+In discussing animation we need to describe three objects: State, MouseArea
+and Signals. Although independent of the animation elements, animation
+delivers some of the best examples that illustrate these new elements.
+
+
+
+\section2 Animation Summary
+
+\table
+ \header
+ \o Name
+ \o Description
+ \row
+ \o PropertyAnimation
+ \o a property value on a target object is varied to a specified value over a given time.
+
+ \row
+ \o NumberAnimation
+ \o animate a numeric property from one value to another over a given time.
+
+ \row
+ \o PauseAnimation
+ \o results in the task waiting for the specified duration, in milliseconds.
+
+ \row
+ \o SequentialAnimation
+ \o allows us to list in order the animation events we want to occur, first A then B then C and so on.
+
+ \row
+ \o ParallelAnimation
+ \o enables us to run different animations at the same time instead of sequentially.
+
+\endtable
+
+
+
+
+
+\section1 Using States
+
+A state is a defined set of values in the configuration of an object and
+often depends on the previous state. For example, a glass could be in a
+state we call 'HalfFull' if it is being filled with a liquid and has
+reached half of its total capacity. We could also have a state called
+HalfEmpty which is the state that occurs when the amount of liquid drops to
+half of the glass's capacity. Both states represent the same amount of
+liquid, but we consider them different. Likewise, states in a program
+represent not just values but may include how the current values were
+reached.
+
+When a state changes a \e transition occurs. This is an opportunity to make
+changes or take actions that depend on the movement to the new state. For
+example, if we had a scene in the country where the state variable has two
+states "daylight" and "night". Then when the state changes to "night" at
+this transition the sky would be made dark, stars would be shown, the
+countryside would be darkened. And when the state changes to "daylight" the
+opposite changes would be made: the sky is now blue, the scenery is green,
+there is a sun in the sky.
+
+Here is a simple QML program that shows the change of state in the above
+example. We have two rectangles, the top one is the 'sky' and the bottom
+one is the 'ground'. We will animate the change from daylight to night.
+There will be two states, but we only need to define one since 'daylight'
+will be the default state. We will just go to 'night' by clicking and
+holding the left mouse button down, releasing the mouse button will reverse
+the process
+
+ \code
+ import Qt 4.7
+
+ Rectangle {
+ id: mainRectangle
+ width: 600
+ height: 400
+ color: "black"
+
+ Rectangle {
+ id: sky
+ width: 600
+ height: 200
+ y: 0
+ color: "lightblue"
+ }
+
+ Rectangle {
+ id: ground
+ width: 600; height: 200
+ y: 200
+ color: "green"
+ }
+
+ MouseArea {
+ id: mousearea
+ anchors.fill: mainRectangle
+ }
+
+ states: [ State {
+ name: "night"
+ when: mousearea.pressed == true
+ PropertyChanges { target: sky; color: "darkblue" }
+ PropertyChanges { target: ground; color: "black" }
+ },
+ State {
+ name: "daylight"
+ when: mousearea.pressed == false
+ PropertyChanges { target: sky; color: "lightblue" }
+ PropertyChanges { target: ground; color: "green" }
+ }
+ ]
+
+ transitions: [ Transition {
+ from: "daylight"; to: "night"
+ ColorAnimation { duration: 1000 }
+ },
+ Transition {
+ from: "night"; to: "daylight"
+ ColorAnimation { duration: 500 }
+ }
+ ]
+ }
+ \endcode
+
+Several new things appear in this sample. Firstly, we use a \l MouseArea
+element to detect mouse clicks in the \e mainRectangle. Secondly, we use
+the list notation [ thing1 , thing2, ... ] to build a list of states and a
+list of transitions.
+
+\l MouseArea defines a region that will respond to mouse clicks. In this case
+we are only concerned with when the mouse is pressed or not pressed, not
+the particular button or other details. The area of the MouseArea is the
+entire main window, mainRectangle, so that clicking anywhere in this region
+will start the animation. Since we are using the 'pressed' mouse state,
+then the animation will move from 'daylight' to 'night' only while the mouse
+button remains pressed.
+
+When the button is released the 'daylight' state is entered and the
+transition from 'night' to 'daylight' is triggered causing the animation to
+run. The transition specifies the duration in milliseconds of the
+ColorAnimation, while the state specifies the color of the new state.
+
+The PropertyChanges command is the way that we nominate which properties
+will change in a change of state, and what new value the property will
+take. Since, for example, we want the 'sky' region to turn to dark blue and
+the 'ground' region to turn to black for the 'night' state, then the
+rectangles for those regions are the 'target' and the property in the target
+is 'color'.
+
+
+\section1 Signals
+
+Signals are simply events that can be hooked up to actions we want performed.
+In QML they are usually preceded by the word 'on', for example in the animation
+using a MouseArea the signal was \l {MouseArea::onPressed}{onPressed}. If
+you look at the C++ documentation you will see a lot of talk about
+\l {Signals & Slots}{Signals and Slots}. Signals are connected to Slots. The
+signal represents an event and the Slot is the function that does something
+based on that event. You can also have Signals connected to other Signals, so
+that one Signal (event) triggers another Signal (event), and so forth. It is
+nice to know this is what happens beneath the QML layer but not essential for
+using QML.
+
+Most elements do not have Signals associated with them. However, a few like
+the \l Audio element have many signals. Some of the \l Audio signals are
+used to represent events such as when the audio is stopped, play is pressed,
+paused, and reaching the end of the media. They allow the developer to connect,
+ for example, the press of a user interface button (perhaps a MouseArea) to
+ some QML that will handle this event.
+
+
+\section1 Analyzing An Example: Dial
+
+In the Qt \e {examples/declarative/toys} folder you will find a folder
+\e {dial} which contains the \e dial example.
+
+\image qml-dial.png "QML Dial example with Slider"
+
+In essence this small application has a sliding bar that you can slide using
+a mouse, and a graphical dial that responds to the position of the slider.
+
+The code for the example is in two parts: Dial.qml and dial-example.qml.
+
+\e {Dial.qml} can be found in the \e content sub-directory. It defines a Dial
+component similar to an odometer. Eventually, the example will hook up a slider
+component so that moving the slider will change the position of a needle on the
+dial.
+
+The code for the Dial, identified by the name of the file, contains four images
+in overlapping order: the background (numbers and divisions), the shadow of the
+needle, the needle itself, and finally the 'glass' overlay (containing
+transparent layers).
+
+The needle_shadow.png image has a Rotation assigned to the \e transform
+attribute of the \l Image. The rotation is set to match the angle of the needle
+image angle value \e {needleRotation.angle}. Both the needle and the
+needle_shadow have the same default \e x and \e y values but the rotation origin
+for the needle is slightly different so that a shadow will be evident as the
+needle moves.
+
+\snippet ../../examples/declarative/toys/dial/content/Dial.qml needle_shadow
+
+And the needle
+
+\snippet ../../examples/declarative/toys/dial/content/Dial.qml needle
+
+The final image is the overlay which simply has a position defined.
+
+\snippet ../../examples/declarative/toys/dial/content/Dial.qml overlay
+
+\e {dial-example.qml} in the \e {examples/declarative/toys/dial} directory is the
+main file of the example. It defines the visual environment that the Dial
+will fit into. Because the \e Dial component and the images live in the \e
+content sub-directory we will have to import this into \e dial-example. So the
+start of the file looks like
+
+ \code
+ import Qt 4.7
+ import "content"
+ \endcode
+
+The visual space is bound by a 300 by 300 pixel \l Rectangle which is given
+a gray color. Inside this rectangle is our component \e Dial and a \l Rectangle.
+Inside the rectangle called 'container' is another rectangle with the
+interesting name 'slider'.
+
+\snippet ../../examples/declarative/toys/dial/dial-example.qml 0
+
+The Dial component, named 'dial, is \e anchored to the center of the main
+rectangle. The \c value attribute of 'dial' is set to a value based on the
+'slider' horizontal position and the 'container' width. So changes to the
+'slider' position will change the Dial \c value which is used in Dial to compute
+the rotation of the needle image. Notice this piece of code in Dial where
+the change in \c value modifies the position of the needle.
+
+ \code
+ SpringFollow on angle {
+ spring: 1.4
+ damping: .15
+ to: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
+ }
+ \endcode
+
+This is part of the \c needleRotation that rotates the needle and causes the
+rotation of its shadow. \l SpringFollow is an element that modifies the value
+of that rotation angle \e to and mimics the oscillatory behavior of a spring,
+with the appropriate \e spring constant to control the acceleration and the \e
+damping to control how quickly the effect dies away.
+
+The 'container' is light gray with a color gradient defined using
+\l GradientStop. The gradient is applied vertically. If you need a horizontal
+gradient then you could apply the vertical gradient and then rotate the item
+by 90 degrees.
+
+The 'slider' is dark gray and also has a vertical color gradient. The most
+important thing about the 'slider' is that it has a MouseArea defined, which
+specifies a \c {drag.target} on itself along the X-axis. With minimum
+and maximum values on the X-axis defined. So we can click on the 'slider' and
+drag it left and right within the confines of the 'container'. The motion of
+the 'slider' will then change the \c value attribute in \e Dial as discussed
+already.
+
+Also notice the use of a \c radius value for a rectangle. This produces rounded
+corners. That is how the 'container' and 'slider' are displayed with a
+pleasant rounded look.
+
+
+
+*/
+
+
+
diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
index 670a218..f7cb722 100644
--- a/doc/src/declarative/qtdeclarative.qdoc
+++ b/doc/src/declarative/qtdeclarative.qdoc
@@ -62,7 +62,7 @@
\endcode
For more information on the Qt Declarative module, see the
- \l{declarativeui.html}{Declarative UI} documentation.
+ \l{declarativeui.html}{Qt Quick} documentation.
*/
@@ -112,7 +112,7 @@
Returns the QML type id.
- \sa qmlRegisterTypeNotAvailable
+ \sa qmlRegisterTypeNotAvailable()
*/
/*!
@@ -147,7 +147,7 @@ fun.qml: Get back to work, slacker!
Without this, a generic "Game is not a type" message would be given.
- \sa qmlRegisterUncreatableType
+ \sa qmlRegisterUncreatableType()
*/
/*!
diff --git a/doc/src/demos/boxes.qdoc b/doc/src/demos/boxes.qdoc
index aeb2513..367eb52 100644
--- a/doc/src/demos/boxes.qdoc
+++ b/doc/src/demos/boxes.qdoc
@@ -44,7 +44,7 @@
\title Boxes
This demo shows Qt's ability to combine advanced OpenGL rendering with the
- the \l{The Graphics View Framework}{Graphics View} framework.
+ the \l{Graphics View Framework}.
\image boxes-demo.png
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index 16718f3..51974af 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -775,24 +775,8 @@
assemblies at the
\l {http://msdn.microsoft.com/en-us/library/aa376307.aspx}{MSDN website}.
- There are two ways to include the run time libraries: by bundling them
- directly with your application or by installing them on the end-user's
- system.
-
- To bundle the run time libraries with your application, copy the directory
-
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 22
-
- into the folder where your executable is, so that you are including a
- \c Microsoft.VC80.CRT directory alongside your application's executable. If
- you are bundling the runtimes and need to deploy plugins as well, you have
- to remove the manifest from the plugins (embedded as a resource) by adding
- the following line to the \c{.pro} file of the plugins you are compiling:
-
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 23
-
- \warning If you skip the step above, the plugins will not load on some
- systems.
+ The correct way to include the runtime libraries with your application
+ is to ensure that they are installed on the end-user's system.
To install the runtime libraries on the end-user's system, you need to
include the appropriate Visual C++ Redistributable Package (VCRedist)
@@ -823,11 +807,11 @@
In brief the steps are
\list 1
-
+
\o create a folder structure on the development computer that will match the target USB stick directory structure, for example '\\app' and for your dlls, '\\app\\lib'.
-
+
\o on the development computer, from the appropriate 'redist' folder copy over Microsoft.VC80.CRT and Microsoft.VC80.MFC to the directories '\\app' and '\\app\\lib' on the development PC.
-
+
\o xcopy the \\app folder to the target USB stick.
\endlist
diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc
index 87c973a..a39f89a7 100644
--- a/doc/src/examples/diagramscene.qdoc
+++ b/doc/src/examples/diagramscene.qdoc
@@ -54,13 +54,13 @@
colors, and it is possible to change the font, style, and
underline of the text.
- The Qt graphics view framework is designed to manage and
- display custom 2D graphics items. The main classes of the
- framework are QGraphicsItem, QGraphicsScene and QGraphicsView. The
- graphics scene manages the items and provides a surface for them.
+ The Qt graphics view framework is designed to manage and display
+ custom 2D graphics items. The main classes of the framework are
+ QGraphicsItem, QGraphicsScene and QGraphicsView. The graphics
+ scene manages the items and provides a surface for them.
QGraphicsView is a widget that is used to render a scene on the
- screen. See the \l{The Graphics View Framework}{overview document}
- for a more detailed description of the framework.
+ screen. See the \l{Graphics View Framework} for a more detailed
+ description of the framework.
In this example we show how to create such custom graphics
scenes and items by implementing classes that inherit
diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc
index ca994e8..2b87840 100644
--- a/doc/src/examples/drilldown.qdoc
+++ b/doc/src/examples/drilldown.qdoc
@@ -292,7 +292,7 @@
\codeline
\snippet examples/sql/drilldown/view.h 1
- The QGraphicsView class is part of the \l {The Graphics View
+ The QGraphicsView class is part of the \l {Graphics View
Framework} which we will use to display the images of Nokia's
Qt offices. To be able to respond to user interaction;
i.e., showing the
@@ -388,8 +388,8 @@
reason we must create a custom item class is that we want to catch
the item's hover events, animating the item when the mouse cursor
is hovering over the image (by default, no items accept hover
- events). Please see the \l{The Graphics View Framework}
- documentation and the \l{Graphics View Examples} for more details.
+ events). Please see the \l{Graphics View Framework} documentation
+ and the \l{Graphics View Examples} for more details.
\snippet examples/sql/drilldown/view.cpp 5
@@ -399,7 +399,7 @@
function calls the private \c showInformation() function to pop up
the associated information window.
- \l {The Graphics View Framework} provides the qgraphicsitem_cast()
+ The \l {Graphics View Framework} provides the qgraphicsitem_cast()
function to determine whether the given QGraphicsItem instance is
of a given type. Note that if the event is not related to any of
our image items, we pass it on to the base class implementation.
@@ -456,7 +456,7 @@
borders.
Finally, we store the location ID that this particular record is
- associated with as well as a z-value. In the \l {The Graphics View
+ associated with as well as a z-value. In the \l {Graphics View
Framework}, an item's z-value determines its position in the item
stack. An item of high Z-value will be drawn on top of an item
with a lower z-value if they share the same parent item. We also
@@ -477,7 +477,7 @@
there is no current mouse grabber item. They are sent when the
mouse cursor enters an item, when it moves around inside the item,
and when the cursor leaves an item. As we mentioned earlier, none
- of the \l {The Graphics View Framework}'s items accept hover
+ of the \l {Graphics View Framework}'s items accept hover
event's by default.
The QTimeLine class provides a timeline for controlling
diff --git a/doc/src/examples/mandelbrot.qdoc b/doc/src/examples/mandelbrot.qdoc
index 7a3c1cd..11173a8 100644
--- a/doc/src/examples/mandelbrot.qdoc
+++ b/doc/src/examples/mandelbrot.qdoc
@@ -285,7 +285,7 @@
\snippet examples/threads/mandelbrot/mandelbrotwidget.cpp 8
If the pixmap has the right scale factor, we draw the pixmap directly onto
- the widget. Otherwise, we scale and translate the \l{The Coordinate
+ the widget. Otherwise, we scale and translate the \l{Coordinate
System}{coordinate system} before we draw the pixmap. By reverse mapping
the widget's rectangle using the scaled painter matrix, we also make sure
that only the exposed areas of the pixmap are drawn. The calls to
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index c2237d6..56ba1c7 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -271,6 +271,8 @@
This example displays a set of clocks with different times for different cities.
Each clock is created by combining \l Image elements with \l Rotation transforms
and \l SpringFollow animations.
+
+ \image qml-clocks-example.png
*/
/*!
@@ -280,14 +282,8 @@
This example presents a flickable set of interactive corkboards. It is created
through a combination of elements like \l ListModel, \l Repeater and \l TextEdit
together with rotation and scaling transforms, animation and mouse interaction.
-*/
-
-/*!
- \title Toys: Dial
- \example declarative/toys/dial
- This example presents an interactive speedometer-type dial by combining
- \l Image elements with \l Rotation transforms and \l SpringFollow animations.
+ \image qml-corkboards-example.png
*/
/*!
@@ -297,6 +293,8 @@
This example presents an interactive drag-and-drop scene. It demonstrates
how to use QML's \l{Dynamic Object Creation} support to dynamically create and
destroy objects.
+
+ \image qml-dynamicscene-example.png
*/
/*!
@@ -304,6 +302,8 @@
\example declarative/toys/tic-tac-toe
This example presents a simple implementation of Tic Tac Toe.
+
+ \image qml-tic-tac-toe-example.png
*/
/*!
@@ -312,6 +312,8 @@
This example shows how to use animation components such as \l SpringFollow,
\l SequentialAnimation and \l PropertyAction to create a game of TV tennis.
+
+ \image qml-tvtennis-example.png
*/
/*!
@@ -329,10 +331,23 @@
*/
/*!
+ \title UI Components: Dial
+ \example declarative/ui-components/dialcontrol
+
+ This example presents an interactive speedometer-type dial by combining
+ \l Image elements with \l Rotation transforms and \l SpringFollow animations.
+
+ \image qml-dialcontrol-example.png
+*/
+
+
+/*!
\title UI Components: Flipable
\example declarative/ui-components/flipable
This example shows how to use the Flipable element.
+
+ \image qml-flipable-example.png
*/
/*!
@@ -340,6 +355,8 @@
\example declarative/ui-components/progressbar
This example shows how to create a progress bar.
+
+ \image qml-progressbar-example.png
*/
/*!
@@ -349,6 +366,8 @@
This example shows how to create scroll bars for a Flickable element
using the \l {Flickable::visibleArea.xPosition}{Flickable::visibleArea}
properties.
+
+ \image qml-scrollbar-example.png
*/
/*!
@@ -356,6 +375,8 @@
\example declarative/ui-components/searchbox
This example shows how to create a search box.
+
+ \image qml-searchbox-example.png
*/
/*!
@@ -363,6 +384,8 @@
\example declarative/ui-components/slideswitch
This example shows how to create a slide switch.
+
+ \image qml-slideswitch-example.png
*/
/*!
@@ -370,6 +393,8 @@
\example declarative/ui-components/spinner
This example shows how to create a spinner-type component.
+
+ \image qml-spinner-example.png
*/
/*!
@@ -377,6 +402,8 @@
\example declarative/ui-components/tabwidget
This example shows how to create a tab widget.
+
+ \image qml-tabwidget-example.png
*/
/*!
diff --git a/doc/src/examples/qml-flickr.qdoc b/doc/src/examples/qml-flickr.qdoc
index ebf3250..43fcf1f 100644
--- a/doc/src/examples/qml-flickr.qdoc
+++ b/doc/src/examples/qml-flickr.qdoc
@@ -45,5 +45,5 @@
This demo shows how to write a mobile Flickr browser application in QML.
- \image qml-flickr-example.png
+ \image qml-flickr-demo.png
*/
diff --git a/doc/src/examples/qml-minehunt.qdoc b/doc/src/examples/qml-minehunt.qdoc
index 773f216..b2c662d 100644
--- a/doc/src/examples/qml-minehunt.qdoc
+++ b/doc/src/examples/qml-minehunt.qdoc
@@ -43,7 +43,8 @@
\title Minehunt
\example demos/declarative/minehunt
- This demo shows how to create a simple Minehunt game with QML and C++.
+ This demo shows how to create a simple Minehunt game, using QML for the
+ UI and a C++ plugin for the game logic.
- \image qml-minehunt-example.png
+ \image qml-minehunt-demo.png
*/
diff --git a/doc/src/examples/qml-photoviewer.qdoc b/doc/src/examples/qml-photoviewer.qdoc
index d1c3da2..d2114b9 100644
--- a/doc/src/examples/qml-photoviewer.qdoc
+++ b/doc/src/examples/qml-photoviewer.qdoc
@@ -45,5 +45,5 @@
This demo shows how to write a Flickr photo viewer application in QML.
- \image qml-photoviewer-example.png
+ \image qml-photoviewer-demo.png
*/
diff --git a/doc/src/examples/qml-rssnews.qdoc b/doc/src/examples/qml-rssnews.qdoc
index 0e7bdef..801efd9 100644
--- a/doc/src/examples/qml-rssnews.qdoc
+++ b/doc/src/examples/qml-rssnews.qdoc
@@ -45,5 +45,5 @@
This demo shows how to write a RSS news reader in QML.
- \image qml-rssnews-example.png
+ \image qml-rssnews-demo.png
*/
diff --git a/doc/src/examples/qml-samegame.qdoc b/doc/src/examples/qml-samegame.qdoc
index d9a9c7c..5b78b0c 100644
--- a/doc/src/examples/qml-samegame.qdoc
+++ b/doc/src/examples/qml-samegame.qdoc
@@ -43,7 +43,8 @@
\title Same Game
\example demos/declarative/samegame
- This demo shows how to write a Same Game in QML.
+ This demo shows how to write a 'Same Game' game in QML, using Javascript
+ for all the game logic.
- \image qml-samegame-example.png
+ \image qml-samegame-demo.png
*/
diff --git a/doc/src/examples/qml-snake.qdoc b/doc/src/examples/qml-snake.qdoc
index 373ca13..3125f2d 100644
--- a/doc/src/examples/qml-snake.qdoc
+++ b/doc/src/examples/qml-snake.qdoc
@@ -43,7 +43,8 @@
\title Snake
\example demos/declarative/snake
- This demo shows how to write a Snake game in QML.
+ This demo shows how to write a Snake game in QML, controlled by the
+ keyboard as well as the mouse.
- \image qml-snake-example.png
+ \image qml-snake-demo.png
*/
diff --git a/doc/src/examples/qml-twitter.qdoc b/doc/src/examples/qml-twitter.qdoc
new file mode 100644
index 0000000..0e66360
--- /dev/null
+++ b/doc/src/examples/qml-twitter.qdoc
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Twitter Mobile
+ \example demos/declarative/twitter
+
+ This demo shows how to write a mobile Twitter client in QML. Use it to
+ tweet us(@qtbynokia) how much you like our demos!
+
+ \image qml-twitter-demo.png
+*/
diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc
index 0d8de1d..0c246cb 100644
--- a/doc/src/examples/transformations.qdoc
+++ b/doc/src/examples/transformations.qdoc
@@ -87,7 +87,7 @@
tranformation matrix that you can retrieve using the
QPainter::worldTransform() function. A matrix transforms a point in the
plane to another point. For more information about the
- transformation matrix, see the \l {The Coordinate System} and
+ transformation matrix, see the \l {Coordinate System} and
QTransform documentation.
\snippet examples/painting/transformations/renderarea.h 0
@@ -374,7 +374,7 @@
All the tranformation operations operate on QPainter's
tranformation matrix. For more information about the
- transformation matrix, see the \l {The Coordinate System} and
+ transformation matrix, see the \l {Coordinate System} and
QTransform documentation.
The Qt reference documentation provides several painting
diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc
index adb38b6..aab25fa 100644
--- a/doc/src/examples/undoframework.qdoc
+++ b/doc/src/examples/undoframework.qdoc
@@ -67,7 +67,7 @@
available through the edit menu. The user can also select a command
from the undo view.
- We use the \l{The Graphics View Framework}{graphics view
+ We use the \l{Graphics View Framework}{graphics view
framework} to implement the diagram. We only treat the related
code briefly as the framework has examples of its own (e.g., the
\l{Diagram Scene Example}).
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index 3ca50b4..249c10a1 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -422,3 +422,8 @@
\externalpage http://www.w3.org/XML/Schema
\title XML Schema
*/
+
+/*!
+ \externalpage http://opensource.org/licenses/bsd-license.php
+ \title New and Modified BSD Licenses
+*/
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index 979d885..5a3b23e 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -71,16 +71,16 @@
\endlist
For more information about using ActiveX with Qt, see
- \l{Building ActiveX servers and controls with Qt}.
+ \l{Building ActiveX servers in Qt}.
The ActiveQt framework consists of two modules:
\list
- \o The \l{Using ActiveX controls and COM objects in Qt}{QAxContainer}
+ \o The \l{Using ActiveX controls and COM in Qt}{QAxContainer}
module is a static library implementing QObject and QWidget subclasses,
QAxObject and QAxWidget, that act as containers for COM objects and
ActiveX controls.
- \o The \l{Building ActiveX servers and controls with Qt}{QAxServer}
+ \o The \l{Building ActiveX servers in Qt}{QAxServer}
module is a static library that implements
functionality for in-process and executable COM servers. This
module provides the QAxAggregated, QAxBindable and QAxFactory
diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc
index 0e952ad..f728972 100644
--- a/doc/src/frameworks-technologies/dnd.qdoc
+++ b/doc/src/frameworks-technologies/dnd.qdoc
@@ -58,9 +58,9 @@
This document describes the basic drag and drop mechanism and
outlines the approach used to enable it in custom widgets. Drag
and drop operations are also supported by Qt's item views and by
- the graphics view framework; more information is available in the
- \l{Using Drag and Drop with Item Views} and \l{The Graphics View
- Framework} documents.
+ the graphics view framework. More information is available in
+ \l{Using Drag and Drop with Item Views} and \l{Graphics View
+ Framework}.
\section1 Drag and Drop Classes
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index 681568e..b13f98e 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -220,9 +220,10 @@
allow you to map between the three coordinate systems.
When rendering, Graphics View's scene coordinates correspond to
- QPainter's \e logical coordinates, and view coordinates are the same as
- \e device coordinates. In \l{The Coordinate System}, you can read about
- the relationship between logical coordinates and device coordinates.
+ QPainter's \e logical coordinates, and view coordinates are the
+ same as \e device coordinates. In the \l{Coordinate System}
+ documentation, you can read about the relationship between
+ logical coordinates and device coordinates.
\img graphicsview-parentchild.png
@@ -435,11 +436,12 @@
\section2 Animation
- Graphics View supports animation at several levels. You can easily
- assemble animation by using the Animation Framework. For that you'll
- need your items to inherit from QGraphicsObject and associate
- QPropertyAnimation with them. QPropertyAnimation allows to animate any
- QObject property.
+ Graphics View supports animation at several levels. You can
+ easily assemble animation by using the Animation Framework.
+ For that you'll need your items to inherit from
+ QGraphicsObject and associate QPropertyAnimation with
+ them. QPropertyAnimation allows to animate any QObject
+ property.
Another option is to create a custom item that inherits from QObject
and QGraphicsItem. The item can the set up its own timers, and control
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 7568981..3bac8ce 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -46,71 +46,13 @@
/*!
\page model-view-programming.html
- \nextpage An Introduction to Model/View Programming
- \startpage index.html Qt Reference Documentation
\title Model/View Programming
- \brief A guide to the extensible model/view architecture used by Qt's
- item view classes.
+ \brief A guide to Qt's extensible model/view architecture.
- \ingroup frameworks-technologies
+ \section1 Introduction to Model/View Programming
- \list
- \o \l{An Introduction to Model/View Programming}
- \tableofcontents{1 An Introduction to Model/View Programming}
- \o \l{Using Models and Views}
- \tableofcontents{1 Using Models and Views}
- \o \l{Model Classes}
- \tableofcontents{1 Model Classes}
- \o \l{Creating New Models}
- \tableofcontents{1 Creating New Models}
- \o \l{View Classes}
- \tableofcontents{1 View Classes}
- \o \l{Handling Selections in Item Views}
- \tableofcontents{1 Handling Selections in Item Views}
- \o \l{Delegate Classes}
- \tableofcontents{1 Delegate Classes}
- \o \l{Item View Convenience Classes}
- \tableofcontents{1 Item View Convenience Classes}
- \o \l{Using Drag and Drop with Item Views}
- \tableofcontents{1 Using Drag and Drop with Item Views}
- \o \l{Proxy Models}
- \tableofcontents{1 Proxy Models}
- \o \l{Model Subclassing Reference}
- \tableofcontents{1 Model Subclassing Reference}
- \endlist
-
- \keyword Model/View Classes
- \section1 All Model/View Classes
-
- These classes use the model/view design pattern in which the
- underlying data (in the model) is kept separate from the way the data
- is presented and manipulated by the user (in the view).
-
- \annotatedlist model-view
-
- \section1 Related Examples
-
- \list
- \o \l{itemviews/dirview}{Dir View}
- \o \l{itemviews/spinboxdelegate}{Spin Box Delegate}
- \o \l{itemviews/pixelator}{Pixelator}
- \o \l{itemviews/simpletreemodel}{Simple Tree Model}
- \o \l{itemviews/chart}{Chart}
- \endlist
-*/
-
-/*!
- \page model-view-introduction.html
- \previouspage Model/View Programming
- \nextpage Using Models and Views
- \startpage index.html Qt Reference Documentation
-
- \title An Introduction to Model/View Programming
-
- \tableofcontents
-
- Qt 4 introduces a new set of item view classes that use a model/view
+ Qt 4 introduced a new set of item view classes that use a model/view
architecture to manage the relationship between data and the way it
is presented to the user. The separation of functionality introduced by
this architecture gives developers greater flexibility to customize the
@@ -121,7 +63,7 @@
view system. Each of the components in the architecture is explained,
and examples are given that show how to use the classes provided.
- \section1 The Model/View Architecture
+ \section2 The model/view architecture
Model-View-Controller (MVC) is a design pattern originating from
Smalltalk that is often used when building user interfaces.
@@ -185,7 +127,7 @@
model and view about the state of the editor.
\endlist
- \section2 Models
+ \section3 Models
All item models are based on the QAbstractItemModel class. This class
defines an interface that is used by views and delegates to access data.
@@ -225,7 +167,7 @@
QAbstractItemModel, QAbstractListModel, or QAbstractTableModel to create
your own custom models.
- \section2 Views
+ \section3 Views
Complete implementations are provided for different kinds of
views: QListView displays a list of items, QTableView displays data
@@ -237,7 +179,7 @@
The available views are examined in the section on \l{View Classes}.
- \section2 Delegates
+ \section3 Delegates
QAbstractItemDelegate is the abstract base class for delegates in the
model/view framework. Since Qt 4.4, the default delegate implementation is
@@ -251,7 +193,7 @@
Delegates are described in the section on \l{Delegate Classes}.
- \section2 Sorting
+ \section3 Sorting
There are two ways of approaching sorting in the model/view
architecture; which approach to choose depends on your underlying
@@ -272,7 +214,7 @@
before presenting the data in the view. This is covered in detail
in the section on \l {Proxy Models}.
- \section2 Convenience Classes
+ \section3 Convenience classes
A number of \e convenience classes are derived from the standard view
classes for the benefit of applications that rely on Qt's item-based
@@ -293,24 +235,13 @@
classes, such as QListView, QTableView, and QTreeView with
QStandardItemModel.
- \section1 The Model/View Components
+ \section1 Using models and views
- The following sections describe the way in which the model/view pattern
- is used in Qt. Each section provides an example of use, and is followed
- by a section showing how you can create new components.
-*/
-
-/*!
- \page model-view-using.html
- \contentspage model-view-programming.html Contents
- \previouspage An Introduction to Model/View Programming
- \nextpage Model Classes
+ The following sections explain how to use the model/view pattern
+ in Qt. Each section includes an an example and is followed by a
+ section showing how to create new components.
- \title Using Models and Views
-
- \tableofcontents
-
- \section1 Introduction
+ \section2 Two models included in Qt
Two of the standard models provided by Qt are QStandardItemModel and
QFileSystemModel. QStandardItemModel is a multi-purpose model that can be
@@ -325,7 +256,7 @@
to set up a model for use with ready-made views, and explore how to
manipulate data using model indexes.
- \section1 Using Views with an Existing Model
+ \section2 Using views with an existing model
The QListView and QTreeView classes are the most suitable views
to use with QFileSystemModel. The example presented below displays the
@@ -361,7 +292,7 @@
The \c index() function used in this case is unique to QFileSystemModel; we
supply it with a directory and it returns a model index. Model indexes are
- discussed in the \l{Model Classes} chapter.
+ discussed in \l{Model Classes}.
The rest of the function just displays the views within a splitter
widget, and runs the application's event loop:
@@ -369,23 +300,15 @@
\snippet doc/src/snippets/shareddirmodel/main.cpp 8
In the above example, we neglected to mention how to handle selections
- of items. This subject is covered in more detail in the chapter on
- \l{Handling Selections in Item Views}. Before examining how selections
- are handled, you may find it useful to read the \l{Model Classes} chapter
- which describes the concepts used in the model/view framework.
-*/
+ of items. This subject is covered in more detail in the section about
+ \l{Handling Selections in Item Views}.
-/*!
- \page model-view-model.html
- \contentspage model-view-programming.html Contents
- \previouspage Using Models and Views
- \nextpage Creating New Models
-
- \title Model Classes
+ \section1 Model classes
- \tableofcontents
+ Before examining how selections are handled, you may find it
+ useful to examine the concepts used in the model/view framework.
- \section1 Basic Concepts
+ \section2 Basic concepts
In the model/view architecture, the model provides a standard interface
that views and delegates use to access data. In Qt, the standard
@@ -401,11 +324,11 @@
Models also notify any attached views about changes to data through the
signals and slots mechanism.
- This chapter describes some basic concepts that are central to the way
+ This section describes some basic concepts that are central to the way
item of data are accessed by other components via a model class. More
- advanced concepts are discussed in later chapters.
+ advanced concepts are discussed in later sections.
- \section2 Model Indexes
+ \section3 Model indexes
To ensure that the representation of the data is kept separate from the
way it is accessed, the concept of a \e{model index} is introduced. Each
@@ -435,7 +358,7 @@
and the model index of a parent item. The following sections describe
and explain these properties in detail.
- \section2 Rows and Columns
+ \section3 Rows and columns
In its most basic form, a model can be accessed as a simple table in which
items are located by their row and column numbers. \e{This does not mean
@@ -468,7 +391,7 @@
section.
\endtable
- \section2 Parents of Items
+ \section3 Parents of items
The table-like interface to item data provided by models is ideal when
using data in a table or list view; the row and column number system maps
@@ -501,7 +424,7 @@
\snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 5
\endtable
- \section2 Item Roles
+ \section3 Item roles
Items in a model can perform various \e roles for other components,
allowing different kinds of data to be supplied for different situations.
@@ -534,7 +457,7 @@
interpret or ignore this information as required. It is also possible to
define additional roles for application-specific purposes.
- \section2 Summary of Concepts
+ \section3 Summary
\list
\o Model indexes give views and delegates information about the location
@@ -546,17 +469,16 @@
components, such as views and delegates.
\o If a valid model index is specified for the parent item when an index is
requested using \l{QAbstractItemModel::index()}{index()}, the index
- returned will refer to an item beneath that parent item in the
- model.
+ returned refers to an item beneath that parent item in the model.
The index obtained refers to a child of that item.
\o If an invalid model index is specified for the parent item when an index
is requested using \l{QAbstractItemModel::index()}{index()}, the index
- returned will refer to a top-level item in the model.
+ returned refers to a top-level item in the model.
\o The \l{Qt::ItemDataRole}{role} distinguishes between the
different kinds of data associated with an item.
\endlist
- \section2 Using Model Indexes
+ \section2 Using model indexes
To demonstrate how data can be retrieved from a model, using model
indexes, we set up a QFileSystemModel without a view and display the
@@ -610,26 +532,16 @@
to the model.
\endlist
+ \section2 Further reading
- \section1 Further Reading
-
- New models can be created by implementing the standard interface provided
- by QAbstractItemModel. In the \l{Creating New Models} chapter, we will
- demonstrate this by creating a convenient ready-to-use model for holding
- lists of strings.
-*/
-
-/*!
- \page model-view-view.html
- \contentspage model-view-programming.html Contents
- \previouspage Creating New Models
- \nextpage Handling Selections in Item Views
+ New models can be created by implementing the standard interface
+ provided by QAbstractItemModel. In the \l{Creating New Models}
+ section, we demonstrate this by creating a convenient ready-to-use
+ model for holding lists of strings.
- \title View Classes
+ \section1 View classes
- \tableofcontents
-
- \section1 Concepts
+ \section2 Concepts
In the model/view architecture, the view obtains items of data from the
model and presents them to the user. The way that the data is
@@ -668,7 +580,7 @@
subclassed from the QHeaderView class to provide more specialized
labels for views.
- \section1 Using an Existing View
+ \section2 Using an existing view
Qt provides three ready-to-use view classes that present data from
models in ways that are familiar to most users.
@@ -686,7 +598,7 @@
facilities, and can be customized to suit the needs of more specialized
user interfaces.
- \section2 Using a Model
+ \section3 Using a model
We take the string list model that \l{Creating New Models}{we created as
an example model}, set it up with some data, and construct a view to
@@ -697,8 +609,8 @@
Note that the \c StringListModel is declared as a \l QAbstractItemModel.
This allows us to use the abstract interface to the model, and
- ensures that the code will still work even if we replace the string list
- model with a different model in the future.
+ ensures that the code still works, even if we replace the string list
+ model with a different model.
The list view provided by \l QListView is sufficient for presenting
the items in the string list model. We construct the view, and set up
@@ -721,7 +633,7 @@
list model. Since the model is editable, the view automatically allows
each item in the list to be edited using the default delegate.
- \section2 Using Multiple Views onto the Same Model
+ \section3 Using multiple views of a model
Providing multiple views onto the same model is simply a matter of
setting the same model for each view. In the following code we create
@@ -745,7 +657,7 @@
selection model. This can be useful in certain situations but, for
many applications, a shared selection model is desirable.
- \section1 Handling Selections of Items
+ \section2 Handling selections of items
The mechanism for handling selections of items within views is provided
by the \l QItemSelectionModel class. All of the standard views construct
@@ -758,13 +670,12 @@
when we want to provide multiple consistent views onto the same model
data.
- Generally, unless you are subclassing a model or view, you will not
- need to manipulate the contents of selections directly. However, the
- interface to the selection model can be accessed, if required, and
- this is explored in the chapter on
- \l{Handling Selections in Item Views}.
+ Generally, unless you are subclassing a model or view, you don't
+ need to manipulate the contents of selections directly. However,
+ the interface to the selection model can be accessed, if required,
+ and this is explored in \l{Handling Selections in Item Views}.
- \section2 Sharing Selections Between Views
+ \section3 Sharing selections among views
Although it is convenient that the view classes provide their own
selection models by default, when we use more than one view onto the
@@ -788,19 +699,9 @@
each view; for example, a contiguous selection in a table view can be
represented as a fragmented set of highlighted items in a tree view.
-*/
-
-/*!
- \page model-view-delegate.html
- \contentspage model-view-programming.html Contents
- \previouspage Handling Selections in Item Views
- \nextpage Item View Convenience Classes
-
- \title Delegate Classes
-
- \tableofcontents
+ \section1 Delegate classes
- \section1 Concepts
+ \section2 Concepts
Unlike the Model-View-Controller pattern, the model/view design does not
include a completely separate component for managing interaction with
@@ -821,13 +722,13 @@
Editors for delegates can be implemented either by using widgets to manage
the editing process or by handling events directly.
- The first approach is covered later in this chapter, and it is also
+ The first approach is covered later in this section, and it is also
shown in the \l{Spin Box Delegate Example}{Spin Box Delegate} example.
The \l{Pixelator Example}{Pixelator} example shows how to create a
custom delegate that performs specialized rendering for a table view.
- \section1 Using an Existing Delegate
+ \section2 Using an existing delegate
The standard views provided with Qt use instances of \l QItemDelegate
to provide editing facilities. This default implementation of the
@@ -845,15 +746,15 @@
necessary to use this function when setting the delegate for a custom
view.
- \section1 A Simple Delegate
+ \section2 A simple delegate
- The delegate implemented here uses a \l QSpinBox to provide editing
- facilities, and is mainly intended for use with models that display
- integers. Although we set up a custom integer-based table model for
- this purpose, we could easily have used \l QStandardItemModel instead
- since the custom delegate will control data entry. We construct a
- table view to display the contents of the model, and this will use
- the custom delegate for editing.
+ The delegate implemented here uses a \l QSpinBox to provide
+ editing facilities, and is mainly intended for use with models
+ that display integers. Although we set up a custom integer-based
+ table model for this purpose, we could easily have used \l
+ QStandardItemModel instead, since the custom delegate controls
+ data entry. We construct a table view to display the contents of
+ the model, and this will use the custom delegate for editing.
\img spinboxdelegate-example.png
@@ -866,7 +767,7 @@
Note that no editor widgets are set up when the delegate is
constructed. We only construct an editor widget when it is needed.
- \section2 Providing an Editor
+ \section3 Providing an editor
In this example, when the table view needs to provide an editor, it
asks the delegate to provide an editor widget that is appropriate
@@ -906,7 +807,7 @@
the model, in which case we would need to cast the widget to the
appropriate type before accessing its member functions.
- \section2 Submitting Data to the Model
+ \section3 Submitting data to the model
When the user has finished editing the value in the spin box, the view
asks the delegate to store the edited value in the model by calling the
@@ -935,7 +836,7 @@
delegate with different kinds of models because \l{QVariant}
provides sensible default values for unexpected data.
- \section2 Updating the Editor's Geometry
+ \section3 Updating the editor's geometry
It is the responsibility of the delegate to manage the editor's
geometry. The geometry must be set when the editor is created, and
@@ -951,7 +852,7 @@
position the editor in relation to the other elements in the item.
\target EditingHints
- \section2 Editing Hints
+ \section3 Editing hints
After editing, delegates should provide hints to the other components
about the result of the editing process, and provide hints that will
@@ -982,19 +883,10 @@
Delegates do not have to emit these hints, but those that do not will
be less integrated into applications, and will be less usable than
those that emit hints to support common editing actions.
-*/
-
-/*!
- \page model-view-selection.html
- \contentspage model-view-programming.html Contents
- \previouspage View Classes
- \nextpage Delegate Classes
- \title Handling Selections in Item Views
+ \section1 Handling selections in item views
- \tableofcontents
-
- \section1 Concepts
+ \section2 Concepts
The selection model used in the item view classes offers many improvements
over the selection model used in Qt 3. It provides a more general
@@ -1022,8 +914,7 @@
after its application through the use of certain types of selection
commands. These are discussed later in this section.
-
- \section2 Current Item and Selected Items
+ \section3 Current item &amp selected items
In a view, there is always a current item and a selected item - two
independent states. An item can be the current item and selected at the
@@ -1068,8 +959,7 @@
be informed of changes to the selection model via the signals and slots
mechanism.
-
- \section1 Using a Selection Model
+ \section2 Using a selection model
The standard view classes provide default selection models that can
be used in most applications. A selection model belonging to one view
@@ -1088,8 +978,7 @@
each having a different effect on the selections already present in the
selection model.
-
- \section2 Selecting Items
+ \section3 Selecting items
To demonstrate some of the principal features of selections, we construct
an instance of a custom table model with 32 items in total, and open a
@@ -1122,12 +1011,12 @@
The selection of items can be modified using various operations that
are defined by the selection flags. The selection that results from
- these operations may have a complex structure, but will be represented
+ these operations may have a complex structure, but it is represented
efficiently by the selection model. The use of different selection
flags to manipulate the selected items is described when we examine
how to update a selection.
- \section2 Reading the Selection State
+ \section3 Reading the selection state
The model indexes stored in the selection model can be read using
the \l{QItemSelectionModel::selectedIndexes()}{selectedIndexes()}
@@ -1176,7 +1065,7 @@
Monitoring selections made by the user is straightforward with these
signals, but we can also update the selection model directly.
- \section2 Updating a Selection
+ \section3 Updating a selection
Selection commands are provided by a combination of selection flags,
defined by \l{QItemSelectionModel::SelectionFlag}.
@@ -1215,7 +1104,7 @@
with a command that is a combination of
\l{QItemSelectionModel::SelectionFlag}{Select} and
\l{QItemSelectionModel::SelectionFlag}{Rows}, the
- entire row containing the item referred to will be selected.
+ entire row containing the item referred to is selected.
The following code demonstrates the use of the
\l{QItemSelectionModel::SelectionFlag}{Rows} and
\l{QItemSelectionModel::SelectionFlag}{Columns} flags:
@@ -1248,7 +1137,7 @@
has the effect of resetting the selection model's collection of model
indexes.
- \section2 Selecting All Items in a Model
+ \section3 Selecting all items in a model
To select all items in a model, it is necessary to create a
selection for each level of the model that covers all items in that
@@ -1271,19 +1160,8 @@
\l{QAbstractItemModel::hasChildren()}{hasChildren()} function is used to
determine whether any given item is the parent of another level of
items.
-*/
-
-/*!
- \page model-view-creating-models.html
- \contentspage model-view-programming.html Contents
- \previouspage Model Classes
- \nextpage View Classes
-
- \title Creating New Models
- \tableofcontents
-
- \section1 Introduction
+ \section1 Creating new models
The separation of functionality between the model/view components allows
models to be created that can take advantage of existing views. This
@@ -1301,9 +1179,9 @@
for interfaces to simpler non-hierarchical data structures, and are
easier to use as a starting point for simple list and table models.
- In this chapter, we create a simple read-only model to explore
+ In this section, we create a simple read-only model to explore
the basic principles of the model/view architecture. Later in this
- chapter, we will adapt this simple model so that items can be modified
+ section, we adapt this simple model so that items can be modified
by the user.
For an example of a more complex model, see the
@@ -1312,21 +1190,21 @@
The requirements of QAbstractItemModel subclasses is described in more
detail in the \l{Model Subclassing Reference} document.
- \section1 Designing a Model
+ \section2 Designing a model
- When creating a new model for an existing data structure, it is important
- to consider which type of model should be used to provide an interface
- onto the data. If the data structure can be represented as a
- list or table of items, you can subclass QAbstractListModel or
- QAbstractTableModel since these classes provide suitable default
- implementations for many functions.
+ When creating a new model for an existing data structure, it is
+ important to consider which type of model should be used to
+ provide an interface onto the data. If the data structure can be
+ represented as a list or table of items, you can subclass
+ QAbstractListModel or QAbstractTableModel since these classes
+ provide suitable default implementations for many functions.
- However, if the underlying data structure can only be represented by a
- hierarchical tree structure, it is necessary to subclass
+ However, if the underlying data structure can only be represented
+ by a hierarchical tree structure, it is necessary to subclass
QAbstractItemModel. This approach is taken in the
\l{itemviews/simpletreemodel}{Simple Tree Model} example.
- In this chapter, we will implement a simple model based on a list of
+ In this section, we implement a simple model based on a list of
strings, so the QAbstractListModel provides an ideal base class on
which to build.
@@ -1338,7 +1216,7 @@
interact with it using the standard API. The model described below
provides a custom constructor for just this purpose.
- \section1 A Read-Only Example Model
+ \section2 A read-only example model
The model implemented here is a simple, non-hierarchical, read-only data
model based on the standard QStringListModel class. It has a \l QStringList
@@ -1355,7 +1233,6 @@
functions as there are default implementations for most of the
interface. The class declaration is as follows:
-
\snippet doc/src/snippets/stringlistmodel/model.h 0
\snippet doc/src/snippets/stringlistmodel/model.h 1
\codeline
@@ -1379,7 +1256,7 @@
The list of strings is stored internally in the \c stringList private
member variable.
- \section2 Dimensions of The Model
+ \section3 Dimensions of the model
We want the number of rows in the model to be the same as the number of
strings in the string list. We implement the
@@ -1394,7 +1271,7 @@
reimplement the \l{QAbstractItemModel::columnCount()}{columnCount()}
function.
- \section2 Model Headers and Data
+ \section3 Model headers &amp data
For items in the view, we want to return the strings in the string list.
The \l{QAbstractItemModel::data()}{data()} function is responsible for
@@ -1433,7 +1310,7 @@
\l{Qt::ItemDataRole}{ToolTipRole} that views can use to
display information about items in a tooltip.
- \section1 An Editable Model
+ \section2 An editable model
The read-only model shows how simple choices could be presented to the
user but, for many applications, an editable list model is much more
@@ -1447,7 +1324,7 @@
\snippet doc/src/snippets/stringlistmodel/model.h 2
\snippet doc/src/snippets/stringlistmodel/model.h 3
- \section2 Making the Model Editable
+ \section3 Making the model editable
A delegate checks whether an item is editable before creating an
editor. The model must let the delegate know that its items are
@@ -1473,7 +1350,7 @@
\l{Qt::ItemDataRole}{EditRole} since this is the role used by the
standard item delegate. For boolean values, however, you can use
Qt::CheckStateRole and set the Qt::ItemIsUserCheckable flag; a
- checkbox will then be used for editing the value. The underlying
+ checkbox is then used for editing the value. The underlying
data in this model is the same for all roles, so this detail just
makes it easier to integrate the model with standard components.
@@ -1487,7 +1364,7 @@
\snippet doc/src/snippets/stringlistmodel/model.cpp 1
- \section2 Inserting and Removing Rows
+ \section3 Inserting &amp removing rows
It is possible to change the number of rows and columns in a model. In the
string list model it only makes sense to change the number of rows, so we
@@ -1536,39 +1413,29 @@
operation and let other components know that the dimensions of the model
have changed.
- \section1 Next Steps
+ \section2 Next steps
We can display the data provided by this model, or any other model, using
the \l QListView class to present the model's items in the form of a vertical
list.
For the string list model, this view also provides a default editor so that
the items can be manipulated. We examine the possibilities made available by
- the standard view classes in the chapter on \l{View Classes}.
+ the standard view classes in \l{View Classes}.
The \l{Model Subclassing Reference} document discusses the requirements of
QAbstractItemModel subclasses in more detail, and provides a guide to the
virtual functions that must be implemented to enable various features in
different types of models.
-*/
-
-/*!
- \page model-view-convenience.html
- \contentspage model-view-programming.html Contents
- \previouspage Delegate Classes
- \nextpage Using Drag and Drop with Item Views
-
- \title Item View Convenience Classes
- \tableofcontents
+ \section1 Item view convenience classes
- \section1 Overview
-
- Alongside the model/view classes, Qt 4 also includes standard widgets to
- provide classic item-based container widgets. These behave in a similar
- way to the item view classes in Qt 3, but have been rewritten to use the
- underlying model/view framework for performance and maintainability. The
- old item view classes are still available in the compatibility library
- (see the \l{porting4.html}{Porting Guide} for more information).
+ Qt 4 also introduced some standard widgets to provide classic
+ item-based container widgets. These behave in a similar way to the
+ item view classes in Qt 3, but have been rewritten to use the
+ underlying model/view framework for performance and
+ maintainability. The old item view classes are still available in
+ the compatibility library (see the \l{porting4.html}{Porting
+ Guide} for more information).
The item-based widgets have been given names which reflect their uses:
\c QListWidget provides a list of items, \c QTreeWidget displays a
@@ -1577,7 +1444,7 @@
class which implements common behavior for item selection and header
management.
- \section1 List Widgets
+ \section2 List widgets
Single level lists of items are typically displayed using a \c QListWidget
and a number of \c{QListWidgetItem}s. A list widget is constructed in the
@@ -1612,8 +1479,7 @@
\snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 4
\snippet doc/src/snippets/qlistwidget-using/mainwindow.cpp 5
-
- \section1 Tree Widgets
+ \section2 Tree widgets
Trees or hierarchical lists of items are provided by the \c QTreeWidget
and \c QTreeWidgetItem classes. Each item in the tree widget can have
@@ -1668,8 +1534,7 @@
\snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 8
\snippet doc/src/snippets/qtreewidget-using/mainwindow.cpp 9
-
- \section1 Table Widgets
+ \section2 Table widgets
Tables of items similar to those found in spreadsheet applications
are constructed with the \c QTableWidget and \c QTableWidgetItem. These
@@ -1693,7 +1558,7 @@
Note that the rows and columns in the table begin at zero.
- \section1 Common Features
+ \section2 Common features
There are a number of item-based features common to each of the
convenience classes that are available through the same interfaces
@@ -1702,7 +1567,7 @@
Look at the list of \l{Model/View Classes} for each of the widgets
for more details about the use of each function used.
- \section2 Hidden Items
+ \section3 Hidden items
It is sometimes useful to be able to hide items in an item view widget
rather than remove them. Items for all of the above widgets can be
@@ -1713,7 +1578,7 @@
Since this operation is item-based, the same function is available for
all three convenience classes.
- \section2 Selections
+ \section3 Selections
The way items are selected is controlled by the widget's selection mode
(\l{QAbstractItemView::SelectionMode}).
@@ -1764,7 +1629,7 @@
current item may not lie within the selection, depending on the way the
user formed the selection.
- \section2 Searching
+ \section3 Searching
It is often useful to be able to find items within an item view widget,
either as a developer or as a service to present to users. All three
@@ -1782,19 +1647,8 @@
The above code causes items in a tree widget to be selected if they
contain the text given in the search string. This pattern can also be
used in the list and table widgets.
-*/
-
-/*!
- \page model-view-dnd.html
- \contentspage model-view-programming.html Contents
- \previouspage Item View Convenience Classes
- \nextpage Proxy Models
- \title Using Drag and Drop with Item Views
-
- \tableofcontents
-
- \section1 Overview
+ \section1 Using drag &amp drop with item views
Qt's drag and drop infrastructure is fully supported by the model/view framework.
Items in lists, tables, and trees can be dragged within the views, and data can be
@@ -1813,7 +1667,7 @@
See also the \l{Model Subclassing Reference} for more information about
enabling drag and drop support in new models.
- \section1 Using Convenience Views
+ \section2 Using convenience views
Each of the types of item used with QListWidget, QTableWidget, and QTreeWidget
is configured to use a different set of flags by default. For example, each
@@ -1852,7 +1706,7 @@
\snippet doc/src/snippets/qlistwidget-dnd/mainwindow.cpp 1
- \section1 Using Model/View Classes
+ \section2 Using model/view classes
Setting up a view for drag and drop follows the same pattern used with the
convenience views. For example, a QListView can be set up in the same way as a
@@ -1874,7 +1728,7 @@
of QAbstractItemModel::removeRows(), either directly or by inheriting the
implementation from its base class.
- \section2 Enabling Drag and Drop for Items
+ \section3 Enabling drag &amp drop for items
Models indicate to views which items can be dragged, and which will accept drops,
by reimplementing the QAbstractItemModel::flags() function to provide suitable
@@ -1894,7 +1748,7 @@
obtain a default set of flags by calling its implementation of the flags()
function.
- \section2 Encoding Exported Data
+ \section3 Encoding exported data
When items of data are exported from a model in a drag and drop operation, they
are encoded into an appropriate format corresponding to one or more MIME types.
@@ -1923,7 +1777,7 @@
and that stream operators must be implemented for them. See the QMetaObject
class description for details.
- \section2 Inserting Dropped Data into a Model
+ \section3 Inserting dropped data into a model
The way that any given model handles dropped data depends on both its type
(list, table, or tree) and the way its contents is likely to be presented to
@@ -1988,7 +1842,7 @@
example shown here, the model only has one level, so this approach is not
appropriate.
- \section2 Decoding Imported Data
+ \section3 Decoding imported data
Each implementation of \l{QAbstractItemModel::dropMimeData()}{dropMimeData()} must
also decode the data and insert it into the model's underlying data structure.
@@ -2007,19 +1861,8 @@
QAbstractItemModel::insertRows() and QAbstractItemModel::setData() functions.
\sa {Item Views Puzzle Example}
-*/
-
-/*!
- \page model-view-proxy-models.html
- \contentspage model-view-programming.html Contents
- \previouspage Using Drag and Drop with Item Views
- \nextpage Model Subclassing Reference
- \title Proxy Models
-
- \tableofcontents
-
- \section1 Overview
+ \section1 Proxy models
In the model/view framework, items of data supplied by a single model can be shared
by any number of views, and each of these can possibly represent the same information
@@ -2042,7 +1885,7 @@
framework ensure that each view is updated appropriately no matter how many proxy models
are placed between itself and the source model.
- \section1 Using Proxy Models
+ \section2 Using proxy models
Proxy models can be inserted between an existing model and any number of views.
Qt is supplied with a standard proxy model, QSortFilterProxyModel, that is usually
@@ -2061,7 +1904,7 @@
in applications. More specialized proxy models can be created by subclassing this
classes and implementing the required comparison operations.
- \section1 Customizing Proxy Models
+ \section2 Customizing proxy models
Generally, the type of processing used in a proxy model involves mapping each item of
data from its original location in the source model to either a different location in
@@ -2074,7 +1917,7 @@
being supplied to views, and also allows the contents of a source model to
be supplied to views as pre-sorted data.
- \section2 Custom Filtering Models
+ \section3 Custom filtering models
The QSortFilterProxyModel class provides a filtering model that is fairly versatile,
and which can be used in a variety of common situations. For advanced users,
@@ -2095,7 +1938,7 @@
return true to ensure that all items are passed through to views; reimplementations
of these functions should return false to filter out individual rows and columns.
- \section2 Custom Sorting Models
+ \section3 Custom sorting models
QSortFilterProxyModel instances use Qt's built-in qStableSort() function to set up
mappings between items in the source model and those in the proxy model, allowing a
@@ -2103,18 +1946,8 @@
source model. To provide custom sorting behavior, reimplement the
\l{QSortFilterProxyModel::lessThan()}{lessThan()} function to perform custom
comparisons.
-*/
-
-/*!
- \page model-view-model-subclassing.html
- \contentspage model-view-programming.html Contents
- \previouspage Proxy Models
-
- \title Model Subclassing Reference
- \tableofcontents
-
- \section1 Introduction
+ \section1 Model subclassing reference
Model subclasses need to provide implementations of many of the virtual functions
defined in the QAbstractItemModel base class. The number of these functions that need
@@ -2143,13 +1976,13 @@
For more information, see the \l
{"Item View Classes" Chapter of C++ GUI Programming with Qt 4}.
- \section1 Item Data Handling
+ \section2 Item data handling
Models can provide varying levels of access to the data they provide: They can be
simple read-only components, some models may support resizing operations, and
others may allow items to be edited.
- \section2 Read-Only Access
+ \section2 Read-Only access
To provide read-only access to data provided by a model, the following functions
\e{must} be implemented in the model's subclass:
@@ -2185,7 +2018,7 @@
provide this function because it is already implemented in QAbstractListModel.
\endtable
- \section2 Editable Items
+ \section3 Editable items
Editable models allow items of data to be modified, and may also provide
functions to allow rows and columns to be inserted and removed. To enable
@@ -2211,7 +2044,7 @@
signal to inform other components of the change.
\endtable
- \section2 Resizable Models
+ \section3 Resizable models
All types of model can support the insertion and removal of rows. Table models
and hierarchical models can also support the insertion and removal of columns.
@@ -2271,7 +2104,7 @@
it is necessary to emit the \l{QAbstractItemModel::layoutChanged()}{layoutChanged()}
signal to cause any attached views to be updated.
- \section2 Lazy Population of Model Data
+ \section3 Lazy population of model data
Lazy population of model data effectively allows requests for information
about the model to be deferred until it is actually needed by views.
@@ -2305,13 +2138,12 @@
children may be displayed incorrectly in some views until the user
attempts to view the non-existent child items.
-
- \section1 Navigation and Model Index Creation
+ \section2 Navigation &amp model index creation
Hierarchical models need to provide functions that views can call to navigate the
tree-like structures they expose, and obtain model indexes for items.
- \section2 Parents and Children
+ \section3 Parents &amp children
Since the structure exposed to views is determined by the underlying data
structure, it is up to each model subclass to create its own model indexes
@@ -2335,7 +2167,7 @@
models to supply some unique identifier to this function to ensure that
the model index can be re-associated with its corresponding item later on.
- \section1 Drag and Drop Support and MIME Type Handling
+ \section2 Drag &amp drop support and MIME type handling
The model/view classes support drag and drop operations, providing default behavior
that is sufficient for many applications. However, it is also possible to customize
@@ -2347,7 +2179,7 @@
The \l{#Convenience Views}{Convenience Views} section provides an overview of this
behavior.
- \section2 MIME Data
+ \section3 MIME data
By default, the built-in models and views use an internal MIME type
(\c{application/x-qabstractitemmodeldatalist}) to pass around information about
@@ -2394,7 +2226,7 @@
the QMimeData::setImageData(), QMimeData::setColorData(), and
QMimeData::setHtml() functions.
- \section2 Accepting Dropped Data
+ \section3 Accepting dropped data
When a drag and drop operation is performed over a view, the underlying model is
queried to determine which types of operation it supports and the MIME types
@@ -2466,7 +2298,7 @@
For more information about drag and drop with item views, refer to
\l{Using Drag and Drop with Item Views}.
- \section2 Convenience Views
+ \section3 Convenience views
The convenience views (QListWidget, QTableWidget, and QTreeWidget) override
the default drag and drop functionality to provide less flexible, but more
@@ -2477,7 +2309,7 @@
into the model. For more information on drag and drop in convenience views,
you can see \l{Using Drag and Drop with Item Views}.
- \section1 Performance Optimization for Large Amounts of Data
+ \section2 Performance optimization for large amounts of data
The \l{QAbstractItemModel::}{canFetchMore()} function checks if the parent
has more data available and returns true or false accordingly. The
@@ -2498,4 +2330,23 @@
\l{QAbstractItemModel::}{canFetchMore()} and \l{QAbstractItemModel::}
{fetchMore()} must be reimplemented as their default implementation returns
false and does nothing.
+
+ \keyword Model/View Classes
+ \section1 The model/view classes
+
+ These classes use the model/view design pattern in which the
+ underlying data (in the model) is kept separate from the way the
+ data is presented and manipulated by the user (in the view).
+
+ \annotatedlist model-view
+
+ \section1 Related examples
+
+ \list
+ \o \l{itemviews/dirview}{Dir View}
+ \o \l{itemviews/spinboxdelegate}{Spin Box Delegate}
+ \o \l{itemviews/pixelator}{Pixelator}
+ \o \l{itemviews/simpletreemodel}{Simple Tree Model}
+ \o \l{itemviews/chart}{Chart}
+ \endlist
*/
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index f8c70fe..9d39e08 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -126,16 +126,15 @@
\section1 Graphics View
\list
- \o \l{demos/chip}{40000 Chips} uses the
- \l{The Graphics View Framework}{Graphics View} framework to efficiently
- display a large number of individual graphical items on a scrolling canvas,
- highlighting features such as rotation, zooming, level of detail control,
- and item selection.
- \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's \e{Widgets on
- the Canvas} feature by embedding a multitude of fully-working dialogs into a
- scene.
+ \o \l{demos/chip}{40000 Chips} uses the \l{Graphics View Framework} to
+ efficiently display a large number of individual graphical items on
+ a scrolling canvas and highlighting features including rotation,
+ zooming, level of detail control, and item selection.
+ \o \l{demos/embeddeddialogs}{Embedded Dialogs} showcases Qt 4.4's
+ \e{Widgets on the Canvas} feature by embedding several
+ fully-functional dialogs in a scene.
\o \l{demos/boxes}{Boxes} showcases Qt's OpenGL support and the
- integration with the Graphics View framework.
+ integration with the \l{Graphics View Framework}.
\endlist
\section1 Tools
@@ -185,7 +184,7 @@
\o \l{demos/embedded/fluidlauncher}{Fluid Launcher} demo application launcher for embedded screens
\o \l{demos/embedded/lightmaps}{Light Maps} demonstrates OpenStreetMap integration with WebKit.
\o \l{demos/embedded/raycasting}{Ray Casting} demonstrates the use of ray casting with the
- \l{The Graphics View Framework}{Graphics View} framework.
+ \l{Graphics View Framework}.
\o \l{demos/embedded/styledemo}{Embedded Styles} demonstrates the use of styles.
\o \l{demos/embedded/weatherinfo}{Weather Info} fetches weather information from the Web.
\endlist
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index c3b8880..643e42b 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -67,429 +67,20 @@
deliberately show off Qt's features. You might want to look at
these as well.
- \section1 Examples by functional area
+ These examples are provided under the terms of the \l{BSD License}.
- \generatelist{related}
-*/
-
-/*!
- \page examples.html
- \title Qt Examples
- \brief The example programs provided with Qt.
-
- \previouspage Tutorials
- \contentspage How to Learn Qt
- \nextpage Qt Demonstrations
-
- Qt is supplied with a variety of examples that cover almost every aspect
- of development. They are not all designed to be impressive when you run
- them, but their source code is carefully written to show good Qt
- programming practices. You can launch any of these programs from the
- \l{Examples and Demos Launcher} application.
-
- These examples are ordered by functional area, but many examples often
- use features from many parts of Qt to highlight one area in particular.
- If you are new to Qt, you should probably start by going through the
- \l{Tutorials} before you have a look at the
- \l{mainwindows/application}{Application} example.
-
- In addition to the examples and the tutorial, Qt includes a
- \l{Qt Demonstrations}{selection of demos} that deliberately show off
- Qt's features. You might want to look at these as well.
-
- \section1 \l{Widgets Examples}{Widgets}
- \beginfloatleft
- \l{Widgets Examples}{\inlineimage widget-examples.png
- }
-
- \endfloat
- Qt comes with a large range of standard widgets that users of modern
- applications have come to expect. You can also develop your own custom
- widgets and controls, and use them alongside standard widgets.
-
- It is even possible to provide custom styles and themes for widgets that can
- be used to change the appearance of standard widgets and appropriately
- written custom widgets.
-
- \clearfloat
- \section1 \l{Dialog Examples}{Dialogs}
- \beginfloatleft
- \l{Dialog Examples}{\inlineimage dialog-examples.png
- }
-
- \endfloat
- Qt includes standard dialogs for many common operations, such as file
- selection, printing, and color selection.
-
- Custom dialogs can also be created for specialized modal or modeless
- interactions with users.
-
- \clearfloat
- \section1 \l{Main Window Examples}{Main Windows}
- \beginfloatleft
- \l{Main Window Examples}{\inlineimage mainwindow-examples.png
- }
-
- \endfloat
- All the standard features of application main windows are provided by Qt.
-
- Main windows can have pull down menus, tool bars, and dock windows. These
- separate forms of user input are unified in an integrated action system that
- also supports keyboard shortcuts and accelerator keys in menu items.
-
- \clearfloat
- \section1 \l{Layout Examples}{Layouts}
- \beginfloatleft
- \l{Layout Examples}{\inlineimage layout-examples.png
- }
-
- \endfloat
- Qt uses a layout-based approach to widget management. Widgets are arranged in
- the optimal positions in windows based on simple layout rules, leading to a
- consistent look and feel.
-
- Custom layouts can be used to provide more control over the positions and
- sizes of child widgets.
-
- \clearfloat
- \section1 \l{Item Views Examples}{Item Views}
- \beginfloatleft
- \l{Item Views Examples}{\inlineimage itemview-examples.png
- }
-
- \endfloat
- Item views are widgets that typically display data sets. Qt 4's model/view
- framework lets you handle large data sets by separating the underlying data
- from the way it is represented to the user, and provides support for
- customized rendering through the use of delegates.
-
- \clearfloat
- \section1 \l{Graphics View Examples}{Graphics View}
- \beginfloatleft
- \l{Graphics View Examples}{\inlineimage graphicsview-examples.png
- }
-
- \endfloat
- Qt is provided with a comprehensive canvas through the GraphicsView
- classes.
-
- \clearfloat
- \section1 \l{QML Examples and Demos}{Declarative}
- \beginfloatleft
- \l{QML Examples and Demos}{\inlineimage declarative-examples.png
- }
-
- \endfloat
- The Qt Declarative module provides a declarative framework for building
- highly dynamic, custom user interfaces.
-
- \clearfloat
- \section1 \l{Painting Examples}{Painting}
- \beginfloatleft
- \l{Painting Examples}{\inlineimage painting-examples.png
- }
-
- \endfloat
- Qt's painting system is able to render vector graphics, images, and outline
- font-based text with sub-pixel accuracy accuracy using anti-aliasing to
- improve rendering quality.
-
- \clearfloat
- \section1 \l{Rich Text Examples}{Rich Text}
- \beginfloatleft
- \l{Rich Text Examples}{\inlineimage richtext-examples.png
- }
-
- \endfloat
- Qt provides powerful document-oriented rich text engine that supports Unicode
- and right-to-left scripts. Documents can be manipulated using a cursor-based
- API, and their contents can be imported and exported as both HTML and in a
- custom XML format.
-
- \clearfloat
- \section1 \l{Desktop Examples}{Desktop}
- \beginfloatleft
- \l{Desktop Examples}{\inlineimage desktop-examples.png
- }
-
- \endfloat
- Qt provides features to enable applications to integrate with the user's
- preferred desktop environment.
-
- Features such as system tray icons, access to the desktop widget, and
- support for desktop services can be used to improve the appearance of
- applications and take advantage of underlying desktop facilities.
-
- \clearfloat
- \section1 \l{Drag and Drop Examples}{Drag and Drop}
- \beginfloatleft
- \l{Drag and Drop Examples}{\inlineimage draganddrop-examples.png
- }
-
- \endfloat
- Qt supports native drag and drop on all platforms via an extensible
- MIME-based system that enables applications to send data to each other in the
- most appropriate formats.
-
- Drag and drop can also be implemented for internal use by applications.
-
- \clearfloat
- \section1 \l{Threading and Concurrent Programming Examples}{Threading and Concurrent Programming}
- \beginfloatleft
- \l{Threading and Concurrent Programming Examples}{\inlineimage thread-examples.png
- }
-
- \endfloat
- Qt 4 makes it easier than ever to write multithreaded applications. More
- classes have been made usable from non-GUI threads, and the signals and slots
- mechanism can now be used to communicate between threads.
-
- The QtConcurrent namespace includes a collection of classes and functions
- for straightforward concurrent programming.
-
- \clearfloat
- \section1 \l{Tools Examples}{Tools}
- \beginfloatleft
- \l{Tools Examples}{\inlineimage tool-examples.png
- }
-
- \endfloat
- Qt is equipped with a range of capable tool classes, from containers and
- iterators to classes for string handling and manipulation.
-
- Other classes provide application infrastructure support, handling plugin
- loading and managing configuration files.
-
- \clearfloat
- \section1 \l{Network Examples}{Network}
- \beginfloatleft
- \l{Network Examples}{\inlineimage network-examples.png
- }
-
- \endfloat
- Qt is provided with an extensive set of network classes to support both
- client-based and server side network programming.
- \clearfloat
- \section1 \l{Inter-Process Communication Examples}{Inter-Process Communication}
- \beginfloatleft
- \l{Inter-Process Communication Examples}{\inlineimage ipc-examples.png
- }
+ \section1 Examples by Functional Area
- \endfloat
- Simple, lightweight inter-process communication can be performed using shared
- memory and local sockets.
-
- \clearfloat
- \section1 \l{OpenGL Examples}{OpenGL} and \l{OpenVG Examples}{OpenVG} Examples
- \beginfloatleft
- \l{OpenGL Examples}{\inlineimage opengl-examples.png
- }
-
- \endfloat
- Qt provides support for integration with OpenGL implementations on all
- platforms, giving developers the opportunity to display hardware accelerated
- 3D graphics alongside a more conventional user interface.
-
- Qt provides support for integration with OpenVG implementations on
- platforms with suitable drivers.
-
- \clearfloat
- \section1 \l{Multimedia Examples}{Multimedia Framework}
- \beginfloatleft
- \l{Multimedia Examples}{\inlineimage phonon-examples.png
- }
-
- \endfloat
- Qt provides low-level audio support on linux,windows and mac platforms by default and
- an audio plugin API to allow developers to implement there own audio support for
- custom devices and platforms.
-
- The Phonon Multimedia Framework brings multimedia support to Qt applications.
-
- \clearfloat
- \section1 \l{SQL Examples}{SQL}
- \beginfloatleft
- \l{SQL Examples}{\inlineimage sql-examples.png
- }
-
- \endfloat
- Qt provides extensive database interoperability, with support for products
- from both open source and proprietary vendors.
-
- SQL support is integrated with Qt's model/view architecture, making it easier
- to provide GUI integration for your database applications.
-
- \clearfloat
- \section1 \l{XML Examples}{XML}
- \beginfloatleft
- \l{XML Examples}{\inlineimage xml-examples.png
- }
-
- \endfloat
- XML parsing and handling is supported through SAX and DOM compliant APIs
- as well as streaming classes.
-
- The XQuery/XPath and XML Schema engines in the QtXmlPatterns modules
- provide classes for querying XML files and custom data models.
-
- \clearfloat
- \section1 \l{Qt Designer Examples}{Qt Designer}
- \beginfloatleft
- \l{Qt Designer Examples}{\inlineimage designer-examples.png
- }
-
- \endfloat
- Qt Designer is a capable graphical user interface designer that lets you
- create and configure forms without writing code. GUIs created with
- Qt Designer can be compiled into an application or created at run-time.
-
- \clearfloat
- \section1 \l{UiTools Examples}{UiTools}
- \beginfloatleft
- \l{UiTools Examples}{\inlineimage uitools-examples.png
- }
-
- \endfloat
- User interfaces created with Qt Designer can be loaded and displayed at
- run-time using the facilities of the QtUiTools module without the need
- to generate code in advance.
-
- \clearfloat
- \section1 \l{Qt Linguist Examples}{Qt Linguist}
- \beginfloatleft
- \l{Qt Linguist Examples}{\inlineimage linguist-examples.png
- }
-
- \endfloat
- Internationalization is a core feature of Qt.
-
- \clearfloat
- \section1 \l{Qt Script Examples}{Qt Script}
- \beginfloatleft
- \l{Qt Script Examples}{\inlineimage qtscript-examples.png
- }
-
- \endfloat
- Qt is provided with a powerful embedded scripting environment through the QtScript
- classes.
-
- \clearfloat
- \section1 \l{WebKit Examples}{WebKit}
- \beginfloatleft
- \l{WebKit Examples}{\inlineimage webkit-examples.png
- }
-
- \endfloat
- Qt provides an integrated Web browser component based on WebKit, the popular
- open source browser engine.
-
- \clearfloat
- \section1 \l{Help System Examples}{Help System}
- \beginfloatleft
- \l{Help System Examples}{\inlineimage assistant-examples.png
- }
-
- \endfloat
- Support for interactive help is provided by the Qt Assistant application.
- Developers can take advantages of the facilities it offers to display
- specially-prepared documentation to users of their applications.
-
- \clearfloat
- \section1 \l{State Machine Examples}{State Machine}
- \beginfloatleft
- \l{State Machine Examples}{\inlineimage statemachine-examples.png
- }
-
- \endfloat
- Qt provides a powerful hierarchical finite state machine through the Qt State
- Machine classes.
-
- \clearfloat
- \section1 \l{Animation Framework Examples}{Animation Framework}
- \beginfloatleft
- \l{Animation Framework Examples}{\inlineimage animation-examples.png
- }
-
- \endfloat
- These examples show to to use the \l{The Animation Framework}{animation framework}
- to build highly animated, high-performance GUIs.
-
- \clearfloat
- \section1 \l{Multi-Touch Examples}{Multi-Touch Framework}
- \beginfloatleft
- \l{Multi-Touch Examples}{\inlineimage multitouch-examples.png
- }
-
- \endfloat
- Support for multi-touch input makes it possible for developers to create
- extensible and intuitive user interfaces.
-
- \clearfloat
- \section1 \l{Gestures Examples}{Gestures}
- \beginfloatleft
- \l{Gestures Examples}{\inlineimage gestures-examples.png
- }
-
- \endfloat
- Applications can be written to respond to gestures as a natural input method.
- These examples show how to enable support for standard and custom gestures in
- applications.
-
- \clearfloat
- \section1 \l{D-Bus Examples}{D-Bus}
- \beginfloatleft
- \l{D-Bus Examples}{\inlineimage dbus-examples.png
- }
-
- \endfloat
- Systems with limited resources, specialized hardware, and small
- screens require special attention.
-
- \clearfloat
- \section1 \l{Qt for Embedded Linux Examples}{Qt for Embedded Linux}
- \beginfloatleft
- \l{Qt for Embedded Linux Examples}{\inlineimage qt-embedded-examples.png
- }
-
- \endfloat
- D-Bus is an inter-process communication protocol for Unix/Linux systems.
- These examples demonstrate how to write application that communicate with
- each other.
-
- \clearfloat
- \section1 \l{ActiveQt Examples}{ActiveQt}
- \beginfloatleft
- \l{ActiveQt Examples}{\inlineimage activeqt-examples.png
- }
-
- \endfloat
- These examples demonstrate how to write ActiveX controls and control servers
- with Qt, and how to use ActiveX controls and COM objects in a Qt application.
-
- \clearfloat
- \section1 \l{Qt Quarterly}{Qt Quarterly}
- \beginfloatleft
- \l{Qt Quarterly}{\inlineimage qq-thumbnail.png
- }
-
- \endfloat
- One more valuable source for examples and explanations of Qt
- features is the archive of \l{Qt Quarterly}, a newsletter for
- Qt developers.
-
- \clearfloat
+ \generatelist{related}
*/
/*!
\page examples-widgets.html
- \title Widgets Examples
+ \title Widget Examples
\ingroup all-examples
\brief Lots of examples of how to use different kinds of widgets.
- \contentspage Qt Examples
- \nextpage Dialog Examples
-
\image widget-examples.png
Qt comes with a large range of standard widgets that users of modern
@@ -538,10 +129,6 @@
\title Dialog Examples
\brief Using Qt's standard dialogs and building and using custom dialogs.
- \previouspage Widgets Examples
- \contentspage Qt Examples
- \nextpage Main Window Examples
-
\image dialog-examples.png
Qt includes standard dialogs for many common operations, such as file
@@ -570,10 +157,6 @@
\title Main Window Examples
\brief Building applications around a main window.
- \previouspage Dialog Examples
- \contentspage Qt Examples
- \nextpage Layout Examples
-
\image mainwindow-examples.png
All the standard features of application main windows are provided by Qt.
@@ -598,11 +181,7 @@
\page examples-layouts.html
\ingroup all-examples
\title Layout Examples
- Using Qt's layout-based approach to widget management.
-
- \previouspage Main Window Examples
- \contentspage Qt Examples
- \nextpage Item Views Examples
+ \brief Using Qt's layout-based approach to widget management.
\image layout-examples.png
@@ -629,10 +208,6 @@
\title Item Views Examples
\brief Using the model/view design pattern to separate presentation from data.
- \previouspage Layout Examples
- \contentspage Qt Examples
- \nextpage Graphics View Examples
-
\image itemview-examples.png
Item views are widgets that typically display data sets. Qt 4's model/view
@@ -669,10 +244,6 @@
\title Graphics View Examples
\brief Using Qt to manage and interact with a large (potentially) number of graphics items.
- \previouspage Item Views Examples
- \contentspage Qt Examples
- \nextpage QML Examples and Demos
-
\image graphicsview-examples.png
Qt is provided with a comprehensive canvas through the GraphicsView
@@ -715,10 +286,7 @@
\page examples-painting.html
\ingroup all-examples
\title Painting Examples
-
- \previouspage QML Examples and Demos
- \contentspage Qt Examples
- \nextpage Rich Text Examples
+ \brief How to use the Qt painting system
\image painting-examples.png
@@ -748,10 +316,7 @@
\page examples-richtext.html
\ingroup all-examples
\title Rich Text Examples
-
- \previouspage Painting Examples
- \contentspage Qt Examples
- \nextpage Desktop Examples
+ \brief Using the document-oriented rich text engine
\image richtext-examples.png
@@ -772,10 +337,7 @@
\page examples-desktop.html
\ingroup all-examples
\title Desktop Examples
-
- \previouspage Rich Text Examples
- \contentspage Qt Examples
- \nextpage Drag and Drop Examples
+ \brief Integrating your Qt application with your favorite desktop
\image desktop-examples.png
@@ -795,11 +357,8 @@
/*!
\page examples-draganddrop.html
\ingroup all-examples
- \title Drag and Drop Examples
-
- \previouspage Desktop Examples
- \contentspage Qt Examples
- \nextpage Threading and Concurrent Programming Examples
+ \title Drag &amp Drop Examples
+ \brief How to access your platform's native darg &amp drop functionality
\image draganddrop-examples.png
@@ -825,10 +384,7 @@
\page examples-threadandconcurrent.html
\ingroup all-examples
\title Threading and Concurrent Programming Examples
-
- \previouspage Drag and Drop Examples
- \contentspage Qt Examples
- \nextpage Tools Examples
+ \brief Threading and concurrent programming in Qt
\image thread-examples.png
@@ -866,10 +422,7 @@
\page examples.tools.html
\ingroup all-examples
\title Tools Examples
-
- \previouspage Threading and Concurrent Programming Examples
- \contentspage Qt Examples
- \nextpage Network Examples
+ \brief Using Qt's containers, iterators, and other tool classes
\image tool-examples.png
@@ -905,10 +458,7 @@
\page examples-network.html
\ingroup all-examples
\title Network Examples
-
- \previouspage Tools Examples
- \contentspage Qt Examples
- \nextpage Inter-Process Communication Examples
+ \brief How to do network programming in Qt
\image network-examples.png
@@ -943,11 +493,8 @@
/*!
\page examples-ipc.html
\ingroup all-examples
- \title Inter-Process Communication Examples
-
- \previouspage Network Examples
- \contentspage Qt Examples
- \nextpage OpenGL Examples
+ \title IPC Examples
+ \brief Inter-Process Communication with Qt
\image ipc-examples.png
@@ -962,10 +509,7 @@
\page examples-opengl.html
\ingroup all-examples
\title OpenGL Examples
-
- \previouspage Inter-Process Communication Examples
- \contentspage Qt Examples
- \nextpage OpenVG Examples
+ \brief Accessing OpenGL from Qt
\image opengl-examples.png
@@ -997,10 +541,7 @@
\page examples-openvg.html
\ingroup all-examples
\title OpenVG Examples
-
- \previouspage OpenGL Examples
- \contentspage Qt Examples
- \nextpage Multimedia Examples
+ \brief Accessing OpenVG from Qt
\image openvg-examples.png
@@ -1019,10 +560,7 @@
\page examples-multimedia.html
\ingroup all-examples
\title Multimedia Examples
-
- \previouspage OpenGL Examples
- \contentspage Qt Examples
- \nextpage SQL Examples
+ \brief Audio, video, and Phonon with Qt
\image phonon-examples.png
@@ -1069,10 +607,7 @@
\page examples-sql.html
\ingroup all-examples
\title SQL Examples
-
- \previouspage Multimedia Examples
- \contentspage Qt Examples
- \nextpage XML Examples
+ \brief Accessing your SQL database from Qt
\image sql-examples.png
@@ -1099,10 +634,7 @@
\page examples-xml.html
\ingroup all-examples
\title XML Examples
-
- \previouspage SQL Examples
- \contentspage Qt Examples
- \nextpage Qt Designer Examples
+ \brief Using XML with Qt
\image xml-examples.png XML
@@ -1136,10 +668,7 @@
\page examples-designer.html
\ingroup all-examples
\title Qt Designer Examples
-
- \previouspage XML Examples
- \contentspage Qt Examples
- \nextpage UiTools Examples
+ \brief Using Qt Designer to build your UI
\image designer-examples.png QtDesigner
@@ -1162,10 +691,7 @@
\page examples-uitools.html
\ingroup all-examples
\title UiTools Examples
-
- \previouspage Qt Designer Examples
- \contentspage Qt Examples
- \nextpage Qt Linguist Examples
+ \brief Using the QtUiTools module
\image uitools-examples.png UiTools
@@ -1179,10 +705,7 @@
\page examples-linguist.html
\ingroup all-examples
\title Qt Linguist Examples
-
- \previouspage UiTools Examples
- \contentspage Qt Examples
- \nextpage Qt Script Examples
+ \brief Using Qt Linguist to internationalize your Qt application
\image linguist-examples.png
@@ -1200,10 +723,7 @@
\page examples-script.html
\ingroup all-examples
\title Qt Script Examples
-
- \previouspage Qt Linguist Examples
- \contentspage Qt Examples
- \nextpage WebKit Examples
+ \brief Using the Qt scripting environment
\image qtscript-examples.png QtScript
@@ -1230,10 +750,7 @@
\page examples-webkit.html
\ingroup all-examples
\title WebKit Examples
-
- \previouspage Qt Script Examples
- \contentspage Qt Examples
- \nextpage Help System Examples
+ \brief Using WebKit in your Qt application
\image webkit-examples.png WebKit
@@ -1272,10 +789,7 @@
\page examples-helpsystem.html
\ingroup all-examples
\title Help System Examples
-
- \previouspage WebKit Examples
- \contentspage Qt Examples
- \nextpage State Machine Examples
+ \brief Adding interactive help to your Qt application
\image assistant-examples.png HelpSystem
@@ -1296,10 +810,7 @@
\page examples-statemachine.html
\ingroup all-examples
\title State Machine Examples
-
- \previouspage Help System Examples
- \contentspage Qt Examples
- \nextpage Animation Framework Examples
+ \brief Using Qt's finite state machine classes
\image statemachine-examples.png StateMachine
@@ -1323,10 +834,7 @@
\page examples-animation.html
\ingroup all-examples
\title Animation Framework Examples
-
- \previouspage State Machine Examples
- \contentspage Qt Examples
- \nextpage Multi-Touch Examples
+ \brief Doing animations with Qt
\image animation-examples.png Animation
@@ -1346,10 +854,7 @@
\page examples-multitouch.html
\ingroup all-examples
\title Multi-Touch Examples
-
- \previouspage Animation Framework Examples
- \contentspage Qt Examples
- \nextpage Gestures Examples
+ \brief Using Qt's multi-touch input capability
Support for multi-touch input makes it possible for developers to create
extensible and intuitive user interfaces.
@@ -1366,10 +871,7 @@
\page examples-gestures.html
\ingroup all-examples
\title Gestures Examples
-
- \previouspage Multi-Touch Examples
- \contentspage Qt Examples
- \nextpage D-Bus Examples
+ \brief Gesture programming examples
The API of the gesture framework is not yet finalized and
still subject to change.
@@ -1383,10 +885,7 @@
\page examples-dbus.html
\ingroup all-examples
\title D-Bus Examples
-
- \previouspage Gestures Examples
- \contentspage Qt Examples
- \nextpage Qt for Embedded Linux Examples
+ \brief Using D-Bus from Qt applications
\list
\o \l{dbus/dbus-chat}{Chat}
@@ -1403,10 +902,7 @@
\page examples-embeddedlinux.html
\ingroup all-examples
\title Qt for Embedded Linux Examples
-
- \previouspage D-Bus Examples
- \contentspage Qt Examples
- \nextpage ActiveQt Examples
+ \brief Using Qt in Embedded Linux
\image qt-embedded-examples.png QtEmbedded
@@ -1426,10 +922,7 @@
\page examples-activeqt.html
\ingroup all-examples
\title ActiveQt Examples
-
- \previouspage Qt for Embedded Linux Examples
- \contentspage Qt Examples
- \nextpage Qt Quarterly
+ \brief Using ActiveX from Qt applications
\image activeqt-examples.png ActiveQt
diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc
index ce8f521..642421b 100644
--- a/doc/src/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/getting-started/how-to-learn-qt.qdoc
@@ -59,11 +59,11 @@
If you want to design your user interfaces using a design tool, then
read at least the first few chapters of the \l{Qt Designer manual}.
- By now you'll have produced some small working applications and have a
- broad feel for Qt programming. You could start work on your own
- projects straight away, but we recommend reading a couple of key
- overviews to deepen your understanding of Qt: \l{Qt Object Model}
- and \l{Signals and Slots}.
+ By now you'll have produced some small working applications and
+ have a broad feel for Qt programming. You could start work on your
+ own projects straight away, but we recommend reading a couple of
+ key overviews to deepen your understanding of Qt: The Qt \l{Object
+ Model} and \l{Signals and Slots}.
\beginfloatleft
\inlineimage qtdemo-small.png
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 36abc10..4a96a39 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -959,7 +959,7 @@ applications using Qt for Symbian can start right away.}
\l{http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&amp;DisplayLang=en}{here}.
\endlist
- \sa {Known Issues in %VERSION%}
+ \sa {Known Issues}
*/
/*!
@@ -969,7 +969,7 @@ applications using Qt for Symbian can start right away.}
\brief Setting up the Mac OS X environment for Qt.
\previouspage General Qt Requirements
- \sa {Known Issues in %VERSION%}
+ \sa {Known Issues}
*/
/*!
@@ -1108,7 +1108,7 @@ applications using Qt for Symbian can start right away.}
distributions; try searching for \c gstreamer or \c libgstreamer in your
distribution's package repository to find suitable packages.
- \sa {Known Issues in %VERSION%}
+ \sa {Known Issues}
*/
/*!
@@ -1162,7 +1162,7 @@ applications using Qt for Symbian can start right away.}
information on Windows CE Customization can be found
\l{Windows CE - Working with Custom SDKs}{here}.
- \sa {Known Issues in %VERSION%}
+ \sa {Known Issues}
*/
/*!
@@ -1172,7 +1172,7 @@ applications using Qt for Symbian can start right away.}
\brief Setting up the Embedded Linux environment for Qt.
\previouspage General Qt Requirements
- \sa {Known Issues in %VERSION%}
+ \sa {Known Issues}
\section1 Building Qt for Embedded Linux with uclibc
@@ -1272,5 +1272,5 @@ applications using Qt for Symbian can start right away.}
We recommend you to take a look at \l{http://developer.symbian.org/wiki/index.php/Qt_Quick_Start}{Symbian Foundation - Qt Quick Start}
to get more information about how to setup the development environment.
- \sa {Known Issues in %VERSION%}
+ \sa {Known Issues}
*/
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index cedebf9..5b6b2fc 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -41,7 +41,7 @@
/*!
\page known-issues.html
- \title Known Issues in this Qt Version
+ \title Known Issues
\ingroup platform-specific
\brief A summary of known issues in this Qt version at the time of release.
diff --git a/doc/src/howtos/guibooks.qdoc b/doc/src/howtos/guibooks.qdoc
index bccfbe6..aa108d1 100644
--- a/doc/src/howtos/guibooks.qdoc
+++ b/doc/src/howtos/guibooks.qdoc
@@ -97,8 +97,6 @@
Microsoft Windows User Experience}}, ISBN 1-55615-679-0,
is Microsoft's look and feel bible. Indispensable for everyone who
has customers that worship Microsoft, and it's quite good, too.
- It is also available
- \link http://msdn.microsoft.com/library/en-us/dnwue/html/welcome.asp online\endlink.
\bold{\l{http://www.amazon.com/exec/obidos/ASIN/047159900X/trolltech/t}{The Icon Book}}
by William Horton, ISBN 0-471-59900-X, is perhaps the only thorough
diff --git a/doc/src/images/qml-clocks-example.png b/doc/src/images/qml-clocks-example.png
new file mode 100644
index 0000000..1b352b5
--- /dev/null
+++ b/doc/src/images/qml-clocks-example.png
Binary files differ
diff --git a/doc/src/images/qml-corkboards-example.png b/doc/src/images/qml-corkboards-example.png
new file mode 100644
index 0000000..8acffa7
--- /dev/null
+++ b/doc/src/images/qml-corkboards-example.png
Binary files differ
diff --git a/doc/src/images/qml-dial.png b/doc/src/images/qml-dial.png
new file mode 100644
index 0000000..da5c031
--- /dev/null
+++ b/doc/src/images/qml-dial.png
Binary files differ
diff --git a/doc/src/images/qml-dialcontrol-example.png b/doc/src/images/qml-dialcontrol-example.png
new file mode 100644
index 0000000..74cd645
--- /dev/null
+++ b/doc/src/images/qml-dialcontrol-example.png
Binary files differ
diff --git a/doc/src/images/qml-dynamicscene-example.png b/doc/src/images/qml-dynamicscene-example.png
new file mode 100644
index 0000000..1f725d1
--- /dev/null
+++ b/doc/src/images/qml-dynamicscene-example.png
Binary files differ
diff --git a/doc/src/images/qml-flickr-example.png b/doc/src/images/qml-flickr-demo.png
index 71ea567..71ea567 100644
--- a/doc/src/images/qml-flickr-example.png
+++ b/doc/src/images/qml-flickr-demo.png
Binary files differ
diff --git a/doc/src/images/qml-flipable-example.png b/doc/src/images/qml-flipable-example.png
new file mode 100644
index 0000000..dd68a66
--- /dev/null
+++ b/doc/src/images/qml-flipable-example.png
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors1.png b/doc/src/images/qml-intro-anchors1.png
new file mode 100644
index 0000000..fdb301e
--- /dev/null
+++ b/doc/src/images/qml-intro-anchors1.png
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors2.png b/doc/src/images/qml-intro-anchors2.png
new file mode 100644
index 0000000..84f43bd
--- /dev/null
+++ b/doc/src/images/qml-intro-anchors2.png
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors3.png b/doc/src/images/qml-intro-anchors3.png
new file mode 100644
index 0000000..21ae97b
--- /dev/null
+++ b/doc/src/images/qml-intro-anchors3.png
Binary files differ
diff --git a/doc/src/images/qml-intro-helloa.png b/doc/src/images/qml-intro-helloa.png
new file mode 100644
index 0000000..00b34b0
--- /dev/null
+++ b/doc/src/images/qml-intro-helloa.png
Binary files differ
diff --git a/doc/src/images/qml-minehunt-example.png b/doc/src/images/qml-minehunt-demo.png
index 3b69569..3b69569 100644
--- a/doc/src/images/qml-minehunt-example.png
+++ b/doc/src/images/qml-minehunt-demo.png
Binary files differ
diff --git a/doc/src/images/qml-photoviewer-example.png b/doc/src/images/qml-photoviewer-demo.png
index be6f1bf..be6f1bf 100644
--- a/doc/src/images/qml-photoviewer-example.png
+++ b/doc/src/images/qml-photoviewer-demo.png
Binary files differ
diff --git a/doc/src/images/qml-progressbar-example.png b/doc/src/images/qml-progressbar-example.png
new file mode 100644
index 0000000..3ddd6c6
--- /dev/null
+++ b/doc/src/images/qml-progressbar-example.png
Binary files differ
diff --git a/doc/src/images/qml-rssnews-example.png b/doc/src/images/qml-rssnews-demo.png
index 948ef4d..948ef4d 100644
--- a/doc/src/images/qml-rssnews-example.png
+++ b/doc/src/images/qml-rssnews-demo.png
Binary files differ
diff --git a/doc/src/images/qml-samegame-example.png b/doc/src/images/qml-samegame-demo.png
index c17b4e0..c17b4e0 100644
--- a/doc/src/images/qml-samegame-example.png
+++ b/doc/src/images/qml-samegame-demo.png
Binary files differ
diff --git a/doc/src/images/qml-searchbox-example.png b/doc/src/images/qml-searchbox-example.png
new file mode 100644
index 0000000..97d12bb
--- /dev/null
+++ b/doc/src/images/qml-searchbox-example.png
Binary files differ
diff --git a/doc/src/images/qml-slideswitch-example.png b/doc/src/images/qml-slideswitch-example.png
new file mode 100644
index 0000000..17cb3eb
--- /dev/null
+++ b/doc/src/images/qml-slideswitch-example.png
Binary files differ
diff --git a/doc/src/images/qml-snake-example.png b/doc/src/images/qml-snake-demo.png
index d3c077d..d3c077d 100644
--- a/doc/src/images/qml-snake-example.png
+++ b/doc/src/images/qml-snake-demo.png
Binary files differ
diff --git a/doc/src/images/qml-spinner-example.png b/doc/src/images/qml-spinner-example.png
new file mode 100644
index 0000000..ed381f8
--- /dev/null
+++ b/doc/src/images/qml-spinner-example.png
Binary files differ
diff --git a/doc/src/images/qml-tabwidget-example.png b/doc/src/images/qml-tabwidget-example.png
new file mode 100644
index 0000000..05887f3
--- /dev/null
+++ b/doc/src/images/qml-tabwidget-example.png
Binary files differ
diff --git a/doc/src/images/qml-tic-tac-toe-example.png b/doc/src/images/qml-tic-tac-toe-example.png
new file mode 100644
index 0000000..5a5cc82
--- /dev/null
+++ b/doc/src/images/qml-tic-tac-toe-example.png
Binary files differ
diff --git a/doc/src/images/qml-tvtennis-example.png b/doc/src/images/qml-tvtennis-example.png
new file mode 100644
index 0000000..ac2b527
--- /dev/null
+++ b/doc/src/images/qml-tvtennis-example.png
Binary files differ
diff --git a/doc/src/images/qml-twitter-demo.png b/doc/src/images/qml-twitter-demo.png
new file mode 100644
index 0000000..63d6486
--- /dev/null
+++ b/doc/src/images/qml-twitter-demo.png
Binary files differ
diff --git a/doc/src/legal/opensourceedition.qdoc b/doc/src/legal/opensourceedition.qdoc
index d95e107..cbd043e 100644
--- a/doc/src/legal/opensourceedition.qdoc
+++ b/doc/src/legal/opensourceedition.qdoc
@@ -46,18 +46,21 @@
\ingroup licensing
\brief Information about the license and features of the Open Source Edition.
- Free (or open source) software is software that comes with a license
+ Free and Open Source Software (FOSS) is software that comes with a license
that gives users certain rights. In particular the right to use the
software, to modify it, to obtain its source, and to pass it on (under
the same terms). Notice that the term "free" is about rights, not
- money. The Free Software Foundation (creators of the GNU GPL) speaks
+ money. The Free Software Foundation, the creator of the GNU GPL, speaks
of free in this context as in "free speech", not as in "no cost".
Nokia supports the free software concept by providing the Qt Open Source
Edition, which is licensed under the \l{GNU General Public License (GPL)}
(version 3) and the \l{GNU Lesser General Public License (LGPL)} (version 2.1).
You can use this edition of Qt to create and distribute software with licenses
- that are compatible to these free software licenses.
+ that are compatible with these free software licenses.
+
+ Additionally, the \l{Qt Examples}{examples} included with Qt are provided under
+ the terms of the \l{BSD License}.
The support of open source with the Open Source Versions of Qt has enabled large
successful software projects like KDE to thrive, with thousands of developers
@@ -73,8 +76,8 @@
More information on Free and Open Source software is available online:
\list
- \o GNU GPL: \l http://www.gnu.org/.
- \o Open Source licensing: \l http://www.opensource.org/.
+ \o GNU GPL, GNU LGPL: \l http://www.gnu.org/
+ \o Open Source licensing: \l http://www.opensource.org/
\endlist
See \l{Licensing Information} for a collection of documents about licenses
@@ -85,6 +88,5 @@
the sales department at http://qt.nokia.com/contact.
If you are in doubt what edition of Qt is right for your project,
- please contact
- \l{mailto:qt-info@nokia.com}{qt-info@nokia.com}.
+ please contact \l{mailto:qt-info@nokia.com}{qt-info@nokia.com}.
*/
diff --git a/doc/src/objectmodel/object.qdoc b/doc/src/objectmodel/object.qdoc
index f81577d..8ae91ec 100644
--- a/doc/src/objectmodel/object.qdoc
+++ b/doc/src/objectmodel/object.qdoc
@@ -59,11 +59,11 @@
communication called \l{signals and slots}
\o queryable and designable \l{Qt's Property System}{object
properties}
- \o powerful \l{events and event filters}
+ \o powerful \l{The Event System}{events and event filters}
\o contextual \l{i18n}{string translation for internationalization}
\o sophisticated interval driven \l timers that make it possible
to elegantly integrate many tasks in an event-driven GUI
- \o hierarchical and queryable \l{Object Trees and Object Ownership}{object
+ \o hierarchical and queryable \l{Object Trees & Ownership}{object
trees} that organize object ownership in a natural way
\o guarded pointers (QPointer) that are automatically
set to 0 when the referenced object is destroyed, unlike normal C++
@@ -113,7 +113,7 @@
\o might have a unique \l{QObject::objectName()}. If we copy a Qt
Object, what name should we give the copy?
- \o has a location in an \l{Object Trees and Object Ownership}
+ \o has a location in an \l{Object Trees & Ownership}
{object hierarchy}. If we copy a Qt Object, where should the copy
be located?
diff --git a/doc/src/painting-and-printing/paintsystem.qdoc b/doc/src/painting-and-printing/paintsystem.qdoc
index 44c84a2..c106f35 100644
--- a/doc/src/painting-and-printing/paintsystem.qdoc
+++ b/doc/src/painting-and-printing/paintsystem.qdoc
@@ -89,7 +89,7 @@
\o \l{Classes for Painting}
\o \l{Paint Devices and Backends}
\o \l{Drawing and Filling}
- \o \l{The Coordinate System}
+ \o \l{Coordinate System}
\o \l{Reading and Writing Image Files}
\o \l{Styling}
\o \l{Printing with Qt}
@@ -339,10 +339,10 @@
Normally, QPainter draws in a "natural" coordinate system, but it
is able to perform view and world transformations using the
- QTransform class. For more information, see \l {The Coordinate
- System} documentation which also describes the rendering process,
- i.e. the relation between the logical representation and the
- rendered pixels, and the benefits of anti-aliased painting.
+ QTransform class. For more information, see \l {Coordinate
+ System}, which also describes the rendering process, i.e. the
+ relation between the logical representation and the rendered
+ pixels, and the benefits of anti-aliased painting.
\table 100%
\row \o
@@ -568,5 +568,5 @@
\endtable
For more information about widget styling and appearance, see the
- documentation about \l{Implementing Styles and Style Aware Widgets}.
+ \l{Styles &amp Style Aware Widgets}.
*/
diff --git a/doc/src/porting/porting4-canvas.qdoc b/doc/src/porting/porting4-canvas.qdoc
index b69f53b..592f430 100644
--- a/doc/src/porting/porting4-canvas.qdoc
+++ b/doc/src/porting/porting4-canvas.qdoc
@@ -56,7 +56,7 @@
number of custom-made 2D graphical items, and a view widget for
visualizing the items, with support for zooming and rotation. Graphics
View was introduced in Qt 4.2, replacing its predecessor, QCanvas. For
- more on Graphics View, see \l{The Graphics View Framework}.
+ more on Graphics View, see \l{Graphics View Framework}.
This document walks through the steps needed, class by class and function
by function, to port a QCanvas application to Graphics View.
diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc
index 1b6eeb7..75fe844 100644
--- a/doc/src/porting/porting4.qdoc
+++ b/doc/src/porting/porting4.qdoc
@@ -1000,8 +1000,8 @@
\row \o \c QCanvasView \o Q3CanvasView
\endtable
- \l{The Graphics View Framework} replaces QCanvas. For more on porting to
- Graphics View, see \l{Porting to Graphics View}.
+ The \l{Graphics View Framework} replaces QCanvas. For more on
+ porting to Graphics View, see \l{Porting to Graphics View}.
\section1 QColor
diff --git a/doc/src/scripting/scripting.qdoc b/doc/src/scripting/scripting.qdoc
index 2c22989..1f203a6 100644
--- a/doc/src/scripting/scripting.qdoc
+++ b/doc/src/scripting/scripting.qdoc
@@ -362,7 +362,7 @@
By default, the script engine does not take ownership of the
QObject that is passed to QScriptEngine::newQObject(); the object
is managed according to Qt's object ownership (see
- \l{Object Trees and Object Ownership}). This mode is appropriate
+ \l{Object Trees & Ownership}). This mode is appropriate
when, for example, you are wrapping C++ objects that are part of
your application's core; that is, they should persist regardless of
what happens in the scripting environment. Another way of stating
@@ -627,9 +627,9 @@
To completely understand how to make C++ objects available to Qt
Script, some basic knowledge of the Qt meta-object system is very
- helpful. We recommend that you read the \l{Qt Object Model}. The
- information in this document and the documents it links to are very
- useful for understanding how to implement application objects.
+ helpful. We recommend that you read about the Qt \l{Object Model}
+ and \l{The Meta-Object System}, which are useful for understanding
+ how to implement application objects.
However, this knowledge is not essential in the simplest cases.
To make an object available in QtScript, it must derive from
diff --git a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
index 4f27661..81099a7 100644
--- a/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
+++ b/doc/src/snippets/code/src_gui_graphicsview_qgraphicsitem.cpp
@@ -271,3 +271,9 @@ class QGraphicsPathItem : public QAbstractGraphicsShapeItem
};
//! [18]
+//! [19]
+QTransform xform = item->deviceTransform(view->viewportTransform());
+QRect deviceRect = xform.mapRect(rect).toAlignedRect();
+view->viewport()->scroll(dx, dy, deviceRect);
+//! [19]
+
diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/declarative/Sprite.qml
index 6670703..5f32b0a 100644
--- a/doc/src/snippets/declarative/Sprite.qml
+++ b/doc/src/snippets/declarative/Sprite.qml
@@ -1,3 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//![0]
import Qt 4.7
Rectangle { width: 80; height: 50; color: "red" }
+//![0]
diff --git a/doc/src/snippets/declarative/borderimage.qml b/doc/src/snippets/declarative/borderimage.qml
index 9c4247e..62b6def 100644
--- a/doc/src/snippets/declarative/borderimage.qml
+++ b/doc/src/snippets/declarative/borderimage.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/codingconventions/dotproperties.qml b/doc/src/snippets/declarative/codingconventions/dotproperties.qml
index 942b0b1..69743ba 100644
--- a/doc/src/snippets/declarative/codingconventions/dotproperties.qml
+++ b/doc/src/snippets/declarative/codingconventions/dotproperties.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Item {
diff --git a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml
index 417366c..86d8b69 100644
--- a/doc/src/snippets/declarative/codingconventions/javascript-imports.qml
+++ b/doc/src/snippets/declarative/codingconventions/javascript-imports.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
//![0]
diff --git a/doc/src/snippets/declarative/codingconventions/javascript.qml b/doc/src/snippets/declarative/codingconventions/javascript.qml
index 64b5a40..39885db 100644
--- a/doc/src/snippets/declarative/codingconventions/javascript.qml
+++ b/doc/src/snippets/declarative/codingconventions/javascript.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/codingconventions/lists.qml b/doc/src/snippets/declarative/codingconventions/lists.qml
index 63e8100..55a50c6 100644
--- a/doc/src/snippets/declarative/codingconventions/lists.qml
+++ b/doc/src/snippets/declarative/codingconventions/lists.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Item {
diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/declarative/codingconventions/photo.qml
index c28c2c9..5421a8b 100644
--- a/doc/src/snippets/declarative/codingconventions/photo.qml
+++ b/doc/src/snippets/declarative/codingconventions/photo.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
//! [0]
diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml
index ab1bbc9..9873cbe 100644
--- a/doc/src/snippets/declarative/comments.qml
+++ b/doc/src/snippets/declarative/comments.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Text {
diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/declarative/createComponent.qml
index c4a1617..3686188 100644
--- a/doc/src/snippets/declarative/createComponent.qml
+++ b/doc/src/snippets/declarative/createComponent.qml
@@ -1,3 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//![0]
import Qt 4.7
import "componentCreation.js" as MyModule
@@ -7,3 +49,4 @@ Rectangle {
Component.onCompleted: MyModule.createSpriteObjects();
}
+//![0]
diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml
index 6b331c4..f2ac6e6 100644
--- a/doc/src/snippets/declarative/createQmlObject.qml
+++ b/doc/src/snippets/declarative/createQmlObject.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/drag.qml b/doc/src/snippets/declarative/drag.qml
index 79469e3..0a69574 100644
--- a/doc/src/snippets/declarative/drag.qml
+++ b/doc/src/snippets/declarative/drag.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
//! [0]
diff --git a/doc/src/snippets/declarative/dynamicObjects.qml b/doc/src/snippets/declarative/dynamicObjects.qml
index 6a8c927..1d1de6c 100644
--- a/doc/src/snippets/declarative/dynamicObjects.qml
+++ b/doc/src/snippets/declarative/dynamicObjects.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
//![0]
diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/declarative/flickableScrollbar.qml
index 147751a..7f92c52 100644
--- a/doc/src/snippets/declarative/flickableScrollbar.qml
+++ b/doc/src/snippets/declarative/flickableScrollbar.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
//![0]
diff --git a/doc/src/snippets/declarative/flipable.qml b/doc/src/snippets/declarative/flipable.qml
index ae74345..f4e6b6f 100644
--- a/doc/src/snippets/declarative/flipable.qml
+++ b/doc/src/snippets/declarative/flipable.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//! [0]
import Qt 4.7
diff --git a/doc/src/snippets/declarative/focusscopes.qml b/doc/src/snippets/declarative/focusscopes.qml
index 686de29..557d72f 100644
--- a/doc/src/snippets/declarative/focusscopes.qml
+++ b/doc/src/snippets/declarative/focusscopes.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
//![0]
diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/declarative/folderlistmodel.qml
index e90f9fd..9809e44 100644
--- a/doc/src/snippets/declarative/folderlistmodel.qml
+++ b/doc/src/snippets/declarative/folderlistmodel.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![0]
import Qt 4.7
import Qt.labs.folderlistmodel 1.0
diff --git a/doc/src/snippets/declarative/gradient.qml b/doc/src/snippets/declarative/gradient.qml
index 168398d..7a68233 100644
--- a/doc/src/snippets/declarative/gradient.qml
+++ b/doc/src/snippets/declarative/gradient.qml
@@ -1,5 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
+//![code]
Rectangle {
width: 100; height: 100
gradient: Gradient {
@@ -8,3 +50,4 @@ Rectangle {
GradientStop { position: 1.0; color: "green" }
}
}
+//![code]
diff --git a/doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml b/doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml
index 90f139d..1e79030 100644
--- a/doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml
+++ b/doc/src/snippets/declarative/gridview/dummydata/ContactModel.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
ListModel {
diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml
index 1d3df97..3c205bc 100644
--- a/doc/src/snippets/declarative/gridview/gridview.qml
+++ b/doc/src/snippets/declarative/gridview/gridview.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
//! [3]
diff --git a/doc/src/snippets/declarative/listview/ContactModel.qml b/doc/src/snippets/declarative/listview/ContactModel.qml
index b930c06..f9eb4cb 100644
--- a/doc/src/snippets/declarative/listview/ContactModel.qml
+++ b/doc/src/snippets/declarative/listview/ContactModel.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![0]
import Qt 4.7
diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml
index 794b3f2..af9e95f 100644
--- a/doc/src/snippets/declarative/listview/highlight.qml
+++ b/doc/src/snippets/declarative/listview/highlight.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml
index 1e9ccd9..e44eb0b 100644
--- a/doc/src/snippets/declarative/listview/listview.qml
+++ b/doc/src/snippets/declarative/listview/listview.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![import]
import Qt 4.7
//![import]
diff --git a/doc/src/snippets/declarative/mouseregion.qml b/doc/src/snippets/declarative/mouseregion.qml
index 683770b..a162854 100644
--- a/doc/src/snippets/declarative/mouseregion.qml
+++ b/doc/src/snippets/declarative/mouseregion.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle { width: 200; height: 100
diff --git a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml
index 4004076..a52b60a 100644
--- a/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml
+++ b/doc/src/snippets/declarative/pathview/dummydata/MenuModel.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
ListModel {
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml
index ba860c2..e8d2509 100644
--- a/doc/src/snippets/declarative/pathview/pathattributes.qml
+++ b/doc/src/snippets/declarative/pathview/pathattributes.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml
index 3686398..31b793d 100644
--- a/doc/src/snippets/declarative/pathview/pathview.qml
+++ b/doc/src/snippets/declarative/pathview/pathview.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
index 1053f73..59fbe1a 100644
--- a/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![0]
import Qt 4.7
diff --git a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
index f1a3b4f..7dce022 100644
--- a/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![0]
import Qt 4.7
diff --git a/doc/src/snippets/declarative/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml
index dfe923f..bf31b54 100644
--- a/doc/src/snippets/declarative/qtbinding/resources/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![0]
import Qt 4.7
diff --git a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
index 2efa542..2184a5d 100644
--- a/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![0]
import Qt 4.7
diff --git a/doc/src/snippets/declarative/repeater-index.qml b/doc/src/snippets/declarative/repeater-index.qml
index 709eaf2..3eee742 100644
--- a/doc/src/snippets/declarative/repeater-index.qml
+++ b/doc/src/snippets/declarative/repeater-index.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml
index 02a8208..8b4d9cb 100644
--- a/doc/src/snippets/declarative/repeater.qml
+++ b/doc/src/snippets/declarative/repeater.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml
index f2fd78c..0fb9a61 100644
--- a/doc/src/snippets/declarative/rotation.qml
+++ b/doc/src/snippets/declarative/rotation.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
import Qt 4.7
Rectangle {
diff --git a/doc/src/snippets/declarative/texteditor.qml b/doc/src/snippets/declarative/texteditor.qml
new file mode 100644
index 0000000..6735c6c
--- /dev/null
+++ b/doc/src/snippets/declarative/texteditor.qml
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+import Qt 4.7
+
+//![0]
+Flickable {
+ id: flick
+
+ width: 300; height: 200;
+ contentWidth: edit.paintedWidth
+ contentHeight: edit.paintedHeight
+ clip: true
+
+ function ensureVisible(r)
+ {
+ if (contentX >= r.x)
+ contentX = r.x;
+ else if (contentX+width <= r.x+r.width)
+ contentX = r.x+r.width-width;
+ if (contentY >= r.y)
+ contentY = r.y;
+ else if (contentY+height <= r.y+r.height)
+ contentY = r.y+r.height-height;
+ }
+
+ TextEdit {
+ id: edit
+ width: flick.width
+ height: flick.height
+ focus: true
+ wrapMode: TextEdit.Wrap
+ onCursorRectangleChanged: flick.ensureVisible(cursorRectangle)
+ }
+}
+//![0]
diff --git a/doc/src/snippets/declarative/workerscript.qml b/doc/src/snippets/declarative/workerscript.qml
index 838e7e5..e07911a 100644
--- a/doc/src/snippets/declarative/workerscript.qml
+++ b/doc/src/snippets/declarative/workerscript.qml
@@ -1,3 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
//![0]
import Qt 4.7
diff --git a/doc/src/snippets/declarative/xmlrole.qml b/doc/src/snippets/declarative/xmlrole.qml
new file mode 100644
index 0000000..6d04daf
--- /dev/null
+++ b/doc/src/snippets/declarative/xmlrole.qml
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtDeclarative module 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import Qt 4.7
+
+Rectangle {
+ width: 300; height: 200
+
+//![0]
+XmlListModel {
+ id: model
+//![0]
+ source: "xmlrole.xml"
+
+//![1]
+ // XmlRole queries will be made on <book> elements
+ query: "/catalogue/book"
+
+ // query the book title
+ XmlRole { name: "title"; query: "title/string()" }
+
+ // query the book's year
+ XmlRole { name: "year"; query: "year/number()" }
+
+ // query the book's type (the '@' indicates 'type' is an attribute, not an element)
+ XmlRole { name: "type"; query: "@type/string()" }
+
+ // query the book's first listed author (note in XPath the first index is 1, not 0)
+ XmlRole { name: "first_author"; query: "author[1]/string()" }
+}
+//![1]
+
+ListView {
+ width: 300; height: 200
+ model: model
+ delegate: Column {
+ Text { text: title + " (" + type + ")"; font.bold: true }
+ Text { text: first_author }
+ Text { text: year }
+ }
+}
+
+}
diff --git a/doc/src/snippets/declarative/xmlrole.xml b/doc/src/snippets/declarative/xmlrole.xml
new file mode 100644
index 0000000..c9f999e
--- /dev/null
+++ b/doc/src/snippets/declarative/xmlrole.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<catalogue>
+ <book type="Hardcover">
+ <title>C++ GUI Programming with Qt 4</title>
+ <year>2006</year>
+ <author>Jasmin Blanchette</author>
+ <author>Mark Summerfield</author>
+ </book>
+ <book type="Paperback">
+ <title>Programming with Qt</title>
+ <year>2002</year>
+ <author>Matthias Kalle Dalheimer</author>
+ </book>
+ </catalogue>
diff --git a/doc/src/sql-programming/qsqldatatype-table.qdoc b/doc/src/sql-programming/qsqldatatype-table.qdoc
index fb5fb49..329222b 100644
--- a/doc/src/sql-programming/qsqldatatype-table.qdoc
+++ b/doc/src/sql-programming/qsqldatatype-table.qdoc
@@ -46,7 +46,7 @@
\ingroup qt-sql
- \section1 Data Types for Qt Supported Database Systems
+ \section1 Recommended Data Types for Qt-Supported Database Systems
This table shows the recommended data types for extracting data from
the databases supported in Qt. Note that types used in Qt are not
diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc
index b34810c..936e555 100644
--- a/doc/src/sql-programming/sql-programming.qdoc
+++ b/doc/src/sql-programming/sql-programming.qdoc
@@ -73,7 +73,7 @@
\endlist
\o \l{Executing SQL Statements}
\list
- \o \l{Recommended Use of Data Types in Databases}
+ \o \l{Data Types for Qt-supported Database Systems}
\endlist
\o \l{Using the SQL Model Classes}
\o \l{Presenting Data in a Table View}
@@ -240,8 +240,9 @@
QVariant::toString() and QVariant::toInt() to convert
variants to QString and \c int.
- For an overview of the recommended types used with Qt supported
- Databases, please refer to \l{Recommended Use of Data Types in Databases}{this table}.
+ For an overview of the recommended types for use with Qt-supported
+ Databases, please refer to \l{Data Types for Qt-supported Database
+ Systems} {this table}.
You can iterate back and forth using QSqlQuery::next(),
QSqlQuery::previous(), QSqlQuery::first(), QSqlQuery::last(), and
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index 7d93486..58a0248 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -33,15 +33,27 @@ $('#bigA').click(function() {
$(this).addClass('active')
});
+$('.feedclose').click(function() {
+ $('.bd').show();
+ $('.hd').show();
+ $('.footer').show();
+ $('#feedbackBox').hide();
+ $('#blurpage').hide();
+});
+$('.feedback').click(function() {
+ $('.bd').hide();
+ $('.hd').hide();
+ $('.footer').hide();
+ $('#feedbackBox').show();
+ $('#blurpage').show();
+});
var lookupCount = 0;
var articleCount = 0;
var exampleCount = 0;
var qturl = ""; // change from "http://doc.qt.nokia.com/4.6/" to 0 so we can have relative links
function processNokiaData(response){
-$('.sidebar .search form input').addClass('loading');
- // debug $('.content').prepend('<li>handling search results</li>'); // debuging
var propertyTags = response.getElementsByTagName('page');
for (var i=0; i< propertyTags.length; i++) {
@@ -50,7 +62,6 @@ $('.sidebar .search form input').addClass('loading');
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage'){
lookupCount++;
- //$('.live001').css('display','block');
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
@@ -65,7 +76,6 @@ $('.sidebar .search form input').addClass('loading');
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article'){
articleCount++;
- //$('.live002').css('display','block');
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
@@ -79,7 +89,6 @@ $('.sidebar .search form input').addClass('loading');
}
if(propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example'){
exampleCount++;
- //$('.live003').css('display','block');
for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++){
@@ -91,10 +100,11 @@ $('.sidebar .search form input').addClass('loading');
}
}
+ if(i==propertyTags.length){$('#pageType').removeClass('loading');}
+
}
- if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');
-}
+ if(lookupCount == 0){$('#ul001').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul001 li').css('display','block');$('.sidebar .search form input').removeClass('loading');}
if(articleCount == 0){$('#ul002').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul002 li').css('display','block');}
if(exampleCount == 0){$('#ul003').prepend('<li class=\"liveResult noMatch\">Found no result</li>');$('#ul003 li').css('display','block');}
// reset count variables;
@@ -103,12 +113,18 @@ $('.sidebar .search form input').addClass('loading');
exampleCount = 0;
}
-
//build regular expression object to find empty string or any number of blank
var blankRE=/^\s*$/;
function CheckEmptyAndLoadList()
{
+ var pageUrl = window.location.href;
+ var pageVal = $('title').html();
+ $('#feedUrl').remove();
+ $('#pageVal').remove();
+ $('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">');
+ $('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">');
$('.liveResult').remove();
+ $('.defaultLink').css('display','block');
var value = document.getElementById('pageType').value;
if((blankRE.test(value)) || (value.length < 3))
{
@@ -131,8 +147,9 @@ else
*/
// Loads on doc ready
$(document).ready(function () {
+ //alert(pageUrl);
+ //$('#pageUrl').attr('foo',pageUrl);
var pageTitle = $('title').html();
- $('#feedform').append('<input id="page" name="pageVal" value="'+pageTitle+'" style="display:none;">');
var currentString = $('#pageType').val() ;
if(currentString.length < 1){
$('.defaultLink').css('display','block');
@@ -142,6 +159,7 @@ else
$('#pageType').keyup(function () {
var searchString = $('#pageType').val() ;
if ((searchString == null) || (searchString.length < 3)) {
+ $('#pageType').removeClass('loading');
$('.liveResult').remove(); // replaces removeResults();
CheckEmptyAndLoadList();
$('.report').remove();
@@ -150,6 +168,7 @@ else
}
if (this.timer) clearTimeout(this.timer);
this.timer = setTimeout(function () {
+ $('#pageType').addClass('loading');
// debug$('.content').prepend('<li>new search started </li>');// debug
// debug$('.content').prepend('<p class=\"report\">Search string ' +searchString +'</p>'); // debug
@@ -162,6 +181,8 @@ else
success: function (response, textStatus) {
$('.liveResult').remove(); // replaces removeResults();
+ $('#pageType').removeClass('loading');
+
processNokiaData(response);
}
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 5ad90e3..47fe2e0 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -39,7 +39,7 @@
h1, h2, h3, h4, h5, h6
{
font-size: 100%;
- font-weight: normal;
+/* font-weight: normal; */
}
q:before, q:after
{
@@ -456,6 +456,7 @@
.wrap .content
{
padding: 30px;
+ word-wrap:break-word;
}
.wrap .content li
@@ -843,7 +844,7 @@
background-color: #e6e7e8;
z-index: 4;
}
- #feedcloseX a
+ #feedcloseX
{
display: inline;
padding: 5px 5px 0 0;
@@ -948,6 +949,11 @@
margin-left: 15px;
}
+ .wrap .content .toc .level3
+ {
+ margin-left: 30px;
+ }
+
.content .toc li
{
font: normal 10px/1.2 Verdana;
@@ -988,6 +994,7 @@
border-width: 1px;
border-style: solid;
border-color: #E6E6E6;
+ width:100%;
}
.centerAlign
@@ -1067,6 +1074,7 @@
.indexboxcont .sectionlist
{
display: inline-block;
+ vertical-align:top;
width: 32.5%;
padding: 0;
}
@@ -1138,7 +1146,34 @@
/* end of screen media */
-
+.flowList{
+vertical-align:top;
+}
+.alphaChar{
+width:100%;
+background-color:#F6F6F6;
+border:1px solid #E6E6E6;
+font-size:12pt;
+padding-left:10px;
+margin-top:10px;
+margin-bottom:10px;
+}
+
+.flowList dl{
+}
+.flowList dd{
+display:inline-block;
+margin-left:10px;
+width:250px;
+}
+.wrap .content .flowList p{
+padding:0px;
+}
+pre.highlightedCode {
+ display: block;
+ overflow:hidden;
+}
+
}
/* end of screen media */
diff --git a/doc/src/tutorials/addressbook-fr.qdoc b/doc/src/tutorials/addressbook-fr.qdoc
index 98c44a3..85a9acf 100644
--- a/doc/src/tutorials/addressbook-fr.qdoc
+++ b/doc/src/tutorials/addressbook-fr.qdoc
@@ -42,10 +42,6 @@
/*!
\page tutorials-addressbook-fr.html
- \startpage {index.html}{Qt Reference Documentation}
- \contentspage Tutorials
- \nextpage {tutorials/addressbook-fr/part1}{Chapitre 1}
-
\title Tutoriel "Carnet d'adresses"
\brief Une introduction à la programation d'interface graphique montrant comment construire une application simple avec Qt.
@@ -93,8 +89,7 @@
/*!
\page tutorials-addressbook-fr-part1.html
- \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
- \nextpage {tutorials/addressbook-fr/part2}{Chapitre 2}
+
\example tutorials/addressbook-fr/part1
\title Carnet d'adresses 1 - Conception de l'interface utilisateur
@@ -252,9 +247,7 @@
/*!
\page tutorials-addressbook-fr-part2.html
- \previouspage {tutorials/addressbook-fr/part1}{Chapitre 1}
- \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
- \nextpage {tutorials/addressbook-fr/part3}{Chapitre 3}
+
\example tutorials/addressbook-fr/part2
\title Carnet d'adresses 2 - Ajouter des adresses
@@ -414,9 +407,7 @@
/*!
\page tutorials-addressbook-fr-part3.html
- \previouspage {tutorials/addressbook-fr/part2}{Chapitre 2}
- \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
- \nextpage {tutorials/addressbook-fr/part4}{Chapitre 4}
+
\example tutorials/addressbook-fr/part3
\title Carnet d'adresses 3 - Navigation entre les éléments
@@ -536,9 +527,7 @@
/*!
\page tutorials-addressbook-fr-part4.html
- \previouspage {tutorials/addressbook-fr/part3}{Chapitre 3}
- \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
- \nextpage {tutorials/addressbook-fr/part5}{Chapitre 5}
+
\example tutorials/addressbook-fr/part4
\title Carnet d'Adresses 4 - éditer et supprimer des adresses
@@ -688,9 +677,7 @@
/*!
\page tutorials-addressbook-fr-part5.html
- \previouspage {tutorials/addressbook-fr/part4}{Chapitre 4}
- \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
- \nextpage {tutorials/addressbook-fr/part6}{Chapitre 6}
+
\example tutorials/addressbook-fr/part5
\title Carnet d'adresse 5 - Ajout d'une fonction de recherche
@@ -839,9 +826,7 @@
/*!
\page tutorials-addressbook-part6.html
- \previouspage {tutorials/addressbook-fr/part5}{Chapitre 5}
- \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
- \nextpage {tutorials/addressbook-fr/part7}{Chapitre 7}
+
\example tutorials/addressbook-fr/part6
\title Carnet d'Adresses 6 - Sauvegarde et chargement
@@ -978,8 +963,7 @@
/*!
\page tutorials-addressbook-fr-part7.html
- \previouspage {tutorials/addressbook-fr/part6}{Chapitre 6}
- \contentspage {Tutoriel "Carnet d'adresses"}{Sommaire}
+
\example tutorials/addressbook-fr/part7
\title Carnet d'adresse 7 - Fonctionnalités avancées
diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc
index 04410eb..e5cb448a 100644
--- a/doc/src/tutorials/addressbook.qdoc
+++ b/doc/src/tutorials/addressbook.qdoc
@@ -42,15 +42,11 @@
/*!
\page tutorials-addressbook.html
- \startpage {index.html}{Qt Reference Documentation}
- \contentspage Tutorials
- \nextpage {tutorials/addressbook/part1}{Chapter 1}
-
\title Address Book Tutorial
\brief An introduction to GUI programming, showing how to put together a
simple yet fully-functioning application.
- This tutorial gives an introduction to GUI programming using the Qt
+ This tutorial is an introduction to GUI programming with the Qt
cross-platform framework.
\image addressbook-tutorial-screenshot.png
@@ -61,8 +57,8 @@
Some commonly used features are never used in this tutorial.
\endomit
- In the process, we will learn about some basic technologies provided by Qt,
- such as
+ In this tutorial, you will learn about some of the basic
+ components of Qt, including:
\list
\o Widgets and layout managers
@@ -71,13 +67,9 @@
\o Input and output devices
\endlist
- If you are completely new to Qt, please read \l{How to Learn Qt} if you
- have not already done so.
-
- The tutorial's source code is located in Qt's \c examples/tutorials/addressbook
- directory.
+ If you are new to Qt, we recommend reading \l{How to Learn Qt} first.
- Tutorial chapters:
+ Tutorial contents:
\list 1
\o \l{tutorials/addressbook/part1}{Designing the User Interface}
@@ -89,28 +81,30 @@
\o \l{tutorials/addressbook/part7}{Additional Features}
\endlist
- Although this little application does not look much like a fully-fledged
- modern GUI application, it uses many of the basic techniques that are used
- in more complex applications. After you have worked through it, we
- recommend checking out the \l{mainwindows/application}{Application}
- example, which presents a small GUI application, with menus, toolbars, a
- status bar, and so on.
+ The tutorial source code is located in \c{examples/tutorials/addressbook}.
+
+ Although this little application does not look much like a
+ fully-fledged modern GUI application, it uses many of the basic
+ elements that are used in more complex applications. After you
+ have worked through this tutorial, we recommend reading the
+ \l{mainwindows/application}{Application} example, which presents a
+ small GUI application, with menus, toolbars, a status bar, and so
+ on.
*/
/*!
\page tutorials-addressbook-part1.html
- \contentspage {Address Book Tutorial}{Contents}
- \nextpage {tutorials/addressbook/part2}{Chapter 2}
+
\example tutorials/addressbook/part1
- \title Address Book 1 - Designing the User Interface
+ \title Part 1 - Designing the User Interface
- The first part of this tutorial covers the design of the basic graphical
- user interface (GUI) we use for the Address Book application.
+ This first part covers the design of the basic graphical user
+ interface (GUI) for our address book application.
- The first step to creating a GUI program is to design the user interface.
- In this chapter, our goal is to set up the labels and input fields needed
- to implement a basic address book application. The figure below is a
- screenshot of our expected output.
+ The first step in creating a GUI program is to design the user
+ interface. Here the our goal is to set up the labels and input
+ fields to implement a basic address book. The figure below is a
+ screenshot of the expected output.
\image addressbook-tutorial-part1-screenshot.png
@@ -169,14 +163,15 @@
\snippet tutorials/addressbook/part1/addressbook.h class definition
- The class holds declarations of \c nameLine and \c addressText, the
- private instances of QLineEdit and QTextEdit mentioned earlier.
- You will see, in the coming chapters, that data stored in \c nameLine and
- \c addressText is needed for many of the address book's functions.
+ The class holds declarations of \c nameLine and \c addressText,
+ the private instances of QLineEdit and QTextEdit mentioned
+ earlier. The data stored in \c nameLine and \c addressText will
+ be needed for many of the address book functions.
- We do not need to include declarations of the QLabel objects we will use
- because we will not need to reference them once they have been created.
- The way Qt tracks the ownership of objects is explained in the next section.
+ We don't include declarations of the QLabel objects we will use
+ because we will not need to reference them once they have been
+ created. The way Qt tracks the ownership of objects is explained
+ in the next section.
The Q_OBJECT macro itself implements some of the more advanced features of Qt.
For now, it is useful to think of the Q_OBJECT macro as a shortcut which allows
@@ -195,15 +190,14 @@
\snippet tutorials/addressbook/part1/addressbook.cpp constructor and input fields
- Within this constructor, we declare and instantiate two local QLabel objects,
- \c nameLabel and \c addressLabel, as well as instantiate \c nameLine and
- \c addressText. The
- \l{QObject::tr()}{tr()} function returns a translated version of the
- string, if there is one available; otherwise, it returns the string itself.
- Think of this function as an \c{<insert translation here>} marker to mark
- QString objects for translation. You will notice, in the coming chapters as
- well as in the \l{Qt Examples}, that we include it whenever we use a
- translatable string.
+ In this constructor, the QLabel objects \c nameLabel and \c
+ addressLabel are instantiated, as well as \c nameLine and \c
+ addressText. The \l{QObject::tr()}{tr()} function returns a
+ translated version of the string, if there is one
+ available. Otherwise it returns the string itself. This function
+ marks its QString parameter as one that should be translated into
+ other languages. It should be used wherever a translatable string
+ appears.
When programming with Qt, it is useful to know how layouts work.
Qt provides three main layout classes: QHBoxLayout, QVBoxLayout
@@ -254,14 +248,12 @@
/*!
\page tutorials-addressbook-part2.html
- \previouspage Address Book 1 - Designing the User Interface
- \contentspage {Address Book Tutorial}{Contents}
- \nextpage {tutorials/addressbook/part3}{Chapter 3}
+
\example tutorials/addressbook/part2
- \title Address Book 2 - Adding Addresses
+ \title Part 2 - Adding Addresses
- The next step to creating our basic address book application is to allow
- a little bit of user interaction.
+ The next step in creating the address book is to implement some
+ user interactions.
\image addressbook-tutorial-part2-add-contact.png
@@ -283,9 +275,9 @@
However, for an overview of Qt's signals and slots concept, you can refer
to the \l{Signals and Slots} document.
- Three QPushButton objects: \c addButton, \c submitButton and
- \c cancelButton, are now included in our private variable declarations,
- along with \c nameLine and \c addressText from the last chapter.
+ Three QPushButton objects (\c addButton, \c submitButton, and
+ \c cancelButton) are now included in our private variable declarations,
+ along with \c nameLine and \c addressText.
\snippet tutorials/addressbook/part2/addressbook.h pushbutton declaration
@@ -407,20 +399,20 @@
/*!
\page tutorials-addressbook-part3.html
- \previouspage Address Book 2 - Adding Addresses
- \contentspage {Address Book Tutorial}{Contents}
- \nextpage {tutorials/addressbook/part4}{Chapter 4}
+
\example tutorials/addressbook/part3
- \title Address Book 3 - Navigating between Entries
+ \title Part 3 - Navigating between Entries
- The address book application is now half complete. We need to add some
- functions to navigate between contacts. But first, we have to decide
- what sort of a data structure we would like to use to hold these contacts.
+ The address book is now about half complete. We should add the
+ capability to navigate among the contacts, but first we must
+ decide what sort of a data structure we need for containing these
+ contacts.
- In Chapter 2, we used a QMap of key-value pairs with the contact's name
- as the \e key, and the contact's address as the \e value. This works well
- for our case. However, in order to navigate and display each entry, a
- little bit of enhancement is needed.
+ In the previous section, we used a QMap of key-value pairs with
+ the contact's name as the \e key, and the contact's address as the
+ \e value. This works well for our case. However, in order to
+ navigate and display each entry, a little bit of enhancement is
+ needed.
We enhance the QMap by making it replicate a data structure similar to a
circularly-linked list, where all elements are connected, including the
@@ -431,9 +423,9 @@
\section1 Defining the AddressBook Class
- In order to add navigation functions to the address book application, we
- need to add two more slots to our \c AddressBook class: \c next() and
- \c previous(). These are added to our \c addressbook.h file:
+ To add navigation functions to the address book, we must add two
+ more slots to the \c AddressBook class: \c next() and \c
+ previous() to the \c addressbook.h file:
\snippet tutorials/addressbook/part3/addressbook.h navigation functions
@@ -455,8 +447,7 @@
\snippet tutorials/addressbook/part3/addressbook.cpp connecting navigation signals
- The image below is our expected graphical user interface. Notice that it
- is getting closer to our final application.
+ The image below is the expected graphical user interface.
\image addressbook-tutorial-part3-screenshot.png
@@ -525,27 +516,26 @@
/*!
\page tutorials-addressbook-part4.html
- \previouspage Address Book 3 - Navigating between Entries
- \contentspage {Address Book Tutorial}{Contents}
- \nextpage {tutorials/addressbook/part5}{Chapter 5}
+
\example tutorials/addressbook/part4
- \title Address Book 4 - Editing and Removing Addresses
+ \title Part 4 - Editing and Removing Addresses
- In this chapter, we look at ways to modify the contents of contacts stored
- in the address book application.
+ Now we look at ways to modify the contents of contacts stored in
+ the address book.
\image addressbook-tutorial-screenshot.png
- We now have an address book that not only holds contacts in an organized
- manner, but also allows navigation. It would be convenient to include
- edit and remove functions so that a contact's details can be changed
- when needed. However, this requires a little improvement, in the form of
- enums. In our previous chapters, we had two modes: \c{AddingMode} and
- \c{NavigationMode} - but they were not defined as enums. Instead, we
- enabled and disabled the corresponding buttons manually, resulting in
- multiple lines of repeated code.
+ We now have an address book that not only holds contacts in an
+ organized manner, but also allows navigation. It would be
+ convenient to include edit and remove functions so that a
+ contact's details can be changed when needed. However, this
+ requires a little improvement, in the form of enums. We defined
+ two modes: \c{AddingMode} and \c{NavigationMode}, but they were
+ not defined as enum values. Instead, we enabled and disabled the
+ corresponding buttons manually, resulting in multiple lines of
+ repeated code.
- In this chapter, we define the \c Mode enum with three different values:
+ Here we define the \c Mode enum with three different values:
\list
\o \c{NavigationMode},
@@ -579,10 +569,10 @@
\section1 Implementing the AddressBook Class
- We now have to implement the mode-changing features of the address book
- application. The \c editButton and \c removeButton are instantiated and
- disabled by default, as the address book starts up with zero contacts in
- memory.
+ We now implement the mode-changing features of the address
+ book. The \c editButton and \c removeButton are instantiated and
+ disabled by default. The address book starts with zero contacts
+ in memory.
\snippet tutorials/addressbook/part4/addressbook.cpp edit and remove buttons
@@ -653,33 +643,31 @@
\snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2
- By performing the task of setting the mode and updating the user interface in
- the same function, we avoid the possibility of the user interface getting "out
- of sync" with the internal state of the application.
-*/
+ By setting the mode and updating the user interface in the same
+ function, we avoid the possibility of the user interface getting
+ out of sync with the internal state of the application.
+ */
/*!
\page tutorials-addressbook-part5.html
- \previouspage Address Book 4 - Editing and Removing Addresses
- \contentspage {Address Book Tutorial}{Contents}
- \nextpage {tutorials/addressbook/part6}{Chapter 6}
+
\example tutorials/addressbook/part5
- \title Address Book 5 - Adding a Find Function
+ \title Part 5 - Adding a Find Function
- In this chapter, we look at ways to locate contacts and addresses in
- the address book application.
+ Here we look at ways to locate contacts and addresses in the
+ address book.
\image addressbook-tutorial-part5-screenshot.png
- As we keep adding contacts to our address book application, it becomes
- tedious to navigate them with the \e Next and \e Previous buttons. In this
- case, a \e Find function would be more efficient in looking up contacts.
- The screenshot above shows the \e Find button and its position on the panel
- of buttons.
+ As we add contacts to our address book, it becomes tedious to
+ navigate the list with the \e Next and \e Previous buttons. A \e
+ Find function would be more efficient. The screenshot above shows
+ the \e Find button and its position on the panel of buttons.
- When the user clicks on the \e Find button, it is useful to display a
- dialog that can prompt the user for a contact's name. Qt provides QDialog,
- which we subclass in this chapter, to implement a \c FindDialog class.
+ When the user clicks on the \e Find button, it is useful to
+ display a dialog that prompts for a contact's name. Qt provides
+ QDialog, which we subclass here to implement a \c FindDialog
+ class.
\section1 Defining the FindDialog Class
@@ -806,20 +794,18 @@
/*!
\page tutorials-addressbook-part6.html
- \previouspage Address Book 5 - Adding a Find Function
- \contentspage {Address Book Tutorial}{Contents}
- \nextpage {tutorials/addressbook/part7}{Chapter 7}
+
\example tutorials/addressbook/part6
- \title Address Book 6 - Loading and Saving
+ \title Part 6 - Loading and Saving
- This chapter covers the file handling features of Qt that we use to write
- loading and saving routines for the address book application.
+ This part covers the Qt file handling features we use to write
+ loading and saving routines for the address book.
\image addressbook-tutorial-part6-screenshot.png
- Although browsing and searching for contacts are useful features, our
- address book is not ready for use until we can save existing contacts and
- load them again at a later time.
+ Although browsing and searching the contact list are useful
+ features, our address book is not complete until we can save
+ existing contacts and load them again at a later time.
Qt provides a number of classes for \l{Input/Output and Networking}
{input and output}, but we have chosen to use two which are simple to use
@@ -930,21 +916,20 @@
/*!
\page tutorials-addressbook-part7.html
- \previouspage Address Book 6 - Loading and Saving
- \contentspage {Address Book Tutorial}{Contents}
+
\example tutorials/addressbook/part7
- \title Address Book 7 - Additional Features
+ \title Part 7 - Additional Features
- This chapter covers some additional features that make the address book
- application more convenient for everyday use.
+ This part covers some additional features that make the address
+ book more convenient for the frequent user.
\image addressbook-tutorial-part7-screenshot.png
- Although our address book application is useful in its own right, it would
- be useful if we could exchange contact data with other applications.
- The vCard format is a popular file format that can be used for this purpose.
- In this chapter, we extend our address book client to allow contacts to
- be exported to vCard \c{.vcf} files.
+ Although our address book is useful in isolation, it would be
+ better if we could exchange contact data with other applications.
+ The vCard format is a popular file format that can be used for
+ this purpose. Here we extend our address book client to allow
+ contacts to be exported to vCard \c{.vcf} files.
\section1 Defining the AddressBook Class
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
index 0422e1a..2b5f8cc 100644
--- a/doc/src/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -102,7 +102,7 @@
\section1 Real world widget examples
- In these \l{Widgets examples} {more advanced examples}, the code
+ In these \l{Widget examples} {more advanced examples}, the code
that creates the widgets and layouts is stored in other files. For
example, the GUI for a main window may be created in the
constructor of a QMainWindow subclass.
diff --git a/doc/src/widgets-and-layouts/focus.qdoc b/doc/src/widgets-and-layouts/focus.qdoc
index 71f41d5..5ccfb63 100644
--- a/doc/src/widgets-and-layouts/focus.qdoc
+++ b/doc/src/widgets-and-layouts/focus.qdoc
@@ -82,7 +82,7 @@
Pressing \key Tab is by far the most common way to move focus
using the keyboard. (Sometimes in data-entry applications Enter
does the same as \key{Tab}; this can easily be achieved in Qt by
- implementing an \l{Events and Event Filters}{event filter}.)
+ implementing an \l{The Event System}{event filter}.)
Pressing \key Tab, in all window systems in common use today,
moves the keyboard focus to the next widget in a circular
diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc
index 31dfe40..b031dec 100644
--- a/doc/src/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets-and-layouts/styles.qdoc
@@ -47,7 +47,7 @@
/*!
\page style-reference.html
- \title Styles and Style Aware Widgets
+ \title Styles &amp Style Aware Widgets
\ingroup qt-gui-concepts
\brief Styles and the styling of widgets.
diff --git a/doc/src/widgets-and-layouts/widgets.qdoc b/doc/src/widgets-and-layouts/widgets.qdoc
index 9fe2d69..c93a380 100644
--- a/doc/src/widgets-and-layouts/widgets.qdoc
+++ b/doc/src/widgets-and-layouts/widgets.qdoc
@@ -48,11 +48,10 @@
\section1 Widgets
Widgets are the primary elements for creating user interfaces in Qt.
- \l{Widget Classes}{Widgets} can display data and status information,
+ \l{The Widget Classes}{Widgets} can display data and status information,
receive user input, and provide a container for other widgets that
should be grouped together. A widget that is not embedded in a
- parent widget is called a \l{Application Windows and
- Dialogs}{window}.
+ parent widget is called a \l{Window and Dialog Widgets} {window}.
\image parent-child-widgets.png A parent widget containing various child widgets.
@@ -82,11 +81,10 @@
\section1 Widget Styles
- \l{Implementing Styles and Style Aware Widgets}{Styles} draw on
- behalf of widgets and encapsulate the look and feel of a GUI. Qt's
- built-in widgets use the QStyle class to perform nearly all of their
- drawing, ensuring that they look exactly like the equivalent native
- widgets.
+ \l{Styles &amp Style Aware Widgets}{Styles} draw on behalf of
+ widgets and encapsulate the look and feel of a GUI. Qt's built-in
+ widgets use the QStyle class to perform nearly all of their drawing,
+ ensuring that they look exactly like the equivalent native widgets.
\table
\row
diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc
index c1e66d9..db9a636 100644
--- a/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -49,7 +49,6 @@
\title Window and Dialog Widgets
\brief Windows and Dialogs in Qt.
\ingroup qt-gui-concepts
- \ingroup frameworks-technologies
A \l{Widgets Tutorial}{widget} that is not embedded in a parent widget is called a window.
Usually, windows have a frame and a title bar, although it is also possible to create
@@ -81,7 +80,7 @@
\section1 Main Windows and Dialogs
- \l{The Application Main Window} provides the framework for building the
+ The \l{Application Main Window} provides the framework for building the
application's main user interface, and are created by subclassing QMainWindow.
QMainWindow has its own layout to which you can add a \l{QMenuBar}{menu bar},
\l{QToolBar}{tool bars}, \l{QDockWidget}{dockable widgets} and a