summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-05-19 09:33:21 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-05-19 09:33:21 (GMT)
commitebe28bdd77ca615c47ebf6b41e34aee0c154fcf9 (patch)
treea1aa1578f798bae0cc23c32656134628bf5af788 /doc
parent109024630cbf577d6f6bcb10ea3ac6272113b79e (diff)
parent28b894f65c5aba01d5ee80c20f617478faaee7e7 (diff)
downloadQt-ebe28bdd77ca615c47ebf6b41e34aee0c154fcf9.zip
Qt-ebe28bdd77ca615c47ebf6b41e34aee0c154fcf9.tar.gz
Qt-ebe28bdd77ca615c47ebf6b41e34aee0c154fcf9.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Diffstat (limited to 'doc')
-rw-r--r--doc/src/classes.qdoc6
-rw-r--r--doc/src/declarative/advtutorial.qdoc56
-rw-r--r--doc/src/declarative/animation.qdoc12
-rw-r--r--doc/src/declarative/basictypes.qdoc9
-rw-r--r--doc/src/declarative/codingconventions.qdoc7
-rw-r--r--doc/src/declarative/declarativeui.qdoc66
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc199
-rw-r--r--doc/src/declarative/elements.qdoc12
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc20
-rw-r--r--doc/src/declarative/examples.qdoc128
-rw-r--r--doc/src/declarative/extending-examples.qdoc58
-rw-r--r--doc/src/declarative/extending.qdoc46
-rw-r--r--doc/src/declarative/focus.qdoc23
-rw-r--r--doc/src/declarative/globalobject.qdoc172
-rw-r--r--doc/src/declarative/integrating.qdoc50
-rw-r--r--doc/src/declarative/qdeclarativeintro.qdoc5
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc33
-rw-r--r--doc/src/declarative/qmlruntime.qdoc60
-rw-r--r--doc/src/declarative/qtbinding.qdoc26
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h55
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro13
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/main.qml32
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/qmldir1
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h54
-rw-r--r--doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp61
-rw-r--r--doc/src/declarative/tutorial.qdoc29
-rw-r--r--doc/src/development/assistant-manual.qdoc2
-rw-r--r--doc/src/development/developing-on-mac.qdoc5
-rw-r--r--doc/src/development/qmake-manual.qdoc1
-rw-r--r--doc/src/diagrams/modelview-move-rows-1.sk271
-rw-r--r--doc/src/diagrams/modelview-move-rows-2.sk271
-rw-r--r--doc/src/diagrams/modelview-move-rows-3.sk137
-rw-r--r--doc/src/diagrams/modelview-move-rows-4.sk137
-rw-r--r--doc/src/examples/elasticnodes.qdoc124
-rw-r--r--doc/src/examples/fingerpaint.qdoc2
-rw-r--r--doc/src/examples/padnavigator.qdoc552
-rw-r--r--doc/src/examples/pinchzoom.qdoc2
-rw-r--r--doc/src/examples/qml-examples.qdoc184
-rw-r--r--doc/src/files-and-resources/datastreamformat.qdoc3
-rw-r--r--doc/src/files-and-resources/resources.qdoc2
-rw-r--r--doc/src/frameworks-technologies/accessible.qdoc6
-rw-r--r--doc/src/frameworks-technologies/activeqt-container.qdoc7
-rw-r--r--doc/src/frameworks-technologies/activeqt-server.qdoc6
-rw-r--r--doc/src/frameworks-technologies/activeqt.qdoc5
-rw-r--r--doc/src/frameworks-technologies/animation.qdoc1
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc2
-rw-r--r--doc/src/frameworks-technologies/dbus-adaptors.qdoc2
-rw-r--r--doc/src/frameworks-technologies/dbus-intro.qdoc2
-rw-r--r--doc/src/frameworks-technologies/desktop-integration.qdoc6
-rw-r--r--doc/src/frameworks-technologies/dnd.qdoc10
-rw-r--r--doc/src/frameworks-technologies/eventsandfilters.qdoc3
-rw-r--r--doc/src/frameworks-technologies/gestures.qdoc7
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc5
-rw-r--r--doc/src/frameworks-technologies/implicit-sharing.qdoc2
-rw-r--r--doc/src/frameworks-technologies/ipc.qdoc3
-rw-r--r--doc/src/frameworks-technologies/phonon.qdoc6
-rw-r--r--doc/src/frameworks-technologies/threads.qdoc1
-rw-r--r--doc/src/frameworks-technologies/unicode.qdoc2
-rw-r--r--doc/src/getting-started/demos.qdoc7
-rw-r--r--doc/src/getting-started/examples.qdoc74
-rw-r--r--doc/src/getting-started/installation.qdoc18
-rw-r--r--doc/src/getting-started/known-issues.qdoc10
-rw-r--r--doc/src/howtos/HWacceleration.qdoc15
-rw-r--r--doc/src/howtos/accelerators.qdoc1
-rw-r--r--doc/src/howtos/appicon.qdoc1
-rw-r--r--doc/src/howtos/guibooks.qdoc1
-rw-r--r--doc/src/howtos/qtdesigner.qdoc1
-rw-r--r--doc/src/howtos/restoring-geometry.qdoc2
-rw-r--r--doc/src/howtos/session.qdoc2
-rw-r--r--doc/src/howtos/sharedlibrary.qdoc2
-rw-r--r--doc/src/howtos/timers.qdoc2
-rw-r--r--doc/src/images/declarative-image_fillMode.gifbin79561 -> 0 bytes
-rw-r--r--doc/src/images/declarative-integrating-graphicswidgets.pngbin1061 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-preserveaspectcrop.pngbin0 -> 6440 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-preserveaspectfit.pngbin0 -> 4076 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-stretch.pngbin0 -> 5584 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-tile.pngbin0 -> 3940 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-tilehorizontally.pngbin0 -> 5544 bytes
-rw-r--r--doc/src/images/declarative-qtlogo-tilevertically.pngbin0 -> 6288 bytes
-rw-r--r--doc/src/images/declarative-qtlogo.png (renamed from doc/src/images/declarative-qtlogo1.png)bin3436 -> 3436 bytes
-rw-r--r--doc/src/images/declarative-qtlogo2.pngbin11023 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo3.pngbin4783 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo4.pngbin11241 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo5.pngbin3553 -> 0 bytes
-rw-r--r--doc/src/images/declarative-qtlogo6.pngbin4763 -> 0 bytes
-rw-r--r--doc/src/images/multitouch-fingerpaint-example.pngbin0 -> 17026 bytes
-rw-r--r--doc/src/index.qdoc60
-rw-r--r--doc/src/modules.qdoc46
-rw-r--r--doc/src/network-programming/bearermanagement.qdoc9
-rw-r--r--doc/src/network-programming/qtnetwork.qdoc1
-rw-r--r--doc/src/network-programming/ssl.qdoc6
-rw-r--r--doc/src/objectmodel/metaobjects.qdoc3
-rw-r--r--doc/src/objectmodel/object.qdoc3
-rw-r--r--doc/src/objectmodel/objecttrees.qdoc3
-rw-r--r--doc/src/objectmodel/properties.qdoc3
-rw-r--r--doc/src/objectmodel/signalsandslots.qdoc3
-rw-r--r--doc/src/overviews.qdoc87
-rw-r--r--doc/src/painting-and-printing/coordsys.qdoc3
-rw-r--r--doc/src/painting-and-printing/paintsystem.qdoc4
-rw-r--r--doc/src/painting-and-printing/printing.qdoc1
-rw-r--r--doc/src/platforms/platform-notes.qdoc2
-rw-r--r--doc/src/platforms/symbian-introduction.qdoc5
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp20
-rw-r--r--doc/src/snippets/declarative/Sprite.qml3
-rw-r--r--doc/src/snippets/declarative/borderimage.qml (renamed from doc/src/snippets/declarative/border-image.qml)0
-rw-r--r--doc/src/snippets/declarative/componentCreation.js47
-rw-r--r--doc/src/snippets/declarative/createComponent.qml9
-rw-r--r--doc/src/snippets/declarative/createQmlObject.qml18
-rw-r--r--doc/src/snippets/declarative/drag.qml2
-rw-r--r--doc/src/snippets/declarative/dynamicObjects.qml29
-rw-r--r--doc/src/snippets/declarative/flickableScrollbar.qml26
-rw-r--r--doc/src/snippets/declarative/focusscopes.qml27
-rw-r--r--doc/src/snippets/declarative/gridview/gridview.qml2
-rw-r--r--doc/src/snippets/declarative/listview/highlight.qml2
-rw-r--r--doc/src/snippets/declarative/listview/listview.qml2
-rw-r--r--doc/src/snippets/declarative/mouseregion.qml14
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/contextproperties/main.qml (renamed from doc/src/declarative/snippets/qtbinding/contextproperties/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h (renamed from doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro (renamed from doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/custompalette/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/custompalette/main.qml (renamed from doc/src/declarative/snippets/qtbinding/custompalette/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/example.qrc (renamed from doc/src/declarative/snippets/qtbinding/resources/example.qrc)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/images/background.png (renamed from doc/src/declarative/snippets/qtbinding/resources/images/background.png)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/resources/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/main.qml (renamed from doc/src/declarative/snippets/qtbinding/resources/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/resources/resources.pro (renamed from doc/src/declarative/snippets/qtbinding/resources/resources.pro)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/main.qml (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/main.qml)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h)0
-rw-r--r--doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro (renamed from doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro)0
-rw-r--r--doc/src/sql-programming/qsqldatatype-table.qdoc21
-rw-r--r--doc/src/sql-programming/sql-driver.qdoc2
-rw-r--r--doc/src/sql-programming/sql-programming.qdoc6
-rwxr-xr-xdoc/src/template/images/api_examples.pngbin1302 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/api_lookup.pngbin1879 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/api_topics.pngbin1216 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_l.pngbin139 -> 100 bytes
-rwxr-xr-xdoc/src/template/images/bg_l_blank.pngbin123 -> 84 bytes
-rwxr-xr-xdoc/src/template/images/bg_ll.pngbin514 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ll_blank.pngbin320 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_lr.pngbin458 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_r.pngbin136 -> 96 bytes
-rwxr-xr-xdoc/src/template/images/bg_ul.pngbin516 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ul_blank.pngbin304 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ur.pngbin437 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/bg_ur_blank.pngbin437 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/box_bg.pngbin129 -> 89 bytes
-rwxr-xr-xdoc/src/template/images/breadcrumb.pngbin195 -> 134 bytes
-rwxr-xr-xdoc/src/template/images/bullet_gt.pngbin185 -> 124 bytes
-rwxr-xr-xdoc/src/template/images/bullet_sq.pngbin117 -> 74 bytes
-rwxr-xr-xdoc/src/template/images/content_bg.pngbin1498 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/form_bg.pngbin390 -> 0 bytes
-rw-r--r--doc/src/template/images/header.pngbin2600 -> 0 bytes
-rw-r--r--doc/src/template/images/page.pngbin0 -> 3102 bytes
-rwxr-xr-xdoc/src/template/images/page_bg.pngbin126 -> 84 bytes
-rwxr-xr-xdoc/src/template/images/print.pngbin575 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_guide.pngbin12685 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_icon.pngbin4775 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_ref_doc.pngbin2600 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/qt_tools.pngbin17508 -> 0 bytes
-rwxr-xr-xdoc/src/template/images/sep.pngbin120 -> 0 bytes
-rw-r--r--doc/src/template/images/spinner.gifbin0 -> 2037 bytes
-rwxr-xr-xdoc/src/template/images/sprites-combined.pngbin18070 -> 62534 bytes
-rwxr-xr-xdoc/src/template/scripts/functions.js162
-rwxr-xr-xdoc/src/template/style/style.css907
-rw-r--r--doc/src/widgets-and-layouts/layout.qdoc1
-rw-r--r--doc/src/widgets-and-layouts/styles.qdoc13
-rw-r--r--doc/src/widgets-and-layouts/widgets.qdoc201
-rw-r--r--doc/src/windows-and-dialogs/dialogs.qdoc1
-rw-r--r--doc/src/windows-and-dialogs/mainwindow.qdoc15
173 files changed, 3383 insertions, 1524 deletions
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index 1552f56..594c1fe 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -59,7 +59,7 @@
/*!
\page classes.html
- \title All Qt Classes
+ \title All Classes
\ingroup classlists
\brief If you know the name of the class you want, find it here.
@@ -71,7 +71,7 @@
\generatelist classes
- \sa {Qt3 Support Classes}, {All Qt Modules}, {Obsolete Classes}
+ \sa {Qt3 Support Classes}, {All Modules}, {Obsolete Classes}
*/
/*!
@@ -162,7 +162,7 @@
/*!
\page namespaces.html
- \title All Qt Namespaces
+ \title All Namespaces
\ingroup classlists
\brief A Qt namespace contains enum types, functions, and sometimes classes.
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index 2d05850..47504ae 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -105,16 +105,20 @@ is the \l SystemPalette item. This provides access to the Qt system palette
and is used to give the button a more native look-and-feel.
Notice the anchors for the \c Item, \c Button and \c Text elements are set using
-\l {codingconventions.html#Grouped-properties}{group notation} for readability.
+\l {qdeclarativeintroduction.html#dot-properties}{group notation} for readability.
\section2 Adding \c Button and \c Block components
-The \c Button item in the code above is defined in a separate file named \c Button.qml.
+The \c Button item in the code above is defined in a separate component file named \c Button.qml.
To create a functional button, we use the QML elements \l Text and \l MouseArea inside a \l Rectangle.
Here is the \c Button.qml code:
\snippet declarative/tutorials/samegame/samegame1/Button.qml 0
+This essentially defines a rectangle that contains text and can be clicked. The \l MouseArea
+has an \c onClicked() handler that is implemented to emit the \c clicked() signal of the
+\c container when the area is clicked.
+
In Same Game, the screen is filled with small blocks when the game begins.
Each block is just an item that contains an image. The block
code is defined in a separate \c Block.qml file:
@@ -174,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 {createComponent(url file)}{createComponent()} is called to generate an element from \c Block.qml.
+\o \l {Qt.createComponent(url file)}{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.
@@ -226,14 +230,14 @@ until it is won or lost.
To do this, we have added the following functions to \c samegame.js:
\list
-\o function \c{handleClick(x,y)}
-\o function \c{floodFill(xIdx,yIdx,type)}
-\o function \c{shuffleDown()}
-\o function \c{victoryCheck()}
-\o function \c{floodMoveCheck(xIdx, yIdx, type)}
+\o \c{handleClick(x,y)}
+\o \c{floodFill(xIdx,yIdx,type)}
+\o \c{shuffleDown()}
+\o \c{victoryCheck()}
+\o \c{floodMoveCheck(xIdx, yIdx, type)}
\endlist
-As this is a tutorial about QML, not game design, we will only discuss \c handleClick() and \c victoryCheck() below since they interface directly with the QML elements. Note that although the game logic here is written in JavaScript, it could have been written in C++ and then exposed to JavaScript.
+As this is a tutorial about QML, not game design, we will only discuss \c handleClick() and \c victoryCheck() below since they interface directly with the QML elements. Note that although the game logic here is written in JavaScript, it could have been written in C++ and then exposed to QML.
\section3 Enabling mouse click interaction
@@ -269,6 +273,8 @@ And this is how it is used in the main \c samegame.qml file:
\snippet declarative/tutorials/samegame/samegame3/samegame.qml 2
+We give the dialog a \l {Item::z}{z} value of 100 to ensure it is displayed on top of our other components. The default \c z value for an item is 0.
+
\section3 A dash of color
@@ -383,15 +389,41 @@ The theme change here is produced simply by replacing the block images. This can
Another feature we might want to add to the game is a method of storing and retrieving high scores.
-In \c samegame.qml we now pop up a dialog when the game is over and requests the player's name so it can be added to a High Scores table. The dialog is created using \c Dialog.qml:
+To do this, we will show a dialog when the game is over to request the player's name and add it to a High Scores table.
+This requires a few changes to \c Dialog.qml. In addition to a \c Text element, it now has a
+\c TextInput child item for receiving keyboard text input:
+
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 0
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 2
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 3
+
+We'll also add a \c showWithInput() function. The text input will only be visible if this function
+is called instead of \c show(). When the dialog is closed, it emits a \c closed() signal, and
+other elements can retrieve the text entered by the user through an \c inputText property:
+
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 0
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 1
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/Dialog.qml 3
+
+Now the dialog can be used in \c samegame.qml:
\snippet declarative/tutorials/samegame/samegame4/samegame.qml 0
-When the dialog is closed, we call the new \c saveHighScore() function in \c samegame.js, which stores the high score locally in an SQL database and also send the score to an online database if possible.
+When the dialog emits the \c closed signal, we call the new \c saveHighScore() function in \c samegame.js, which stores the high score locally in an SQL database and also send the score to an online database if possible.
+The \c nameInputDialog is activated in the \c victoryCheck() function in \c samegame.js:
+
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 3
+\dots 4
+\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 4
\section3 Storing high scores offline
+Now we need to implement the functionality to actually save the High Scores table.
+
Here is the \c saveHighScore() function in \c samegame.js:
\snippet declarative/tutorials/samegame/samegame4/content/samegame.js 2
@@ -436,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 (QML)}{documentation} to find out all the things you can do with QML!
+demos and examples and the \l {Declarative UI Using QML}{documentation} to find out all the things you can do with QML!
*/
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 88aca1b..6e98949 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -73,9 +73,9 @@ Rectangle {
y: 0
SequentialAnimation on y {
loops: Animation.Infinite
- NumberAnimation { to: 200-img.height; easing.type: "OutBounce"; duration: 2000 }
+ NumberAnimation { to: 200-img.height; easing.type: Easing.OutBounce; duration: 2000 }
PauseAnimation { duration: 1000 }
- NumberAnimation { to: 0; easing.type: "OutQuad"; duration: 1000 }
+ NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 }
}
}
}
@@ -136,7 +136,7 @@ transitions: [
Transition {
NumberAnimation {
properties: "x,y"
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
duration: 200
}
}
@@ -157,7 +157,7 @@ Transition {
SequentialAnimation {
NumberAnimation {
duration: 1000
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
// animate myItem's x and y if they have changed in the state
target: myItem
properties: "x,y"
@@ -199,7 +199,7 @@ Transition {
ParallelAnimation {
NumberAnimation {
duration: 1000
- easing.type: "OutBounce"
+ easing.type: Easing.OutBounce
targets: box1
properties: "x,y"
}
@@ -227,7 +227,7 @@ Rectangle {
id: redRect
color: "red"
width: 100; height: 100
- Behavior on x { NumberAnimation { duration: 300; easing.type: "InOutQuad" } }
+ Behavior on x { NumberAnimation { duration: 300; easing.type: Easing.InOutQuad } }
}
\endqml
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index 6901947..8db1c35 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -43,9 +43,12 @@
\page qdeclarativebasictypes.html
\title QML Basic Types
- QML uses a set of property types, which are primitive within QML.
- These basic types are referenced throughout the documentation of the
- QML elements. Almost all of them are exactly what you would expect.
+ QML has a set of primitive types, as listed below, that are used throughout
+ the \l {QML Elements}.
+
+ The simpler types in this list can also be used for defining a new
+ \c property in a component. See \l{Extending types from QML} for the
+ list of types that can be used for custom properties.
\annotatedlist qmlbasictypes
*/
diff --git a/doc/src/declarative/codingconventions.qdoc b/doc/src/declarative/codingconventions.qdoc
index 7ca206b..4fa7d0c 100644
--- a/doc/src/declarative/codingconventions.qdoc
+++ b/doc/src/declarative/codingconventions.qdoc
@@ -57,7 +57,7 @@ Through our documentation and examples, QML objects are always structured in the
\o id
\o property declarations
\o signal declarations
-\o javascript functions
+\o JavaScript functions
\o object properties
\o child objects
\o states
@@ -72,7 +72,6 @@ For example, a hypothetical \e photo QML object would look like this:
\snippet doc/src/snippets/declarative/codingconventions/photo.qml 0
-\target Grouped properties
\section1 Grouped properties
If using multiple properties from a group of properties,
@@ -102,7 +101,7 @@ we will write this:
\snippet doc/src/snippets/declarative/codingconventions/lists.qml 1
-\section1 Javascript code
+\section1 JavaScript code
If the script is a single expression, we recommend writing it inline:
@@ -116,7 +115,7 @@ If the script is more than a couple of lines long or can be used by different ob
\snippet doc/src/snippets/declarative/codingconventions/javascript.qml 2
-For long scripts, we will put the functions in their own javascript file and import it like this:
+For long scripts, we will put the functions in their own JavaScript file and import it like this:
\snippet doc/src/snippets/declarative/codingconventions/javascript-imports.qml 0
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index d79c4d2..5283ba8 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -40,46 +40,42 @@
****************************************************************************/
/*!
-\title Declarative UI Using QML
+\title Qt Quick
\page declarativeui.html
-\brief The Qt Declarative module provides a declarative framework for building
-highly dynamic, custom user interfaces.
+\brief Qt Quick provides a declarative framework for building highly
+dynamic, custom user interfaces.
-\section1 \l{QML Elements}{Fast QML Elements Reference Page}
+Qt Quick provides a declarative framework for building highly dynamic,
+custom user interfaces from a rich set of \l {QML Elements}{QML elements}.
+Qt Quick helps programmers and designers collaborate to
+build the fluid user interfaces that are becoming common in portable
+consumer devices, such as mobile phones, media players, set-top boxes
+and netbooks.
-\raw HTML
-<br>
-\endraw
+QML is an extension to \l
+{http://www.ecma-international.org/publications/standards/Ecma-262.htm}
+{JavaScript}, that provides a mechanism to declaratively build an
+object tree of \l {QML Elements}{QML elements}. QML improves the
+integration between JavaScript and Qt's existing QObject based type
+system, adds support for automatic \l {Property Binding}{property
+bindings} and provides \l {Network Transparency}{network transparency}
+at the language level.
-\section1 Preamble
+The \l {QML Elements}{QML elements} are a sophisticated set of
+graphical and behavioral building blocks. These different elements
+are combined together in \l {QML Documents}{QML documents} to build
+components ranging in complexity from simple buttons and sliders, to
+complete internet-enabled applications like a \l
+{http://www.flickr.com}{Flickr} photo browser.
-Qt Declarative UI provides a declarative framework for building highly dynamic, custom
-user interfaces. Declarative UI helps programmers and designers collaborate to build
-the animation rich, fluid user interfaces that are becoming common in portable
-consumer devices, such as mobile phones, media players, set-top boxes and netbooks.
+Qt Quick builds on \l {QML for Qt programmers}{Qt's existing
+strengths}. QML can be be used to incrementally extend an existing
+application or to build completely new applications. QML is fully \l
+{Extending QML in C++}{extensible from C++}.
-The Qt Declarative module provides an engine for interpreting the declarative
-QML language, and a rich set of \bold { \l {QML Elements}{QML elements} }
-that can be used from QML.
+\section1 Getting Started
-QML is an extension to \l {http://www.ecma-international.org/publications/standards/Ecma-262.htm}
-{JavaScript}, that provides a mechanism to declaratively build an object tree
-of QML elements. QML improves the integration between JavaScript and Qt's
-existing QObject based type system, adds support for automatic
-\l {Property Binding}{property bindings} and provides \l {Network Transparency}{network transparency} at the language
-level.
-
-The QML elements are a sophisticated set of graphical and behavioral building
-blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components
-ranging in complexity from simple buttons and sliders, to complete
-internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser.
-
-Qt Declarative builds on \l {QML for Qt programmers}{Qt's existing strengths}.
-QML can be be used to incrementally extend an existing application or to build
-completely new applications. QML is fully \l {Extending QML in C++}{extensible from C++}.
-
-\section1 Getting Started:
\list
\o \l {Introduction to the QML language}
\o \l {QML Tutorial}{Tutorial: 'Hello World'}
@@ -88,7 +84,7 @@ completely new applications. QML is fully \l {Extending QML in C++}{extensible
\o \l {QML for Qt programmers}
\endlist
-\section1 Core QML Features:
+\section1 Core QML Features
\list
\o \l {QML Documents}
\o \l {Property Binding}
@@ -106,7 +102,7 @@ completely new applications. QML is fully \l {Extending QML in C++}{extensible
\o \l {qmlruntime.html}{The Qt Declarative Runtime}
\endlist
-\section1 Using QML with C++:
+\section1 Using QML with C++
\list
\o \l {Tutorial: Writing QML extensions with C++}
\o \l {Extending QML in C++}
@@ -114,7 +110,7 @@ completely new applications. QML is fully \l {Extending QML in C++}{extensible
\o \l {Integrating QML with existing Qt UI code}
\endlist
-\section1 Reference:
+\section1 Reference
\list
\o \l {QML Elements}
\o \l {QML Global Object}
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index 4cb5198..2688ee5 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -43,84 +43,68 @@
\page qdeclarativedynamicobjects.html
\title Dynamic Object Management
-QML has some support for dynamically loading and managing QML objects from
-within Javascript blocks. It is preferable to use the existing QML elements for
-dynamic object management wherever possible; these are \l{Loader},
-\l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView}. It is also possible
-to dynamically create and manage objects from C++, and this is preferable for
-hybrid QML/C++ applications - see \l{Using QML in C++ Applications}.
-Dynamically creating and managing objects from
-within Javascript blocks is intended for when none of the existing QML elements
-fit the needs of your application, and you do not desire for your application
-to involve C++ code.
+QML provides a number of ways to dynamically create and manage QML objects.
+The \l{Loader}, \l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView} elements
+all support dynamic object management. Objects can also be created and managed
+from C++, and this is the preferred method for hybrid QML/C++ applications
+(see \l{Using QML in C++ Applications}).
+
+QML also supports the dynamic creation of objects from within JavaScript
+code. This is useful if the existing QML elements do not fit the needs of your
+application, and there are no C++ components involved.
+
\section1 Creating Objects Dynamically
-There are two ways of creating objects dynamically. You can either create
-a component which instantiates items, or create an item from a string of QML.
-Creating a component is better for the situation where you have a predefined
-item which you want to manage dynamic instances of, and creating an item from
-a string of QML is intended for when the QML itself is generated at runtime.
+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()}
+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 {createComponent(url file)}{createComponent()} function on the \l{QML Global Object}.
+the \l {Qt.createComponent(url file)}{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.
-Once you have a component you can use its \c createObject() method to create an instance of
-the component. Example QML script is below. Remember that QML files that might be loaded
- over the network cannot be expected to be ready immediately.
- \code
- var component;
- var sprite;
- function finishCreation() {
- if(component.isReady()) {
- sprite = component.createObject();
- if(sprite == 0) {
- // Error Handling
- } else {
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- } else if(component.isError()) {
- // Error Handling
- }
- }
-
- component = createComponent("Sprite.qml");
- if(component.isReady()) {
- finishCreation();
- } else {
- component.statusChanged.connect(finishCreation);
- }
- \endcode
-
- If you are certain the files will be local, you could simplify to
-
- \code
- component = createComponent("Sprite.qml");
- sprite = component.createObject();
- if(sprite == 0) {
- // Error Handling
- console.log(component.errorsString());
- } else {
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- \endcode
-
-After creating the item, remember to set its parent to an item within the scene.
-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 \c createComponent() is executed.
-
-If the QML does not exist until runtime, you can create a QML item from
-a string of QML using the \l{createQmlObject(string qml, object parent, string filepath)}{createQmlObject()} function, as in the following example:
-
- \code
- newObject = createQmlObject('import Qt 4.7; Rectangle { color: "red"; width: 20; height: 20 }',
- targetItem, "dynamicSnippet1");
- \endcode
+Once you have a component you can use its \l {Component::createObject()}{createObject()} method to create an instance of
+the component. This function takes exactly one argument, which is the parent for the new item. Since graphical items will
+not appear on the scene without a parent, it is recommended that you set the parent this way. However, if you wish to set
+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
+
+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
+
+Here is \c componentCreation.js. 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
+
+Notice that once a \c Sprite object is created, its parent is set to \c appWindow (defined
+in \c main.qml). After creating an item, you must set its parent to an item within the scene.
+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.
+
+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:
+
+\snippet doc/src/snippets/declarative/createQmlObject.qml 0
+
The first argument is the string of QML to create. Just like in a new file, you will need to
import any types you wish to use. For importing files with relative paths, the path should
be relative to the file where the item in the second argument is defined. Remember to set the parent after
@@ -130,47 +114,44 @@ item, which is used for error reporting.
\section1 Maintaining Dynamically Created Objects
-Dynamically created objects may be used the same as other objects, however they
-will not have an id in QML.
+When managing dynamically created items, you must ensure the creation context
+outlives the created item. Otherwise, if the creation context is destroyed first,
+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
+ is the QDeclarativeContext in which this method is called
+\o If \l{Qt.createQmlObject(string qml, object parent, string filepath)}{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
+\endlist
+
+Also, note that while dynamically created objects may be used the same as other objects, they
+do not have an id in QML.
-A restriction which you need to manage with dynamically created items,
-is that the creation context must outlive the
-created item. The creation context is the QDeclarativeContext in which \c createComponent()
-was called, or the context in which the Component element, or the item used as the
-second argument to \c createQmlObject(), was specified. If the creation
-context is destroyed before the dynamic item is, then bindings in the dynamic item will
-fail to work.
\section1 Deleting Objects Dynamically
-You should generally avoid dynamically deleting objects that you did not
-dynamically create. In many UIs, it is sufficient to set the opacity to 0 or
-to move the item off of the edge of the screen. If you have lots of dynamically
-created items however, deleting them when they are no longer used will provide
-a worthwhile performance benefit. Note that you should never manually delete
-items which were dynamically created by QML Elements such as \l{Loader}.
-
-To manually delete a QML item, call its destroy method. This method has one
-argument, which is an approximate delay in ms and which defaults to zero. This
-allows you to wait until the completion of an animation or transition. An example:
-
-\code
- Component {
- id: fadesOut
- Rectangle{
- id: rect
- width: 40; height: 40;
- NumberAnimation on opacity { from:1; to:0; duration: 1000 }
- Component.onCompleted: rect.destroy(1000);
- }
- }
- function createFadesOut(parentItem)
- {
- var object = fadesOut.createObject();
- object.parent = parentItem;
- }
-\endcode
-In the above example, the dynamically created rectangle calls destroy as soon as it's created,
- but delays long enough for its fade out animation to play.
+In many user interfaces, it is sufficient to set an item's opacity to 0 or
+to move the item off the screen instead of deleting the item. If you have
+lots of dynamically created items, however, you may receive a worthwhile
+performance benefit if unused items are deleted.
+
+Note that you should never manually delete items that were dynamically created
+by QML elements (such as \l Loader). Also, you should generally avoid deleting
+items that you did not dynamically create yourself.
+
+Items can be deleted using the \c destroy() method. This method has an optional
+argument (which defaults to 0) that specifies the approximate delay in milliseconds
+before the object is to be destroyed. This allows you to wait until the completion of
+an animation or transition. An example:
+
+\snippet doc/src/snippets/declarative/dynamicObjects.qml 0
+
+Here, \c Rectangle objects are destroyed one second after they are created, which is long
+enough for the \c NumberAnimation to be played before the object is destroyed.
*/
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index 79fe909..574a187 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -120,11 +120,22 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt
\list
\o \l Item
\o \l Rectangle
+ \list
+ \o \l Gradient
+ \list
+ \o \l GradientStop
+ \endlist
+ \endlist
\o \l Image
\o \l BorderImage
\o \l AnimatedImage
\o \l Text
\o \l TextInput
+ \list
+ \o \l IntValidator
+ \o \l DoubleValidator
+ \o \l RegExpValidator
+ \endlist
\o \l TextEdit
\endlist
@@ -142,6 +153,7 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt
\o \l Loader
\o \l Repeater
\o \l SystemPalette
+\o \l FontLoader
\o \l LayoutItem
\endlist
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index c14208e..27b7f38 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -45,7 +45,7 @@
This example shows how to create a reusable switch component in QML.
-The code for this example can be found in the \c $QTDIR/examples/declarative/slideswitch directory.
+The code for this example can be found in the \c $QTDIR/examples/declarative/ui-components/slideswitch directory.
\section1 Overview
@@ -61,12 +61,12 @@ The elements that composed the switch are:
\endlist
\section1 Switch.qml
-\snippet examples/declarative/slideswitch/content/Switch.qml 0
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 0
\section1 Walkthrough
\section2 Interface
-\snippet examples/declarative/slideswitch/content/Switch.qml 1
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 1
This property is the interface of the switch. By default, the switch is off and this property is \c false.
It can be used to activate/disactivate the switch or to query its current state.
@@ -81,14 +81,14 @@ Text { text: "The switch is on"; visible: mySwitch.on == true }
the text will only be visible when the switch is on.
\section2 Images and user interaction
-\snippet examples/declarative/slideswitch/content/Switch.qml 4
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 4
First, we create the background image of the switch.
In order for the switch to toggle when the user clicks on the background, we add a \l{MouseArea} as a child item of the image.
A \c MouseArea has a \c onClicked property that is triggered when the item is clicked. For the moment we will just call a
\c toggle() function. We will see what this function does in a moment.
-\snippet examples/declarative/slideswitch/content/Switch.qml 5
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 5
Then, we place the image of the knob on top of the background.
The interaction here is a little more complex. We want the knob to move with the finger when it is clicked. That is what the \c drag
@@ -96,7 +96,7 @@ property of the \c MouseArea is for. We also want to toggle the switch if the kn
in the \c dorelease() function that is called in the \c onReleased property.
\section2 States
-\snippet examples/declarative/slideswitch/content/Switch.qml 6
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 6
We define the two states of the switch:
\list
@@ -110,13 +110,13 @@ For more information on states see \l{qmlstates}{QML States}.
We add two JavaScript functions to our switch:
-\snippet examples/declarative/slideswitch/content/Switch.qml 2
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 2
This first function is called when the background image or the knob are clicked. We simply want the switch to toggle between the two
states (\e on and \e off).
-\snippet examples/declarative/slideswitch/content/Switch.qml 3
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 3
This second function is called when the knob is released and we want to make sure that the knob does not end up between states
(neither \e on nor \e off). If it is the case call the \c toggle() function otherwise we do nothing.
@@ -124,7 +124,7 @@ This second function is called when the knob is released and we want to make sur
For more information on scripts see \l{Integrating JavaScript}.
\section2 Transition
-\snippet examples/declarative/slideswitch/content/Switch.qml 7
+\snippet examples/declarative/ui-components/slideswitch/content/Switch.qml 7
At this point, when the switch toggles between the two states the knob will instantly change its \c x position between 1 and 78.
In order for the the knob to move smoothly we add a transition that will animate the \c x property with an easing curve for a duration of 200ms.
@@ -133,5 +133,5 @@ For more information on transitions see \l{state-transitions}{QML Transitions}.
\section1 Usage
The switch can be used in a QML file, like this:
-\snippet examples/declarative/slideswitch/slideswitch.qml 0
+\snippet examples/declarative/ui-components/slideswitch/slideswitch.qml 0
*/
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index e01459f..cdc308a 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -40,8 +40,9 @@
****************************************************************************/
/*!
-\page qdeclarativeexamples.html
-\title QML Examples and Demos
+ \page qdeclarativeexamples.html
+ \title QML Examples and Demos
+ \ingroup all-examples
\previouspage Graphics View Examples
\contentspage Qt Examples
@@ -70,50 +71,92 @@ For example, from your build directory, run:
\section1 Examples
+\section2 Animation
\list
-\o \l{declarative/animations}{Animations}
-\o \l{declarative/aspectratio}{Aspect Ratio}
-\o \l{declarative/behaviors}{Behaviors}
-\o \l{declarative/border-image}{Border Image}
-\o \l{declarative/clocks}{Clocks}
-\o \l{declarative/connections}{Connections}
-\o \l{declarative/dial}{Dial}
-\o \l{declarative/dynamic}{Dynamic}
-\o \l{declarative/extending}{Extending}
-\o \l{declarative/fillmode}{Fillmode}
-\o \l{declarative/flipable}{Flipable}
-\o \l{declarative/focus}{Focus}
-\o \l{declarative/fonts}{Fonts}
-\o \l{declarative/gridview}{GridView}
-\o \l{declarative/imageprovider}{Image Provider}
-\o \l{declarative/images}{Images}
-\o \l{declarative/layouts}{Layouts}
-\o \l{declarative/listmodel-threaded}{ListModel Threaded}
-\o \l{declarative/listview}{ListView}
-\o \l{declarative/mousearea}{Mouse Area}
-\o \l{declarative/objectlistmodel}{Object ListModel}
-\o \l{declarative/package}{Package}
-\o \l{declarative/parallax}{Parallax}
-\o \l{declarative/plugins}{Plugins}
-\o \l{declarative/progressbar}{Progress Bars}
-\o \l{declarative/proxywidgets}{Proxy Widgets}
-\o \l{declarative/scrollbar}{Scrollbar}
-\o \l{declarative/searchbox}{Search Box}
-\o \l{declarative/slideswitch}{Slide Switch}
-\o \l{declarative/sql}{SQL}
-\o \l{declarative/states}{States}
-\o \l{declarative/stringlistmodel}{String ListModel}
-\o \l{declarative/tabwidget}{Tab Widget}
-\o \l{declarative/tic-tac-toe}{Tic-Tac-Toe}
-\o \l{declarative/tvtennis}{TV Tennis}
-\o \l{declarative/velocity}{Velocity}
-\o \l{declarative/webview}{WebView}
-\o \l{declarative/workerscript}{WorkerScript}
-\o \l{declarative/xmldata}{XML Data}
-\o \l{declarative/xmlhttprequest}{XMLHttpRequest}
+\o \l{declarative/animation/basics}{Basics}
+\o \l{declarative/animation/behaviors}{Behaviors}
+\o \l{declarative/animation/easing}{Easing}
+\o \l{declarative/animation/states}{States}
+\endlist
+
+\section2 Image Elements
+\list
+\o \l{declarative/imageelements/borderimage}{BorderImage}
+\o \l{declarative/imageelements/image}{Image}
+\endlist
+
+\section2 \l{declarative/positioners}{Positioners}
+
+\section2 Key Interaction
+\list
+\o \l{declarative/keyinteraction/focus}{Focus}
+\endlist
+\section2 Touch Interaction
+\list
+\o \l{declarative/touchinteraction/gestures}{Gestures}
+\o \l{declarative/touchinteraction/mousearea}{MouseArea}
+\endlist
+
+\section2 UI Components
+\list
+\o \l{declarative/ui-components/flipable}{Flipable}
+\o \l{declarative/ui-components/progressbar}{Progress bar}
+\o \l{declarative/ui-components/scrollbar}{Scroll bar}
+\o \l{declarative/ui-components/searchbox}{Search box}
+\o \l{declarative/ui-components/slideswitch}{Slide switch}
+\o \l{declarative/ui-components/spinner}{Spinner}
+\o \l{declarative/ui-components/tabwidget}{Tab widget}
\endlist
+\section2 Models and Views
+\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/package}{Package}
+\o \l{declarative/modelviews/parallax}{Parallax}
+\o \l{declarative/modelviews/stringlistmodel}{String list model}
+\o \l{declarative/modelviews/webview}{WebView}
+\endlist
+
+\section2 XML
+\list
+\o \l{declarative/xml/xmldata}{XML data}
+\o \l{declarative/xml/xmlhttprequest}{XmlHttpRequest}
+\endlist
+
+\section2 \l{declarative/i18n}{Internationalization (i18n)}
+
+\section2 Threading
+\list
+\o \l{declarative/threading/threadedlistmodel}{Threaded ListModel}
+\o \l{declarative/threading/workerscript}{WorkerScript}
+\endlist
+
+\section2 \l{declarative/sqllocalstorage}{SQL Local Storage}
+
+\section2 C++ Extensions
+\list
+\o \l{declarative/cppextensions/referenceexamples}{Reference examples} (discussed in \l {Extending QML in C++})
+\o \l{declarative/cppextensions/plugins}{Plugins}
+\o \l{declarative/cppextensions/proxywidgets}{QtWidgets}
+\o \l{declarative/cppextensions/qgraphicslayouts}{QGraphicsLayouts}
+\o \l{declarative/cppextensions/imageprovider}{Image provider}
+\o \l{declarative/cppextensions/proxyviewer}{Network access manager factory}
+\endlist
+
+\section2 Toys
+\list
+\o \l{declarative/toys/clocks}{Clocks}
+\o \l{declarative/toys/dial}{Dial}
+\o \l{declarative/toys/dynamic}{Dynamic}
+\o \l{declarative/toys/tic-tac-toe}{Tic Tac Toe}
+\o \l{declarative/toys/tvtennis}{TV Tennis}
+\o \l{declarative/toys/velocity}{Velocity}
+\endlist
+
+
\section1 Demos
\list
@@ -126,3 +169,4 @@ For example, from your build directory, run:
\endlist
*/
+
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
index 307162e..577ab78 100644
--- a/doc/src/declarative/extending-examples.qdoc
+++ b/doc/src/declarative/extending-examples.qdoc
@@ -40,13 +40,13 @@
****************************************************************************/
/*!
-\example declarative/extending/adding
+\example declarative/cppextensions/referenceexamples/adding
\title Extending QML - Adding Types Example
The Adding Types Example shows how to add a new element type, \c Person, to QML.
The \c Person type can be used from QML like this:
-\snippet examples/declarative/extending/adding/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/adding/example.qml 0
\section1 Declare the Person class
@@ -55,17 +55,17 @@ with the two properties we want accessible on the QML type - name and shoeSize.
Although in this example we use the same name for the C++ class as the QML
element, the C++ class can be named differently, or appear in a namespace.
-\snippet examples/declarative/extending/adding/person.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/adding/person.h 0
\section1 Define the Person class
-\snippet examples/declarative/extending/adding/person.cpp 0
+\snippet examples/declarative/cppextensions/referenceexamples/adding/person.cpp 0
The Person class implementation is quite basic. The property accessors simply
return members of the object instance.
-The implementation must also be registered using the QML_REGISTER_TYPE() macro. This macro
-registers the Person class with QML as a type in the People library version 1.0,
+The \c main.cpp file also calls the \c qmlRegisterType() function to
+register the \c Person type with QML as a type in the People library version 1.0,
and defines the mapping between the C++ and QML class names.
\section1 Running the example
@@ -75,7 +75,7 @@ loads and runs the QML snippet shown at the beginning of this page.
*/
/*!
-\example declarative/extending/properties
+\example declarative/cppextensions/referenceexamples/properties
\title Extending QML - Object and List Property Types Example
This example builds on:
@@ -88,16 +88,16 @@ properties in QML. This example adds a BirthdayParty element that specifies
a birthday party, consisting of a celebrant and a list of guests. People are
specified using the People QML type built in the previous example.
-\snippet examples/declarative/extending/properties/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/properties/example.qml 0
\section1 Declare the BirthdayParty
The BirthdayParty class is declared like this:
-\snippet examples/declarative/extending/properties/birthdayparty.h 0
-\snippet examples/declarative/extending/properties/birthdayparty.h 1
-\snippet examples/declarative/extending/properties/birthdayparty.h 2
-\snippet examples/declarative/extending/properties/birthdayparty.h 3
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 2
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 3
The class contains a member to store the celebrant object, and also a
QList<Person *> member.
@@ -114,7 +114,7 @@ scenarios.
The implementation of BirthdayParty property accessors is straight forward.
-\snippet examples/declarative/extending/properties/birthdayparty.cpp 0
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp 0
\section1 Running the example
@@ -123,7 +123,7 @@ loads and runs the QML snippet shown at the beginning of this page.
*/
/*!
-\example declarative/extending/coercion
+\example declarative/cppextensions/referenceexamples/coercion
\title Extending QML - Inheritance and Coercion Example
This example builds on:
@@ -136,11 +136,11 @@ The Inheritance and Coercion Example shows how to use base classes to assign
elements of more than one type to a property. It specializes the Person element
developed in the previous examples into two elements - a \c Boy and a \c Girl.
-\snippet examples/declarative/extending/coercion/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/example.qml 0
\section1 Declare Boy and Girl
-\snippet examples/declarative/extending/coercion/person.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/person.h 0
The Person class remains unaltered in this example and the Boy and Girl C++
classes are trivial extensions of it. As an example, the inheritance used here
@@ -155,19 +155,17 @@ previous example. However, as we have repurposed the People class as a common
base for Boy and Girl, we want to prevent it from being instantiated from QML
directly - an explicit Boy or Girl should be instantiated instead.
-\snippet examples/declarative/extending/coercion/main.cpp 0
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/main.cpp 0
While we want to disallow instantiating Person from within QML, it still needs
to be registered with the QML engine, so that it can be used as a property type
-and other types can be coerced to it. To register a type, without defining a
-named mapping into QML, we call the QML_REGISTER_NOCREATE_TYPE() macro instead of
-the QML_REGISTER_TYPE() macro used previously.
+and other types can be coerced to it.
\section2 Define Boy and Girl
The implementation of Boy and Girl are trivial.
-\snippet examples/declarative/extending/coercion/person.cpp 1
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/person.cpp 1
All that is necessary is to implement the constructor, and to register the types
and their QML name with the QML engine.
@@ -177,7 +175,7 @@ and their QML name with the QML engine.
The BirthdayParty element has not changed since the previous example. The
celebrant and guests property still use the People type.
-\snippet examples/declarative/extending/coercion/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h 0
However, as all three types, Person, Boy and Girl, have been registered with the
QML system, on assignment QML automatically (and type-safely) converts the Boy
@@ -188,7 +186,7 @@ loads and runs the QML snippet shown at the beginning of this page.
*/
/*!
-\example declarative/extending/default
+\example declarative/cppextensions/referenceexamples/default
\title Extending QML - Default Property Example
This example builds on:
@@ -202,14 +200,14 @@ The Default Property Example is a minor modification of the
\l {Extending QML - Inheritance and Coercion Example} that simplifies the
specification of a BirthdayParty through the use of a default property.
-\snippet examples/declarative/extending/default/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/default/example.qml 0
\section1 Declaring the BirthdayParty class
The only difference between this example and the last, is the addition of the
\c DefaultProperty class info annotation.
-\snippet examples/declarative/extending/default/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h 0
The default property specifies the property to assign to whenever an explicit
property is not specified, in the case of the BirthdayParty element the guest
@@ -224,7 +222,7 @@ loads and runs the QML snippet shown at the beginning of this page.
*/
/*!
-\example declarative/extending/grouped
+\example declarative/cppextensions/referenceexamples/grouped
\title Extending QML - Grouped Properties Example
This example builds on:
@@ -238,7 +236,7 @@ This example builds on:
*/
/*!
-\example declarative/extending/grouped
+\example declarative/cppextensions/referenceexamples/grouped
\title Extending QML - Attached Properties Example
This example builds on:
@@ -253,7 +251,7 @@ This example builds on:
*/
/*!
-\example declarative/extending/signal
+\example declarative/cppextensions/referenceexamples/signal
\title Extending QML - Signal Support Example
This example builds on:
@@ -269,7 +267,7 @@ This example builds on:
*/
/*!
-\example declarative/extending/valuesource
+\example declarative/cppextensions/referenceexamples/valuesource
\title Extending QML - Property Value Source Example
This example builds on:
@@ -286,7 +284,7 @@ This example builds on:
*/
/*!
-\example declarative/extending/binding
+\example declarative/cppextensions/referenceexamples/binding
\title Extending QML - Binding Example
This example builds on:
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 1c159e4..5b695f7 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -56,7 +56,7 @@ QML for their own independent use.
\section1 Adding Types
\target adding-types
-\snippet examples/declarative/extending/adding/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/adding/example.qml 0
The QML snippet shown above instantiates one \c Person instance and sets
the \c name and \c shoeSize properties on it. Everything in QML ultimately comes down
@@ -121,7 +121,7 @@ the \c Person type.
\section1 Object and List Property Types
-\snippet examples/declarative/extending/properties/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/properties/example.qml 0
The QML snippet shown above assigns a \c Person object to the \c BirthdayParty's
\c host property, and assigns three \c Person objects to the guests property.
@@ -136,7 +136,7 @@ Properties that are pointers to objects or Qt interfaces are declared with the
Q_PROPERTY() macro, just like other properties. The \c host property
declaration looks like this:
-\snippet examples/declarative/extending/properties/birthdayparty.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 1
As long as the property type, in this case \c Person, is registered with QML the
property can be assigned.
@@ -165,14 +165,14 @@ As with object properties, the type \a T must be registered with QML.
The \c guest property declaration looks like this:
-\snippet examples/declarative/extending/properties/birthdayparty.h 2
+\snippet examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h 2
\l {Extending QML - Object and List Property Types Example} shows the complete
code used to create the \c BirthdayParty type.
\section1 Inheritance and Coercion
-\snippet examples/declarative/extending/coercion/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/coercion/example.qml 0
The QML snippet shown above assigns a \c Boy object to the \c BirthdayParty's
\c host property, and assigns three other objects to the \c guests property.
@@ -214,7 +214,7 @@ code used to create the \c Boy and \c Girl types.
\section1 Default Property
-\snippet examples/declarative/extending/default/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/default/example.qml 0
The QML snippet shown above assigns a collection of objects to the
\c BirthdayParty's default property.
@@ -246,7 +246,7 @@ specify a default property.
\section1 Grouped Properties
-\snippet examples/declarative/extending/grouped/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/grouped/example.qml 1
The QML snippet shown above assigns a number of properties to the \c Boy object,
including four properties using the grouped property syntax.
@@ -259,7 +259,7 @@ different types through implementation reuse.
A grouped property block is implemented as a read-only object property. The
\c shoe property shown is declared like this:
-\snippet examples/declarative/extending/grouped/person.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/grouped/person.h 1
The \c ShoeDescription type declares the properties available to the grouped
property block - in this case the \c size, \c color, \c brand and \c price properties.
@@ -271,7 +271,7 @@ implement the \c shoe property grouping.
\section1 Attached Properties
-\snippet examples/declarative/extending/attached/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/attached/example.qml 1
The QML snippet shown above assigns a date to the \c rsvp property using the attached
property syntax.
@@ -393,8 +393,8 @@ this situation, but it must not crash.
\section1 Signal Support
-\snippet examples/declarative/extending/signal/example.qml 0
-\snippet examples/declarative/extending/signal/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/signal/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/signal/example.qml 1
The QML snippet shown above associates the evaluation of a JavaScript expression
with the emission of a Qt signal.
@@ -406,7 +406,7 @@ signal name: "on" is prepended, and the first letter of the signal name upper
cased. For example, the signal used in the example above has the following
C++ signature:
-\snippet examples/declarative/extending/signal/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h 0
In classes with multiple signals with the same name, only the final signal
is accessible as a signal property. Note that signals with the same name
@@ -424,8 +424,8 @@ implement the onPartyStarted signal property.
\section1 Property Value Sources
-\snippet examples/declarative/extending/valuesource/example.qml 0
-\snippet examples/declarative/extending/valuesource/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 1
The QML snippet shown above applies a property value source to the \c announcment property.
A property value source generates a value for a property that changes over time.
@@ -440,7 +440,7 @@ The example shown here is rather contrived: the \c announcment property of the
the \c HappyBirthdaySong value source generates the lyrics of the song
"Happy Birthday".
-\snippet examples/declarative/extending/valuesource/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h 0
Normally, assigning an object to a string property would not be allowed. In
the case of a property value source, rather than assigning the object instance
@@ -453,9 +453,9 @@ QDeclarativePropertyValueSource::setTarget(), that the QML engine invokes when
associating the property value source with a property. The relevant part of
the \c HappyBirthdaySong type declaration looks like this:
-\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 0
-\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 1
-\snippet examples/declarative/extending/valuesource/happybirthdaysong.h 2
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 1
+\snippet examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h 2
In all other respects, property value sources are regular QML types. They must
be registered with the QML engine using the same macros as other types, and can
@@ -471,8 +471,8 @@ implement the \c HappyBirthdaySong property value source.
\section1 Property Binding
-\snippet examples/declarative/extending/binding/example.qml 0
-\snippet examples/declarative/extending/binding/example.qml 1
+\snippet examples/declarative/cppextensions/referenceexamples/binding/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/binding/example.qml 1
The QML snippet shown above uses a property binding to ensure the
\c HappyBirthdaySong's \c name property remains up to date with the \c host.
@@ -492,7 +492,7 @@ the property's value. QML relies on the presence of a
Here is the \c host property declaration:
-\snippet examples/declarative/extending/binding/birthdayparty.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h 0
The NOTIFY attribute is followed by a signal name. It is the responsibility of
the class implementer to ensure that whenever the property's value changes, the
@@ -531,7 +531,7 @@ subsequently change. The most common case of this is when a type uses
only freed when the object is deleted. In these cases, the CONSTANT attribute
may be added to the property declaration instead of a NOTIFY signal.
-\snippet examples/declarative/extending/binding/person.h 0
+\snippet examples/declarative/cppextensions/referenceexamples/binding/person.h 0
Extreme care must be taken here or applications using your type may misbehave.
The CONSTANT attribute should only be used for properties whose value is set,
@@ -543,7 +543,7 @@ include NOTIFY signals for use in binding.
\section1 Extension Objects
-\snippet examples/declarative/extending/extended/example.qml 0
+\snippet examples/declarative/cppextensions/referenceexamples/extended/example.qml 0
The QML snippet shown above adds a new property to an existing C++ type without
modifying its source code.
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index e5c1d32..e2b8bb6 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -291,28 +291,7 @@ print the name of the current list item.
\table
\row
-\o \code
-Rectangle {
- color: "lightsteelblue"; width: 240; height: 320
-
- ListView {
- id: myView; anchors.fill: parent; focus: true
- model: ListModel {
- ListElement { name: "Bob" }
- ListElement { name: "John" }
- ListElement { name: "Michael" }
- }
- delegate: FocusScope {
- width: contents.width; height: contents.height
- Text {
- focus: true
- text: name
- Keys.onReturnPressed: console.log(name)
- }
- }
- }
-}
-\endcode
+\o \snippet doc/src/snippets/declarative/focusscopes.qml 0
\o \image declarative-qmlfocus4.png
\endtable
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
index 57eaae7..2a83e30 100644
--- a/doc/src/declarative/globalobject.qdoc
+++ b/doc/src/declarative/globalobject.qdoc
@@ -166,10 +166,33 @@ If no format is specified the locale's short format is used. Alternatively, you
\section2 Functions
The Qt object also contains the following miscellaneous functions which expose Qt functionality for use in QML.
-\section3 Qt.lighter(color baseColor)
-This function returns a color 50% lighter than \c baseColor. See QColor::lighter() for further details.
-\section3 Qt.darker(color baseColor)
-This function returns a color 50% darker than \c baseColor. See QColor::darker() for further details.
+\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.
@@ -203,6 +226,9 @@ This function causes the QML engine to emit the quit signal, which in
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.
@@ -211,87 +237,61 @@ 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 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.
-
- Example QML script is below. Remember that QML files that might be loaded
- over the network cannot be expected to be ready immediately.
- \code
- var component;
- var sprite;
- function finishCreation(){
- if(component.isReady()){
- sprite = component.createObject();
- if(sprite == null){
- // Error Handling
- }else{
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- }else if(component.isError()){
- // Error Handling
- }
- }
-
- component = createComponent("Sprite.qml");
- if(component.isReady()){
- finishCreation();
- }else{
- component.statusChanged.connect(finishCreation);
- }
- \endcode
-
- If you are certain the files will be local, you could simplify to
-
- \code
- component = createComponent("Sprite.qml");
- sprite = component.createObject();
- if(sprite == null){
- // Error Handling
- console.log(component.errorsString());
- }else{
- sprite.parent = page;
- sprite.x = 200;
- //...
- }
- \endcode
-
- 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.
- Component.createObject() returns the created object or null if there is an error.
- If there is an error, Component.errorsString() describes what the error was.
-
- If you want to just create an arbitrary string of QML, instead of
- loading a QML file, consider the createQmlObject() function.
-
-\section2 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 targetItem is the id of an existing QML item):
- \code
- newObject = createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}',
- targetItem, "dynamicSnippet1");
- \endcode
-
- 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, 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: lineNumber, columnNumber, fileName and 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 createComponent() function
- instead. 'New components' refers to external QML files that have not yet
- been loaded, and so it is safe to use createQmlObject to load built-in
- components.
+
+\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::errorsString()}{Component.errorsString()} 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
@@ -382,7 +382,7 @@ of QDeclarativeEngine::offlineStoragePath(), currently as SQLite databases.
The API can be used from JavaScript functions in your QML:
-\quotefile declarative/sql/hello.qml
+\quotefile declarative/sqllocalstorage/hello.qml
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 0051f09..83380a1 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -110,51 +110,11 @@ of QML UIs:
\section2 Loading QGraphicsWidget objects in QML
An alternative approach is to expose your existing QGraphicsWidget objects to
-QML and construct your scene in QML instead. To do this, you need to register
-any custom C++ types and create a plugin that registers the custom types
-so that they can be used from your QML file.
+QML and construct your scene in QML instead. See the \l {declarative/cppextensions/qgraphicslayouts}{graphics layouts example}
+which shows how to expose Qt's graphics layout classes to QML in order
+to use QGraphicsWidget with classes like QGraphicsLinearLayout and QGraphicsGridLayout.
-Here is an example. Suppose you have two classes, \c RedSquare and \c BlueCircle,
-that both inherit from QGraphicsWidget:
-
-\c [graphicswidgets/redsquare.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h 0
-
-\c [graphicswidgets/bluecircle.h]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h 0
-
-Then, create a plugin by subclassing QDeclarativeExtensionPlugin, and register the
-types by calling qmlRegisterType(). Also export the plugin with Q_EXPORT_PLUGIN2.
-
-\c [graphicswidgets/shapesplugin.cpp]
-\snippet doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp 0
-
-Now write a project file that creates the plugin:
-
-\c [graphicswidgets/graphicswidgets.pro]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
-
-And add a \c qmldir file that includes the \c graphicswidgets plugin from the \c lib
-subdirectory (as defined in the project file):
-
-\c [graphicswidgets/qmldir]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
-
-Now, we can write a QML file that uses the \c RedSquare and \c BlueCircle widgets.
-(As an example, we can also create \c QGraphicsWidget items if we import the \c Qt.widgets
-module.)
-
-\c [main.qml]
-\quotefile doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
-
-Here is a screenshot of the result:
-
-\image declarative-integrating-graphicswidgets.png
-
-
-Note this approach of creating your graphics objects from QML does not work
-with QGraphicsItems that are not QGraphicsObject-based, since they are not QObjects.
-
-See \l{Extending QML in C++} for further information on using C++ types.
+To expose your existing QGraphicsWidget classes to QML, use \l {qmlRegisterType()}.
+See \l{Extending QML in C++} for further information on using C++ types in QML.
*/
diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
index a98c9e1..acf4ec9 100644
--- a/doc/src/declarative/qdeclarativeintro.qdoc
+++ b/doc/src/declarative/qdeclarativeintro.qdoc
@@ -60,10 +60,13 @@ technologies like HTML and CSS, but it's not required.
QML looks like this:
\code
+import Qt 4.7
+
Rectangle {
width: 200
height: 200
- color: "white"
+ color: "blue"
+
Image {
source: "pics/logo.png"
anchors.centerIn: parent
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 91acb3c..788d417 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -143,6 +143,28 @@ ListView {
}
\endcode
+It is also possible to manipulate the ListModel directly via JavaScript.
+In this case, the first item inserted will determine the roles available
+to any views using the model. For example, if an empty ListModel is
+created and populated via JavaScript the roles provided by the first
+insertion are the only roles that will be shown in the view:
+
+\code
+Item {
+ ListModel {
+ id: fruitModel
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: fruitModel.append({"cost": 5.95, "name":"Pizza"})
+ }
+}
+\endcode
+
+When the MouseArea is clicked fruitModel will have two roles, "cost" and "name".
+Even if subsequent roles are added, only the first two will be handled by views
+using the model.
+
\section2 XmlListModel
@@ -283,7 +305,9 @@ QDeclarativeContext *ctxt = view.rootContext();
ctxt->setContextProperty("myModel", QVariant::fromValue(dataList));
\endcode
-The properties of the object may then be accessed in the delegate:
+The QObject* is available as the \c modelData property. As a convenience,
+the properties of the object are also made available directly in the
+delegate's context:
\code
ListView {
@@ -295,13 +319,18 @@ ListView {
Rectangle {
height: 25
width: 100
- color: model.color
+ color: model.modelData.color
Text { text: name }
}
}
}
\endcode
+Note the use of the fully qualified access to the \c color property.
+The properties of the object are not replicated in the \c model
+object, since they are easily available via the modelData
+object.
+
Note: There is no way for the view to know that the contents of a QList
have changed. If the QList is changed, it will be necessary to reset
the model by calling QDeclarativeContext::setContextProperty() again.
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index a724c7d..b105df4 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -46,15 +46,14 @@
\ingroup qttools
This page documents the \e{Declarative UI Runtime} for the Qt GUI
- toolkit, and the \c qml executable which can be used to run apps
- written for the runtime. The \c qml executable reads a declarative user interface definition
- (\c .qml) file and displays the user interface it describes.
+ toolkit, and the \QQL which can be used to run apps
+ written for the runtime. The \QQL reads a declarative
+ user interface definition (\c .qml) file and displays the user interface it describes.
- QML is a runtime, as you can run plain qml files which pull in their required modules.
+ QML is a runtime, as you can run plain QML files which pull in their required modules.
To run apps with the QML runtime, you can either start the runtime
- from your own application (using a QDeclarativeView) or with the simple \c qml application.
- The \c qml application can be
- installed in a production environment, assuming that it is not already
+ from your own application (using a QDeclarativeView) or with the simple \QQL.
+ The launcher can be installed in a production environment, assuming that it is not already
present in the system. It is generally packaged alongside Qt.
To deploy an application using the QML runtime, you have two options:
@@ -62,18 +61,18 @@
\list
\o Write your own Qt application including a QDeclarative view and deploy it the same as
any other Qt application (not discussed further on this page), or
- \o Write a main QML file for your application, and run your application using the included \c qml tool.
+ \o Write a main QML file for your application, and run your application using the included \QQL.
\endlist
- To run an application with the \c qml tool, pass the filename as an argument:
+ To run an application with the \QQL, pass the filename as an argument:
\code
qml myQmlFile.qml
\endcode
- Deploying a QML application via the \c qml executable allows for QML only deployments, but can also
+ Deploying a QML application via the \QQL allows for QML only deployments, but can also
include custom C++ modules just as easily. Below is an example of how you might structure
- a complex application deployed via the qml runtime, it is a listing of the files that would
+ a complex application deployed via the QML runtime, it is a listing of the files that would
be included in the deployment package.
\code
@@ -94,7 +93,7 @@
modules must contain a QDeclarativeExtentionPlugin subclass.
The application would be executed either with your own application, the command 'qml MyApp.qml' or by
- opening the qml file if your system has the \c qml executable registered as the handler for qml files. The MyApp.qml file would have access
+ opening the file if your system has the \QQL registered as the handler for QML files. The MyApp.qml file would have access
to all of the deployed types using the import statements such as the following:
\code
@@ -102,19 +101,36 @@
import "OtherModule" 1.0 as Other
\endcode
- \section1 \c qml application functionality
- The \c qml application implements some additional functionality to help it serve the role of a launcher
- for myriad applications. If you implement your own launcher application, you may also wish to reimplement
+ \section1 Qt QML Launcher functionality
+ The \QQL implements some additional functionality to help it supporting
+ myriad applications. If you implement your own application, you may also wish to reimplement
some or all of this functionality. However, much of this functionality is intended to aid the prototyping of
- qml applications and may not be necessary for a deployed application.
+ QML applications and may not be necessary for a deployed application.
\section2 Options
- When run with the \c -help option, qml shows available options.
+ When run with the \c -help option, \c qml shows available options.
+
+ \section2 Translations
+
+ When the launcher loads an initial QML file, it will install a translation file from
+ a "i18n" subdirectory relative to that initial QML file. The actual translation file
+ loaded will be according to the system locale and have the form
+ "qml_<language>.qm", where <language> is a two-letter ISO 639 language,
+ such as "qml_fr.qm", optionally followed by an underscore and an uppercase two-letter ISO 3166 country
+ code, such as "qml_fr_FR.qm" or "qml_fr_CA.qm".
+
+ Such files can be created using \l{Qt Linguist}.
+
+ See the \l{scripting.html#internationalization}{Qt Internationalization} documentation for information about how to make
+ the JavaScript in QML files use translatable strings.
+
+ Additionally, the launcher will load translation files specified on the
+ command line via the \c -translation option.
\section2 Dummy Data
- The secondary use of the qml runtime is to allow QML files to be viewed with
+ The secondary use of the launcher is to allow QML files to be viewed with
dummy data. This is useful when prototyping the UI, as the dummy data can
be later replaced with actual data and bindings from a C++ plugin.
To provide dummy data: create a directory called "dummydata" in the same directory as
@@ -136,13 +152,13 @@
\section2 Runtime Object
- All applications using the qmlruntime will have access to the 'runtime'
+ All applications using the launcher will have access to the 'runtime'
property on the root context. This property contains several pieces of
information about the runtime environment of the application.
\section3 Screen Orientation
- A special piece of dummy data which is integrated into the runtime is
+ A special piece of dummy data which is integrated into the launcher is
a simple orientation property. The orientation can be set via the
settings menu in the application, or by pressing Ctrl+T to toggle it.
@@ -156,13 +172,13 @@
}
\endcode
- This allows your application to respond to the orientation of the screen changing. The runtime
+ This allows your application to respond to the orientation of the screen changing. The launcher
will automatically update this on some platforms (currently the N900 only) to match the physical
screen's orientation. On other plaforms orientation changes will only happen when explictly asked for.
\section3 Window Active
- The runtime.isActiveWindow property tells whether the main window of the qml runtime is currently active
+ The runtime.isActiveWindow property tells whether the main window of the launcher is currently active
or not. This is especially useful for embedded devices when you want to pause parts of your application,
including animations, when your application loses focus or goes to the background.
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index d024ff2..7d696d7 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -97,17 +97,17 @@ The following example shows how to expose a background color to a QML file throu
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.qml 0
\endtable
Or, if you want \c main.cpp to create the component without showing it in a QDeclarativeView, you could create an instance of QDeclarativeContext using QDeclarativeEngine::rootContext() instead:
-\snippet doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp 1
+\snippet doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp 1
Context properties work just like normal properties in QML bindings - if the \c backgroundColor
context property in this example was changed to red, the component object instances would
@@ -135,15 +135,15 @@ allow QML to set values.
The following example creates a \c CustomPalette object, and sets it as the \c palette context
property.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h 0
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.cpp 0
The QML that follows references the palette object, and its properties, to set the appropriate
background and text colors. When the window is clicked, the palette's text color is changed, and
the window text will update accordingly.
-\snippet doc/src/declarative/snippets/qtbinding/custompalette/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/custompalette/main.qml 0
To detect when a C++ property value - in this case the \c CustomPalette's \c text property -
changes, the property must have a corresponding NOTIFY signal. The NOTIFY signal specifies a signal
@@ -185,12 +185,12 @@ This example toggles the "Stopwatch" object on/off when the MouseArea is clicked
\row
\o
\c {// main.cpp}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h 0
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp 0
\o
\c {// main.qml}
-\snippet doc/src/declarative/snippets/qtbinding/stopwatch/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/stopwatch/main.qml 0
\endtable
@@ -258,16 +258,16 @@ QML content can be loaded from \l {The Qt Resource System} using the \e qrc: URL
For example:
\c [project/example.qrc]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/example.qrc
+\quotefile doc/src/snippets/declarative/qtbinding/resources/example.qrc
\c [project/project.pro]
-\quotefile doc/src/declarative/snippets/qtbinding/resources/resources.pro
+\quotefile doc/src/snippets/declarative/qtbinding/resources/resources.pro
\c [project/main.cpp]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.cpp 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.cpp 0
\c [project/main.qml]
-\snippet doc/src/declarative/snippets/qtbinding/resources/main.qml 0
+\snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0
*/
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h b/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
deleted file mode 100644
index 73d66b7..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/bluecircle.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-//![0]
-#include <QGraphicsWidget>
-#include <QPainter>
-
-class BlueCircle : public QGraphicsWidget
-{
- Q_OBJECT
-public:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
- {
- painter->setPen(QColor(Qt::blue));
- painter->drawEllipse(0, 0, size().width(), size().height());
- }
-};
-//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro b/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
deleted file mode 100644
index 21c8a37..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/graphicswidgets.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TEMPLATE = lib
-CONFIG += qt plugin
-QT += declarative
-
-HEADERS += redsquare.h \
- bluecircle.h
-
-SOURCES += shapesplugin.cpp
-
-DESTDIR = lib
-OBJECTS_DIR = tmp
-MOC_DIR = tmp
-
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml b/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
deleted file mode 100644
index ffcf79d..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/main.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-import Qt 4.7
-import Qt.widgets 4.7
-
-Rectangle {
- width: 200
- height: 200
-
- RedSquare {
- id: square
- width: 80
- height: 80
- }
-
- BlueCircle {
- anchors.left: square.right
- width: 80
- height: 80
- }
-
- QGraphicsWidget {
- anchors.top: square.bottom
- size.width: 80
- size.height: 80
- layout: QGraphicsLinearLayout {
- LayoutItem {
- preferredSize: "100x100"
- Rectangle { color: "yellow"; anchors.fill: parent }
- }
- }
- }
-}
-
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir b/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
deleted file mode 100644
index f94dad2..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/qmldir
+++ /dev/null
@@ -1 +0,0 @@
-plugin graphicswidgets lib
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h b/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
deleted file mode 100644
index 3050662..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/redsquare.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-//![0]
-#include <QGraphicsWidget>
-#include <QPainter>
-
-class RedSquare : public QGraphicsWidget
-{
- Q_OBJECT
-public:
- void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
- {
- painter->fillRect(0, 0, size().width(), size().height(), QColor(Qt::red));
- }
-};
-//![0]
diff --git a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp b/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp
deleted file mode 100644
index 4c18ef3..0000000
--- a/doc/src/declarative/snippets/integrating/graphicswidgets/shapesplugin.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** 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$
-**
-****************************************************************************/
-//![0]
-#include "redsquare.h"
-#include "bluecircle.h"
-
-#include <QtDeclarative/QDeclarativeExtensionPlugin>
-#include <QtDeclarative/qdeclarative.h>
-
-class ShapesPlugin : public QDeclarativeExtensionPlugin
-{
- Q_OBJECT
-public:
- void registerTypes(const char *uri) {
- qmlRegisterType<RedSquare>(uri, 1, 0, "RedSquare");
- qmlRegisterType<BlueCircle>(uri, 1, 0, "BlueCircle");
- }
-};
-
-#include "shapesplugin.moc"
-
-Q_EXPORT_PLUGIN2(shapesplugin, ShapesPlugin);
-//![0]
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 1a93d05..75c0f851 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -57,10 +57,10 @@ The tutorial's source code is located in the $QTDIR/examples/declarative/tutoria
Tutorial chapters:
-\list
-\o \l {QML Tutorial 1 - Basic Types}
-\o \l {QML Tutorial 2 - QML Component}
-\o \l {QML Tutorial 3 - States and Transitions}
+\list 1
+\o \l {QML Tutorial 1 - Basic Types}{Basic Types}
+\o \l {QML Tutorial 2 - QML Components}{QML Components}
+\o \l {QML Tutorial 3 - States and Transitions}{States and Transitions}
\endlist
*/
@@ -86,7 +86,7 @@ Here is the QML code for the application:
\section2 Import
First, we need to import the types that we need for this example. Most QML files will import the built-in QML
-types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with:
+types (like \l{Rectangle}, \l{Image}, ...) that come with Qt, using:
\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 3
@@ -95,7 +95,7 @@ types (like \l{Rectangle}, \l{Image}, ...) that come with Qt with:
\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 1
We declare a root element of type \l{Rectangle}. It is one of the basic building blocks you can use to create an application in QML.
-We give it an \c{id} to be able to refer to it later. In this case, we call it \e page.
+We give it an \c{id} to be able to refer to it later. In this case, we call it "page".
We also set the \c width, \c height and \c color properties.
The \l{Rectangle} element contains many other properties (such as \c x and \c y), but these are left at their default values.
@@ -103,15 +103,16 @@ The \l{Rectangle} element contains many other properties (such as \c x and \c y)
\snippet examples/declarative/tutorials/helloworld/tutorial1.qml 2
-We add a \l Text element as a child of our root element that will display the text 'Hello world!'.
+We add a \l Text element as a child of the root Rectangle element that displays the text 'Hello world!'.
The \c y property is used to position the text vertically at 30 pixels from the top of its parent.
-The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
-
The \c anchors.horizontalCenter property refers to the horizontal center of an element.
In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}).
+The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}.
+
+
\section2 Viewing the example
To view what you have created, run the \l{Qt Declarative UI Runtime}{qml} tool (located in the \c bin directory) with your filename as the first argument.
@@ -124,7 +125,7 @@ bin/qml $QTDIR/examples/declarative/tutorials/helloworld/tutorial1.qml
/*!
\page qml-tutorial2.html
-\title QML Tutorial 2 - QML Component
+\title QML Tutorial 2 - QML Components
\contentspage QML Tutorial
\previouspage QML Tutorial 1 - Basic Types
\nextpage QML Tutorial 3 - States and Transitions
@@ -134,10 +135,10 @@ This chapter adds a color picker to change the color of the text.
\image declarative-tutorial2.png
Our color picker is made of six cells with different colors.
-To avoid writing the same code multiple times, we first create a new \c Cell component.
+To avoid writing the same code multiple times for each cell, we create a new \c Cell component.
A component provides a way of defining a new type that we can re-use in other QML files.
-A QML component is like a black-box and interacts with the outside world through properties, signals and slots and is generally
-defined in its own QML file (for more details, see \l {Defining new Components}).
+A QML component is like a black-box and interacts with the outside world through properties, signals and functions and is generally
+defined in its own QML file. (For more details, see \l {Defining new Components}).
The component's filename must always start with a capital letter.
Here is the QML code for \c Cell.qml:
@@ -157,7 +158,7 @@ An \l Item is the most basic visual element in QML and is often used as a contai
We declare a \c cellColor property. This property is accessible from \e outside our component, this allows us
to instantiate the cells with different colors.
-This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{intro-properties}{Properties}).
+This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Adding new properties}).
\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
diff --git a/doc/src/development/assistant-manual.qdoc b/doc/src/development/assistant-manual.qdoc
index 7d56ea1..afc6361 100644
--- a/doc/src/development/assistant-manual.qdoc
+++ b/doc/src/development/assistant-manual.qdoc
@@ -359,7 +359,7 @@
The \menu{Options} page lets you specify the homepage \QA will display when
you click the \gui{Home} button in \QA's main user interface. You can specify
- the hompage by typing it here or clicking on one of the buttons below the
+ the homepage by typing it here or clicking on one of the buttons below the
textbox. \gui{Current Page} sets the currently displayed page as your home
page while \gui{Restore to default} will reset your home page to the default
home page.
diff --git a/doc/src/development/developing-on-mac.qdoc b/doc/src/development/developing-on-mac.qdoc
index 785858f..0c0af79 100644
--- a/doc/src/development/developing-on-mac.qdoc
+++ b/doc/src/development/developing-on-mac.qdoc
@@ -41,9 +41,8 @@
/*!
\page developing-on-mac.html
- \title Developing Qt Applications on Mac OS X
- \brief A overview of items to be aware of when developing Qt applications
- on Mac OS X
+ \title Developing Qt Applications for Mac OS X
+ \brief Information for developing Qt applications for Mac OS X
\ingroup platform-specific
\tableofcontents
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 688122b..c63e96c 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -347,6 +347,7 @@
\row \o vcapp \o Creates a Visual Studio Project file to build
an application.
\row \o vclib \o Creates a Visual Studio Project file to build a library.
+ \row \o vcsubdirs \o Creates a Visual Studio Solution file to build projects in sub-directories.
\endtable
See the \l{qmake Tutorial} for advice on writing project files for
diff --git a/doc/src/diagrams/modelview-move-rows-1.sk b/doc/src/diagrams/modelview-move-rows-1.sk
new file mode 100644
index 0000000..dc90cfb
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-1.sk
@@ -0,0 +1,271 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,220,515)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,664.044)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,425)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,337.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,515.177)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,485.177)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,335)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,545)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30.262,220,305.262)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,307.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,455.177)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,545.177)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30.956,415.038,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,367.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,365)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,605)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,277.5,635)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,395)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,635)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.478,672.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.44,345.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.478,642.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,403.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.44,315.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,613.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.478,523.317))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(286.94,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,373.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,583.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.478,493.317))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(286.94,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,343.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,553.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.478,463.317))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(286.94,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,313.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.133,283.402))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.44,285.64))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.478,433.317))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(277.5,635,0)
+bs(252.5,635,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(292.5,380,0)
+bs(292.5,542.5,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,380,0)
+bs(290,380,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-move-rows-2.sk b/doc/src/diagrams/modelview-move-rows-2.sk
new file mode 100644
index 0000000..7ddb95e
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-2.sk
@@ -0,0 +1,271 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+ld((5, 5))
+r(30,0,0,-30,220,515)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,665)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,664.044)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,425)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,337.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,605)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,575)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,575)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,275,455)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,335)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,545)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,545)
+fp((1,1,1))
+lw(1)
+r(29.6927,0,0,-30,220,305.262)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,307.5)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,635)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,695)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415.038,694.044)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,415,367.5)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,275,485)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,365)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,485)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,275,515)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,395)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,415,515)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,673.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.478,672.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(424.44,345.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,643.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.478,642.184))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,403.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(424.44,315.64))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.44,613.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(284.44,493.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,373.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(424.44,493.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.44,583.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(284.44,463.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,343.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(424.44,463.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.44,553.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(284.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,313.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(424.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.44,523.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.133,283.402))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(424.44,285.64))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(275,515,0)
+bs(252.5,515,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(292.5,380,0)
+bs(292.5,422.5,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,380,0)
+bs(290,380,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-move-rows-3.sk b/doc/src/diagrams/modelview-move-rows-3.sk
new file mode 100644
index 0000000..33a9ad1
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-3.sk
@@ -0,0 +1,137 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,425)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,344.997,400)
+lw(1)
+r(30,0,0,-30,220,335)
+lw(1)
+r(30,0,0,-30,345,339.739)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,305.262)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,345,310)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,344.997,430)
+lw(1)
+r(30,0,0,-30,220,365)
+lw(1)
+r(30,0,0,-30,345,369.739)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,272.5,455)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,345,460)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,395)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,433.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(354.437,408.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,403.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(354.437,378.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(281.94,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(354.44,438.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,373.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,343.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(354.44,347.879))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,313.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(354.44,317.879))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.133,283.402))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(355.049,288.14))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(272.5,455,0)
+bs(252.5,455,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(287.5,380,0)
+bs(287.5,422.5,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,380,0)
+bs(285,380,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/diagrams/modelview-move-rows-4.sk b/doc/src/diagrams/modelview-move-rows-4.sk
new file mode 100644
index 0000000..0531749
--- /dev/null
+++ b/doc/src/diagrams/modelview-move-rows-4.sk
@@ -0,0 +1,137 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,425)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,345,430)
+lw(1)
+r(30,0,0,-30,220,335.18)
+lw(1)
+r(30,0,0,-30,345,339.739)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30.442,220,305.442)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,345,310)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,220,455)
+fp((1,1,1))
+lw(1)
+r(30,0,0,-30,345,460)
+lw(1)
+r(30,0,0,-30,220,365)
+lw(1)
+r(30,0,0,-30,345,400)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,272.5,335)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,345,370)
+fp((0.753,0.753,1))
+lw(1)
+r(30,0,0,-30,220,395)
+le()
+lw(1)
+r(165,0,0,-230,210,705)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(229.44,433.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('0',(354.44,438.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(229.44,403.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('1',(354.44,408.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(281.94,313.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(354.44,348.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('2',(229.44,373.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(229.44,343.14))
+fp((0.503,0.503,0.503))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('3',(354.44,378.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(229.44,313.14))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('4',(354.44,317.879))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(229.44,283.582))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(20)
+txt('5',(354.44,288.14))
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(272.5,335,0)
+bs(252.5,335,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(287.5,380,0)
+bs(287.5,337.5,0)
+lw(1.5)
+la2(([(-4.0, 3.0), (2.0, 0.0), (-4.0, -3.0), (-4.0, 3.0)], 1))
+b()
+bs(250,380,0)
+bs(285,380,0)
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,2.5,2.5),1,(0,0,1),'Grid')
diff --git a/doc/src/examples/elasticnodes.qdoc b/doc/src/examples/elasticnodes.qdoc
index edc62d8..e6e6594 100644
--- a/doc/src/examples/elasticnodes.qdoc
+++ b/doc/src/examples/elasticnodes.qdoc
@@ -83,7 +83,7 @@
also reimplements \l{QGraphicsItem::shape()}{shape()} to ensure its hit
area has an elliptic shape (as opposed to the default bounding rectangle).
- For edge management purposes the node provides a simple API for adding
+ For edge management purposes, the node provides a simple API for adding
edges to a node, and for listing all connected edges.
The \l{QGraphicsItem::advance()}{advance()} reimplementation is called
@@ -126,16 +126,21 @@
\snippet examples/graphicsview/elasticnodes/node.cpp 2
- The \e calculateForces() function implements the elastic forces effect that
- pulls and pushes on nodes in the grid. In addition to this algorithm, the
- user can move one node around with the mouse. Because we do not want the
- two to interfere, we start by checking if this \c Node is the current mouse
- grabber item (i.e., QGraphicsScene::mouseGrabberItem()). Because we need to
- find all neighboring (but not necessarily connected) nodes, we also make
- sure the item is part of a scene in the first place.
+ There are two ways to move a node. The \c calculateForces() function
+ implements the elastic effect that pulls and pushes on nodes in the grid.
+ In addition, the user can directly move one node around with the mouse.
+ Because we do not want the two approaches to operate at the same time on
+ the same node, we start \c calculateForces() by checking if this \c Node is
+ the current mouse grabber item (i.e., QGraphicsScene::mouseGrabberItem()).
+ Because we need to find all neighboring (but not necessarily connected)
+ nodes, we also make sure the item is part of a scene in the first place.
\snippet examples/graphicsview/elasticnodes/node.cpp 3
+ The "elastic" effect comes from an algorithm that applies pushing and
+ pulling forces. The effect is impressive, and surprisingly simple to
+ implement.
+
The algorithm has two steps: the first is to calculate the forces that push
the nodes apart, and the second is to subtract the forces that pull the
nodes together. First we need to find all the nodes in the graph. We call
@@ -143,19 +148,20 @@
qgraphicsitem_cast() to look for \c Node instances.
We make use of \l{QGraphicsItem::mapFromItem()}{mapFromItem()} to create a
- vector pointing from this node to each other node, in \l{The Graphics View
- Coordinate System}{local coordinates}. We use the decomposed components of
- this vector to determine the direction and strength of force that apply to
- the node. The forces are added up for each node, and weighted so that the
- closest nodes are given the strongest force. The sum of all forces are
- stored in \e xvel (X-velocity) and \e yvel (Y-velocity).
+ temporary vector pointing from this node to each other node, in \l{The
+ Graphics View Coordinate System}{local coordinates}. We use the decomposed
+ components of this vector to determine the direction and strength of force
+ that should apply to the node. The forces accumulate for each node, and are
+ then adjusted so that the closest nodes are given the strongest force, with
+ rapid degradation when distance increases. The sum of all forces is stored
+ in \c xvel (X-velocity) and \c yvel (Y-velocity).
\snippet examples/graphicsview/elasticnodes/node.cpp 4
- The edges between the nodes represent the forces that pull the nodes
- together. By visiting each edge that is connected to this node, we can use
- a similar approach as above to find the direction and strength of all
- forces. These forces are subtracted from \e xvel and \e yvel.
+ The edges between the nodes represent forces that pull the nodes together.
+ By visiting each edge that is connected to this node, we can use a similar
+ approach as above to find the direction and strength of all pulling forces.
+ These forces are subtracted from \c xvel and \c yvel.
\snippet examples/graphicsview/elasticnodes/node.cpp 5
@@ -166,20 +172,20 @@
\snippet examples/graphicsview/elasticnodes/node.cpp 6
- The final step of \e calculateForces() determines the node's new position.
+ The final step of \c calculateForces() determines the node's new position.
We add the force to the node's current position. We also make sure the new
position stays inside of our defined boundaries. We don't actually move the
- item in this function; that's done in a separate step, from \e advance().
+ item in this function; that's done in a separate step, from \c advance().
\snippet examples/graphicsview/elasticnodes/node.cpp 7
- The \e advance() function updates the item's current position. It is called
- from \e GraphWidget::timerEvent(). If the node's position changed, the
+ The \c advance() function updates the item's current position. It is called
+ from \c GraphWidget::timerEvent(). If the node's position changed, the
function returns true; otherwise false is returned.
\snippet examples/graphicsview/elasticnodes/node.cpp 8
- The \e Node's bounding rectangle is a 20x20 sized rectangle centered around
+ The \c Node's bounding rectangle is a 20x20 sized rectangle centered around
its origin (0, 0), adjusted by 2 units in all directions to compensate for
the node's outline stroke, and by 3 units down and to the right to make
room for a simple drop shadow.
@@ -188,8 +194,8 @@
The shape is a simple ellipse. This ensures that you must click inside the
node's elliptic shape in order to drag it around. You can test this effect
- by running the example, and zooming far enough in so that the nodes become
- very large. Without reimplementing \l{QGraphicsItem::shape()}{shape()}, the
+ by running the example, and zooming far in so that the nodes are very
+ large. Without reimplementing \l{QGraphicsItem::shape()}{shape()}, the
item's hit area would be identical to its bounding rectangle (i.e.,
rectangular).
@@ -197,7 +203,7 @@
This function implements the node's painting. We start by drawing a simple
dark gray elliptic drop shadow at (-7, -7), that is, (3, 3) units down and
- to the right.
+ to the right from the top-left corner (-10, -10) of the ellipse.
We then draw an ellipse with a radial gradient fill. This fill is either
Qt::yellow to Qt::darkYellow when raised, or the opposite when sunken. In
@@ -217,8 +223,8 @@
calculations.
This notification is the only reason why the nodes need to keep a pointer
- back to the \e GraphWidget. Another approach could be to provide such
- notification using a signal; in such case, \e Node would need to inherit
+ back to the \c GraphWidget. Another approach could be to provide such
+ notification using a signal; in such case, \c Node would need to inherit
from QGraphicsObject.
\snippet examples/graphicsview/elasticnodes/node.cpp 12
@@ -226,14 +232,14 @@
Because we have set the \l{QGraphicsItem::ItemIsMovable}{ItemIsMovable}
flag, we don't need to implement the logic that moves the node according to
mouse input; this is already provided for us. We still need to reimplement
- the mouse press and release handlers though, to update the nodes' visual
+ the mouse press and release handlers, though, to update the nodes' visual
appearance (i.e., sunken or raised).
\section1 Edge Class Definition
- The \e Edge class represents the arrow-lines between the nodes in this
+ The \c Edge class represents the arrow-lines between the nodes in this
example. The class is very simple: it maintains a source- and destination
- node pointer, and provides an \e adjust() function that makes sure the line
+ node pointer, and provides an \c adjust() function that makes sure the line
starts at the position of the source, and ends at the position of the
destination. The edges are the only items that change continuously as
forces pull and push on the nodes.
@@ -242,13 +248,13 @@
\snippet examples/graphicsview/elasticnodes/edge.h 0
- \e Edge inherits from QGraphicsItem, as it's a simple class that has no use
+ \c Edge inherits from QGraphicsItem, as it's a simple class that has no use
for signals, slots, and properties (compare to QGraphicsObject).
The constructor takes two node pointers as input. Both pointers are
mandatory in this example. We also provide get-functions for each node.
- The \e adjust() function repositions the edge, and the item also implements
+ The \c adjust() function repositions the edge, and the item also implements
\l{QGraphicsItem::boundingRect()}{boundingRect()} and
\{QGraphicsItem::paint()}{paint()}.
@@ -256,7 +262,7 @@
\snippet examples/graphicsview/elasticnodes/edge.cpp 0
- The \e Edge constructor initializes its arrowSize data member to 10 units;
+ The \c Edge constructor initializes its \c arrowSize data member to 10 units;
this determines the size of the arrow which is drawn in
\l{QGraphicsItem::paint()}{paint()}.
@@ -265,7 +271,7 @@
This ensures that the edge items are not considered for mouse input at all
(i.e., you cannot click the edges). Then, the source and destination
pointers are updated, this edge is registered with each node, and we call
- \e adjust() to update this edge's start end end position.
+ \c adjust() to update this edge's start end end position.
\snippet examples/graphicsview/elasticnodes/edge.cpp 1
@@ -274,7 +280,7 @@
\snippet examples/graphicsview/elasticnodes/edge.cpp 2
- In \e adjust(), we define two points: \e sourcePoint, and \e destPoint,
+ In \c adjust(), we define two points: \c sourcePoint, and \c destPoint,
pointing at the source and destination nodes' origins respectively. Each
point is calculated using \l{The Graphics View Coordinate System}{local
coordinates}.
@@ -295,7 +301,7 @@
It's important to notice that we call
\l{QGraphicsItem::prepareGeometryChange()}{prepareGeometryChange()} in this
- function. The reason is that the variables \e sourcePoint and \e destPoint
+ function. The reason is that the variables \c sourcePoint and \c destPoint
are used directly when painting, and they are returned from the
\l{QGraphicsItem::boundingRect()}{boundingRect()} reimplementation. We must
always call
@@ -338,26 +344,26 @@
\section1 GraphWidget Class Definition
- \e GraphWidget is a subclass of QGraphicsView, which provides the main
+ \c GraphWidget is a subclass of QGraphicsView, which provides the main
window with scrollbars.
\snippet examples/graphicsview/elasticnodes/graphwidget.h 0
- It provides a basic constructor that initializes the scene, an \e
+ The class provides a basic constructor that initializes the scene, an \c
itemMoved() function to notify changes in the scene's node graph, a few
event handlers, a reimplementation of
\l{QGraphicsView::drawBackground()}{drawBackground()}, and a helper
- function for scaling the view by mouse or keyboard.
+ function for scaling the view by using the mouse wheel or keyboard.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 0
- \e GraphicsWidget's constructor creates the scene, and because most items
- move around most of the time, it sets QGraphicsScene::NoIndex. Then the
- scene gets a fixed \l{QGraphicsScene::sceneRect}{scene rectangle}.
- The scene is then assigned to the \e GraphWidget view.
+ \c GraphicsWidget's constructor creates the scene, and because most items
+ move around most of the time, it sets QGraphicsScene::NoIndex. The scene
+ then gets a fixed \l{QGraphicsScene::sceneRect}{scene rectangle}, and is
+ assigned to the \c GraphWidget view.
The view enables QGraphicsView::CacheBackground to cache rendering of its
- static and somewhat complex background. Because the graph renders a close
+ static, and somewhat complex, background. Because the graph renders a close
collection of small items that all move around, it's unnecessary for
Graphics View to waste time finding accurate update regions, so we set the
QGraphicsView::BoundingRectViewportUpdate viewport update mode. The default
@@ -381,15 +387,15 @@
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 2
- \e GraphWidget is notified of node movement through this \e itemMoved()
+ \c GraphWidget is notified of node movement through this \c itemMoved()
function. Its job is simply to restart the main timer in case it's not
running already. The timer is designed to stop when the graph stabilizes,
and start once it's unstable again.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 3
- This is \e GraphWidget's key event handler. The arrow keys move the center
- node around, the '+' and '-' keys zoom in and out by calling \e
+ This is \c GraphWidget's key event handler. The arrow keys move the center
+ node around, the '+' and '-' keys zoom in and out by calling \c
scaleView(), and the enter and space keys randomize the positions of the
nodes. All other key events (e.g., page up and page down) are handled by
QGraphicsView's default implementation.
@@ -398,16 +404,16 @@
The timer event handler's job is to run the whole force calculation
machinery as a smooth animation. Each time the timer is triggered, the
- handler will find all nodes in the scene, and call \e
+ handler will find all nodes in the scene, and call \c
Node::calculateForces() on each node, one at a time. Then, in a final step
- it will call \e Node::advance() to move all nodes to their new positions.
- By checking the return value of \e advance(), we can decide if the grid
+ it will call \c Node::advance() to move all nodes to their new positions.
+ By checking the return value of \c advance(), we can decide if the grid
stabilized (i.e., no nodes moved). If so, we can stop the timer.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 5
In the wheel event handler, we convert the mouse wheel delta to a scale
- factor, and pass this factor to \e scaleView(). This approach takes into
+ factor, and pass this factor to \c scaleView(). This approach takes into
account the speed that the wheel is rolled. The faster you roll the mouse
wheel, the faster the view will zoom.
@@ -415,24 +421,24 @@
The view's background is rendered in a reimplementation of
QGraphicsView::drawBackground(). We draw a large rectangle filled with a
- linear gradient, with a drop shadow, and then render text in top. The text
- is rendered twice to give a similar simple drop-shadow effect.
+ linear gradient, add a drop shadow, and then render text on top. The text
+ is rendered twice for a simple drop-shadow effect.
This background rendering is quite expensive; this is why the view enables
QGraphicsView::CacheBackground.
\snippet examples/graphicsview/elasticnodes/graphwidget.cpp 7
- The \e scaleView() helper function checks that the scale factor stays
+ The \c scaleView() helper function checks that the scale factor stays
within certain limits (i.e., you cannot zoom too far in nor too far out),
- and then applies this scale.
+ and then applies this scale to the view.
\section1 The main() Function
- In contrast to the complexity of the rest of this example, the \e main()
+ In contrast to the complexity of the rest of this example, the \c main()
function is very simple: We create a QApplication instance, seed the
- randomizer using qsrand(), and then create and show an instance of \e
- GraphWidget. Because all nodes in the grid are moved initially, the \e
+ randomizer using qsrand(), and then create and show an instance of \c
+ GraphWidget. Because all nodes in the grid are moved initially, the \c
GraphWidget timer will start immediately after control has returned to the
event loop.
*/
diff --git a/doc/src/examples/fingerpaint.qdoc b/doc/src/examples/fingerpaint.qdoc
index e5eb4ef..7eb1512 100644
--- a/doc/src/examples/fingerpaint.qdoc
+++ b/doc/src/examples/fingerpaint.qdoc
@@ -46,5 +46,5 @@
The Finger Paint example shows the use of multi-touch with a custom widget
to create a simple painting application.
- \image multitouch-fingerpaint.png
+ \image multitouch-fingerpaint-example.png
*/
diff --git a/doc/src/examples/padnavigator.qdoc b/doc/src/examples/padnavigator.qdoc
index 70e131e..e29a3b2 100644
--- a/doc/src/examples/padnavigator.qdoc
+++ b/doc/src/examples/padnavigator.qdoc
@@ -43,9 +43,555 @@
\example graphicsview/padnavigator
\title Pad Navigator Example
- The Pad Navigator Example shows how you can use Graphics View
- together with embedded widgets to create a simple but useful
- dynamic user interface for embedded devices.
+ The Pad Navigator Example shows how you can use Graphics View together with
+ embedded widgets and Qt's \l{State Machine Framework} to create a simple
+ but useful, dynamic, animated user interface.
\image padnavigator-example.png
+
+ The interface consists of a flippable, rotating pad with icons that can be
+ selected using the arrow keys on your keyboard or keypad. Pressing enter
+ will flip the pad around and reveal its back side, which has a form
+ embedded into a QGraphicsProxyWidget. You can interact with the form, and
+ press the enter key to flip back to the front side of the pad at any time.
+
+ Graphics View provides the QGraphicsScene class for managing and
+ interacting with a large number of custom-made 2D graphical items derived
+ from the QGraphicsItem class, and a QGraphicsView widget for visualizing
+ the items, with support for zooming and rotation.
+
+ This example consists of a \c RoundRectItem class, a \c FlippablePad class,
+ a \c PadNavigator class, a \c SplashItem class, and a \c main() function.
+
+ \section1 RoundRectItem Class Definition
+
+ The \c RoundRectItem class is used by itself to diplay the icons on the
+ pad, and as a base class for \c FlippablePad, the class for the pad itself.
+ The role of the class is to paint a round rectangle of a specified size and
+ gradient color, and optionally to paint a pixmap icon on top. To support \c
+ FlippablePad it also allows filling its contents with a plain window
+ background color.
+
+ Let's start by reviewing the \c RoundRectItem class declaration.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.h 0
+
+ \c RoundRectItem inherits QGraphicsObject, which makes it easy to control
+ its properties using QPropertyAnimation. Its constructor takes a rectangle
+ to determine its bounds, and a color.
+
+ Besides implementing the mandatory \l{QGraphicsItem::paint()}{paint()} and
+ \l{QGraphicsItem::boundingRect()}{boundingRect()} pure virtual functions,
+ it also provides the \c pixmap and \c fill properties.
+
+ The \c pixmap property sets an optional pixmap that is drawn on top of the
+ round rectangle. The \c fill property will, when true, fill the round
+ rectangle contents with a fixed QPalette::Window background color.
+ Otherwise the contents are filled using a gradient based on the color
+ passed to \c RoundRectItem's constructor.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.h 1
+
+ The private data members are:
+
+ \list
+ \o \c pix: The optional pixmap that is drawn on top of the rectangle.
+ \o \c fillRect: Corresponds to the \c fill property.
+ \o \c color: The configurable gradient color fill of the rectangle.
+ \o \c bounds: The bounds of the rectangle.
+ \o \c gradient: A precalculated gradient used to fill the rectangle.
+ \endlist
+
+ We will now review the \c RoundRectItem implementation. Let's start by
+ looking at its constructor:
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 0
+
+ The constructor initializes its member variables and forwards the \c parent
+ argument to QGraphicsObject's constructor. It then constructs the linear
+ gradient that is used in \l{QGraphicsItem::paint()}{paint()} to draw the
+ round rectangle's gradient background. The linear gradient's starting point
+ is at the top-left corner of the bounds, and the end is at the bottom-left
+ corner. The start color is identical to the color passed as an argument,
+ and a slightly darker color is chosen for the final stop.
+
+ We store this gradient as a member variable to avoid having to recreate the
+ gradient every time the item is repainted.
+
+ Finally we set the cache mode
+ \l{QGraphicsItem::ItemCoordinateCache}{ItemCoordinateCache}. This mode
+ causes the item's rendering to be cached into an off-screen pixmap that
+ remains persistent as we move and transform the item. This mode is ideal
+ for this example, and works particularily well with OpenGL and OpenGL ES.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 1
+
+ The \c pixmap property implementation simple returns the member pixmap, or
+ sets it and then calls \l{QGraphicsItem::update()}{update()}.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 2
+
+ As the \l{QGraphicsItem::paint()}{paint()} implementation below draws a
+ simple drop shadow down and to the right of the item, we return a slightly
+ adjusted rectangle from \l{QGraphicsItem::boundingRect()}{boundingRect()}.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 3
+
+ The \l{QGraphicsItem::paint()}{paint()} implementation starts by rendering
+ a semi transparent black round rectangle drop shadow, two units down and to
+ the right of the main item.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 4
+
+ We then draw the "foreground" round rectangle itself. The fill depends on
+ the \c fill property; if true, we will with a plain QPalette::Window color.
+ We get the corrent brush from QApplication::palette(). We assign a single
+ unit wide pen for the stroke, assign the brush, and then draw the
+ rectangle.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 5
+
+ If a pixmap has been assigned to the \e pixmap property, we draw this
+ pixmap in the center of the rectangle item. The pixmaps are scaled to match
+ the size of the icons; in arguably a better approach would have been to
+ store the icons with the right size in the first places.
+
+ \snippet examples/graphicsview/padnavigator/roundrectitem.cpp 6
+
+ Finally, for completeness we include the \c fill property implementation.
+ It returns the \c fill member variable's value, and when assigned to, it
+ calls \l{QGraphicsItem::update()}{update()}.
+
+ As mentioned already, \c RoundRectItem is the base class for \c
+ FlippablePad, which is the class representing the tilting pad itself. We
+ will proceed to reviewing \c FlippablePad.
+
+ \section1 FlippablePad Class Definition
+
+ \c FlippablePad is, in addition to its inherited \c RoundRectItem
+ responsibilities, responsible for creating and managing a grid of icons.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.h 0
+
+ Its declaration is very simple: It inherits \c RoundRectItem and does not
+ need any special polymorphic behavior. It's suitable to declare its own
+ constructor, and a getter-function that allows \c PadNavigator to access
+ the icons in the grid by (row, column).
+
+ The example has no "real" behavior or logic of any kind, and because of
+ that, the icons do not need to provide any \e behavior or special
+ interactions management. In a real application, however, it would be
+ natural for the \c FlippablePad and its icons to handle more of the
+ navigation logic. In this example, we have chosen to leave this to
+ the \c PadNavigator class, which we will get back to below.
+
+ We will now review the \c FlippablePad implementation. This implementation
+ starts with two helper functions: \c boundsFromSize() and \c
+ posForLocation():
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 0
+
+ \c boundsForSize() takes a QSize argument, and returns the bounding
+ rectangle of the flippable pad item. The QSize determines how many rows and
+ columns the icon grid should have. Each icon is given 150x150 units of
+ space, and this determines the bounds.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 1
+
+ \c posForLocation() returns the position of an icon given its row and
+ column position. Like \c boundsForSize(), the function assumes each icon is
+ given 150x150 units of space, and that all icons are centered around the
+ flippable pad item's origin (0, 0).
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 2
+
+ The \c FlippablePad constructor passes suitable bounds (using \c
+ boundsForSize()) and specific color to \c RoundRectItem's constructor.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 3
+
+ It then loads pixmaps from compiled-in resources to use for its icons.
+ QDirIterator is very useful in this context, as it allows us to fetch all
+ resource "*.png" files inside the \c :/images directory without explicitly
+ naming the files.
+
+ We also make sure not to load more pixmaps than we need.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 4
+
+ Now that we have the pixmaps, we can create icons, position then and assign
+ pixmaps. We start by finding a suitable size and color for the icons, and
+ initializing a convenient grid structure for storing the icons. This \c
+ iconGrid is also used later to find the icon for a specific (column, row)
+ location.
+
+ For each row and column in our grid, we proceed to constructing each icon
+ as an instance of \c RoundRectItem. The item is placed by using the \c
+ posForLocation() helper function. To make room for the slip-behind
+ selection item, we give each icon a \l{QGraphicsItem::zValue()}{Z-value} of
+ 1. The pixmaps are distributed to the icons in round-robin fasion.
+
+ Again, this approach is only suitable for example purposes. In a real-life
+ application where each icon represents a specific action, it would be more
+ natural to assign the pixmaps directly, or that the icons themselves
+ provide suitable pixmaps.
+
+ \snippet examples/graphicsview/padnavigator/flippablepad.cpp 5
+
+ Finally, the \c iconAt() function returns a pointer to the icon at a
+ specific row and column. It makes a somewhat bold assumption that the input
+ is valid, which is fair because the \c PadNavigator class only calls this
+ function with correct input.
+
+ We will now review the \c SplashItem class.
+
+ \section1 SplashItem Class Definition
+
+ The \c SplashItem class represents the "splash window", a semitransparent
+ white overlay with text that appears immediately after the application has
+ started, and disappears after pressing any key. The animation is controlled
+ by \c PadNavigator; this class is very simple by itself.
+
+ \snippet examples/graphicsview/padnavigator/splashitem.h 0
+
+ The class declaration shows that \c SplashItem inherits QGraphicsObject to
+ allow it to be controlled by QPropertyAnimation. It reimplements the
+ mandatory \l{QGraphicsItem::paint()}{paint()} and
+ \l{QGraphicsItem::boundingRect()}{boundingRect()} pure virtual functions,
+ and keeps a \c text member variable which will contain the information text
+ displayed on this splash item.
+
+ Let's look at its implementation.
+
+ \snippet examples/graphicsview/padnavigator/splashitem.cpp 0
+
+ The constructor forwards to QGraphicsObject as expected, assigns a text
+ message to the \c text member variable, and enables
+ \l{QGraphicsItem::DeviceCoordinateCache}{DeviceCoordinateCache}. This cache
+ mode is suitable because the splash item only moves and is never
+ transformed, and because it contains text, it's important that it has a
+ pixel perfect visual appearance (in constrast to
+ \l{QGraphicsItem::ItemCoordinateCache}{ItemCoordinateCache}, where the
+ visual appearance is not as good).
+
+ We use caching to avoid having to relayout and rerender the text for each
+ frame. An alterative approach would be to use the new QStaticText class.
+
+ \snippet examples/graphicsview/padnavigator/splashitem.cpp 1
+
+ \c SplashItem's bounding rectangle is fixed at (400x175).
+
+ \snippet examples/graphicsview/padnavigator/splashitem.cpp 2
+
+ The \l{QGraphicsItem::paint()}{paint()} implementation draws a clipped
+ round rectangle with a thick 2-unit border and a semi-transparent white
+ background. It proceeds to finding a suitable text area by adjusting the
+ splash item's bounding rectangle with 10 units in each side. The text is
+ rendered inside this rectangle, with top-left alignment, and with word
+ wrapping enabled.
+
+ The main class now remains. We will proceed to reviewing \c PadNavigator.
+
+ \section1 PadNavigator Class Definition
+
+ \c PadNavigator represents the main window of our Pad Navigator Example
+ application. It creates and controls a somewhat complex state machine, and
+ several animations. Its class declaration is very simple:
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.h 0
+
+ It inherits QGraphicsView and reimplements only one function:
+ \l{QGraphicsView::resizeEvent()}{resizeEvent()}, to ensure the scene is
+ scaled to fit inside the view when resizing the main window.
+
+ The \c PadNavigator constructor takes a QSize argument that determines the
+ number or rows and columns in the grid.
+
+ It also keeps a private member instance, \c form, which is the generated
+ code for the pad's back side item's QGraphicsProxyWidget-embedded form.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 0
+
+ \c PadNavigator's constructor is a bit long. In short, its job is to create
+ all items, including the \c FlippablePad, the \c SplashItem and the
+ QGraphicsProxyWidget \c backItem, and then to set up all animations, states
+ and transitions that control the behavior of the application.
+
+ It starts out simple, by forwarding to QGraphicsView's constructor.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 1
+
+ The first item to be created is \c SplashItem. This is going to be a top-level
+ item in the scene, next to \c FlippablePad, and stacked on top of it, so we
+ assign it a \l{QGraphicsItem::zValue()}{Z-value} of 1.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 2
+
+ Now we construct the \c FlippablePad item, passing its column-row count to
+ its constructor.
+
+ The pad is constrolled by three transformations, and we create one
+ QGraphicsRotation object for each of these.
+
+ \list
+ \o \c flipRotation: Rotates the grid around its Qt::YAxis. This rotation is
+ animated from 0 to 180, and eventually back, when enter is pressed on the
+ keyboard, flipping the pad around.
+ \o \c xRotation: Rotates the grid around its Qt::XAxis. This is used to
+ tilt the pad vertically corresponding to which item is currently selected.
+ This way, the selected item is always kept in front.
+ \o \c yRotation: Rotates the grid around its Qt::YAxis. This is used to
+ tilt the pad horizontally corresponding to which item is selected. This
+ way, the selected item is always kept in front.
+ \endlist
+
+ The combination of all three rotations is assigned via
+ QGraphicsItem::setTransformations().
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 3
+
+ Now we construct the QGraphicsProxyWidget-embedded \c backItem. The proxy
+ widget is created as a child of the pad. We create a new QWidget and
+ populate it with the \c form member. To ensure the \c hostName line edit is
+ the first to receive input focus when this item is shown, we call
+ \l{QWidget::setFocus()}{setFocus()} immediately. This will not give the
+ widget focus right away; it will only prepare the item to automatically
+ receive focus once it is shown.
+
+ The QWidget based form is embedded into the proxy widget. The proxy is
+ hidden initially; we only want to show it when the pad is rotated at least
+ 90 degrees, and we also rotate the proxy itself by 180 degrees. This way we
+ give the impression that the proxy widget is "behind" the flipped pad, when
+ in fact, it's actually \e{on top of it}.
+
+ We enable \l{QGraphicsItem::ItemCoordinateCache}{ItemCoordinateCache} to
+ ensure the flip animation can run smoothly.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 4
+
+ We now create the selection item. This is simply another instance of \c
+ RoundRectItem that is slightly larger than the icons on the pad. We create
+ it as an immediate child of the \c FlippablePad, so the selection item is a
+ sibling to all the icons. By giving it a
+ \l{QGraphicsItem::zValue()}{Z-value} of 0.5 we ensure it will slide beteen
+ the pad and its icons.
+
+ What follows now is a series of animation initializations.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 5
+
+ We begin with the animations that apply to the splash item. The first
+ animation, \c smoothSplashMove, ensures that the "y" property of \c splash
+ will be animated with a 250-millisecond duration
+ \l{QEasingCurve::InQuad}{InQuad} easing function. \c smoothSplashOpacity
+ ensures the opacity of \c splash eases in and out in 250 milliseconds.
+
+ The values are assigned by \c PadNavigator's state machine, which is
+ created later.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 6
+
+ These are the animations that control the selection item's movement and the
+ \c xRotation and \c yRotation QGraphicsRotation objects that tilt the pad.
+ All animations have a duration of 125 milliseconds, and they all use the
+ \l{QEasingCurve::InOutQuad}{InOutQuad} easing function.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 7
+
+ We now create the animations that control the flip-effect when you press
+ the enter key. The main goal is to rotate the pad by 180 degrees or back,
+ but we also need to make sure the selection item's tilt rotations are reset
+ back to 0 when the pad is flipped, and restored back to their original
+ values when flipped back:
+
+ \list
+ \o \c smoothFlipRotation: Animates the main 180 degree rotation of the pad.
+ \o \c smoothFlipScale: Scales the pad out and then in again while the pad is rotating.
+ \o \c smoothFlipXRotation: Animates the selection item's X-tilt to 0 and back.
+ \o \c smoothFlipYRotation: Animates the selection item's Y-tilt to 0 and back.
+ \o \c flipAnimation: A parallel animation group that ensures all the above animations are run in parallel.
+ \endlist
+
+ All animations are given a 500 millisecond duration and an
+ \l{QEasingCurve::InOutQuad}{InOutQuad} easing function.
+
+ It's worth taking a close look at \c smoothFlipScale. This animation's
+ start and end values are both 1.0, but at animation step 0.5 the
+ animation's value is 0.7. This means that after 50% of the animation's
+ duration, or 250 milliseconds, the pad will be scaled down to 0.7x of its
+ original size, which gives a great visual effect while flipping.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 8
+
+ This section uses a trick to ensure that certain properties are assigned
+ precisely when the flip animation passes 50%, or 90 degrees, rotation. In
+ short, the pad's icons and selection item are all hidden, the pad's \c fill
+ property is enabled, and \c backItem is shown when flipping over. When
+ flipping back, the reverse properties are applied.
+
+ The way this is achieved is by running a sequential animation in parallel
+ to the other animations. This sequence, dubbed \c setVariablesSequence,
+ starts with a 250 millisecond pause, and then executes several animations
+ with a duration of 0. Each animation will ensure that properties are set
+ immediate at this point.
+
+ This approach can also be used to call functions or set any other
+ properties at a specific time while an animation is running.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 9
+
+ We will now create the state machine. The whole \c PadNavigator state
+ machinery is controlled by one single state machine that has a
+ straight-forward state structure. The state engine itself is created
+ as a child of the \c PadNavigator itself. We then create three top level
+ states:
+
+ \list
+ \o \c splashState: The initial state where the splash item is visible.
+ \o \c frontState: The base state where the splash is gone and we can see
+ the front side of the pad, and navigate the selection item.
+ \o \c backState: The flipped state where the \c backItem is visible, and we
+ can interact with the QGraphicsProxyWidget-embedded form.
+ \endlist
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 10
+
+ Each state assigns specific properties to objects on entry. Most
+ interesting perhaps is the assignment of the value 0.0 to the pad's \c
+ flipRotation angle property when in \c frontState, and 180.0 when in \c
+ backState. At the end of this section we register default animations with
+ the state engine; these animations will apply to their respective objects
+ and properties for any state transition. Otherwise it's common to assign
+ animations to specific transitions.
+
+ The \c splashState state is set as the initial state. This is required
+ before we start the state engine. We proceed with creating some
+ transitions.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 11
+
+ QEventTransition defines a very flexible transition type. You can use this
+ class to trigger a transition based on an object receiving an event of a
+ specific type. In this case, we would like to transition from \c
+ splashState into \c frontState if \c PadNavigator receives any key press
+ event (QEvent::KeyPress).
+
+ We register the \c splashItem's animations to this transition to ensure they
+ are used to animate the item's movement and opacity.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 12
+
+ We use QKeyEventTransition to capture specific key events. In this case, we
+ detect that the user presses Qt::Key_Return or Qt::Key_Enter, and use this
+ to trigger transitions between \c frontState and backState. We register \c
+ flipAnimation, our complex parallel animation group, with these
+ transitions.
+
+ We continue by defining the states for each of the icons in the grid.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 13
+
+ We will use state groups to control transitions between icons. Each icon
+ represents a \e substate of \c frontState. We will then define transitions
+ between the states by detecting key presses, using QKeyEventTransition.
+
+ We start by creating all the substates, and at the same time we create a
+ temporary grid structure for the states to make it easier to find which
+ states represents icons that are up, down, left and to the right each
+ other.
+
+ Once the first substate is known, we set this up as the initial substate of
+ \c frontState. We will use the (0, 0), or top-left, icon for the initial
+ substate. We initialze the selection item's position to be exactly where
+ the top-left icon is.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 14
+
+ We can now create four transitions for each icon. Each transition ensures
+ that we move to the state corresponding to which arrow key has been
+ pressed. It's clear from this techinique that we could design any other
+ specific transitions to and from each of the sub states depending on these
+ and other keys.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 15
+
+ Also, for each of the icons, we assign suitable values to the \c xRotation
+ and \c yRotation objects' "angle"-properties. If you recall, these
+ properties "tilt" the pad corresponding to which item is currently
+ selected. We ensure each icon is invisible when the pad is flipped, and
+ visible when the pad is not flipped. To ensure the visible property is
+ assigned at the right time, we add property-controlling animations to the
+ \c setVariableSequence animation defined earlier.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 16
+
+ We are now finished with all states, transitions, and animations. We now
+ create the scene that will contain all our items. The scene gets a defined
+ background pixmap, and we disable item indexing (as most items in this
+ scene are animated). We add our \c pad item to the scene, and use its
+ bounding rectangle to fixate the scene rectangle. This rectangle is used by
+ the view to find a suitable size for the application window.
+
+ Then the scene is assigned to the view, or in our case, \c PadNavigator
+ itself.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 17
+
+ Now that the scene has received its final size, we can position the splash
+ item at the very top, find its fade-out position, and add it to the scene.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 18
+
+ The view toggles a few necessary properties:
+
+ \list
+ \o It disables its scroll bars - this application has no use for scroll bars.
+ \o It assigns a minimum size. This is necessary to avoid numerical errors
+ in our fit-in-view \c resizeEvent() implementation.
+ \o It sets \l{QGraphicsView::FullViewportUpdate}{FullViewportUpdate}, to
+ ensure QGraphicsView doesn't spend time figuring out precisely what needs
+ to be redrawn. This application is very simple - if anything changes,
+ everything is updated.
+ \o It enables background caching - this makes no performance difference
+ with OpenGL, but without OpenGL it avoids unnecessary re-scaling of the
+ background pixmap.
+ \o It sets render hints that increase rendering quality.
+ \o If OpenGL is supported, a QGLWidget viewport is assigned to the view.
+ \endlist
+
+ Finally, we start the state engine.
+
+ \snippet examples/graphicsview/padnavigator/padnavigator.cpp 19
+
+ The \l{QGraphicsView::resizeEvent()}{resizeEvent()} implementation calls
+ the base implementation, and then calls QGraphicsView::fitInView() to scale
+ the scene so that it fits perfectly inside the view.
+
+ By resizing the main application window, you can see this effect yourself.
+ The scene contents grow when you make the window larger, and shrink when
+ you make it smaller, while keeping the aspect ratio intact.
+
+ \section1 The main() Function
+
+ \snippet examples/graphicsview/padnavigator/main.cpp 0
+
+ The \c main function creates the QApplication instance, uses
+ Q_INIT_RESOURCE to ensure our compiled-in resources aren't removed by the
+ linker, and then creates a 3x3 \c PadNavigator instance and shows it.
+
+ Our flippable pad shows up with a suitable splash item once control returns
+ to the event loop.
+
+ \section1 Performance Notes
+
+ The example uses OpenGL if this is available, to achieve optimal
+ performance; otherwise perspective tranformations can be quite costly.
+
+ Although this example does use QGraphicsProxyWidget to demonstrate
+ integration of Qt widget components integrated into Graphics View, using
+ QGraphicsProxyWidget comes with a performance penalty, and is therefore not
+ recommended for embedded development.
+
+ This example uses extensive item caching to avoid rerendering of static
+ elements, at the expense of graphics memory.
*/
diff --git a/doc/src/examples/pinchzoom.qdoc b/doc/src/examples/pinchzoom.qdoc
index 726b1b3..867b2b3 100644
--- a/doc/src/examples/pinchzoom.qdoc
+++ b/doc/src/examples/pinchzoom.qdoc
@@ -46,5 +46,5 @@
The Pinch Zoom example shows how to use low-level multi-touch information
to recognize a gesture.
- \image multitouch-pinchzoom.png
+ \image multitouch-pinchzoom-example.png
*/
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 93e4a46..22113ee 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -40,79 +40,89 @@
****************************************************************************/
/*!
- \title Animations
- \example declarative/animations
+ \title Animation basics
+ \example declarative/animation/basics
This example shows how to use animations in QML.
*/
/*!
- \title AspectRatio
- \example declarative/aspectratio
+ \title Behaviors
+ \example declarative/animation/behaviors
+*/
- This example shows how to implement different aspect ratios in QML.
+/*!
+ \title Easing types
+ \example declarative/animation/easing
+
+ This example shows the different easing modes available for animations.
*/
/*!
- \example declarative/behaviors
- \title Behaviors
+ \title States
+ \example declarative/animation/states
*/
/*!
\title Border Image
- \example declarative/border-image
+ \example declarative/imageelements/borderimage
This example shows how to use a BorderImage in QML.
*/
/*!
- \title Clocks
- \example declarative/clocks
+ \title Image
+ \example declarative/imageelements/image
- This example shows how to create a Clock component and reuse it in a grid.
+ This example shows uses of the \l Image element in QML.
*/
/*!
- \title Connections
- \example declarative/connections
-
- This example shows how to use a Connection element in QML.
+ \title Reference examples
+ \example declarative/cppextensions/referenceexamples
*/
/*!
- \title Dial
- \example declarative/dial
+ \title Plugins
+ \example declarative/cppextensions/plugins
+*/
- This example shows how to implement a dial in QML.
+/*!
+ \title QtWidgets
+ \example declarative/cppextensions/proxywidgets
*/
/*!
- \title Dynamic
- \example declarative/dynamic
+ \title QGraphicsLayouts
+ \example declarative/cppextensions/qgraphicslayouts
+*/
- This example shows how to create dynamic objects QML.
+/*!
+ \title Image Provider
+ \example declarative/cppextensions/imageprovider
*/
/*!
- \example declarative/extending
- \title Extending
+ \title Network access manager
+ \example declarative/cppextensions/proxyviewer
*/
/*!
- \example declarative/fillmode
- \title Fillmode
+ \title Internationlization
+ \example declarative/i18n
*/
/*!
- \title Flipable
- \example declarative/flipable
+ \title Positioners
+ \example declarative/positioners
- This example shows how to use a Flipable element in QML.
+ This example shows how to use positioner elements such as Row, Column,
+ Grid and Flow.
*/
/*!
\title Focus
- \example declarative/focus
+ \example declarative/keyinteraction/focus
This example shows how to handle keys and focus in QML.
@@ -120,141 +130,149 @@
*/
/*!
- \example declarative/fonts
- \title Fonts
+ \title GridView
+ \example declarative/modelviews/gridview
*/
/*!
- \example declarative/gridview
- \title GridView
+ \title ListView
+ \example declarative/modelviews/listview
*/
/*!
- \example declarative/imageprovider
- \title Image Provider
+ \title Object ListModel
+ \example declarative/modelviews/objectlistmodel
*/
/*!
- \example declarative/images
- \title Images
+ \title Package
+ \example declarative/modelviews/package
*/
/*!
- \example declarative/layouts
- \title Layouts
+ \title Parallax
+ \example declarative/modelviews/parallax
*/
/*!
- \example declarative/listmodel-threaded
- \title ListModel Threaded
+ \title String ListModel
+ \example declarative/modelviews/stringlistmodel
*/
/*!
- \example declarative/listview
- \title ListView
+ \title WebView
+ \example declarative/modelviews/webview
*/
/*!
- \example declarative/mousearea
- \title Mouse Area
+ \title SQL Local Storage
+ \example declarative/sqllocalstorage
*/
/*!
- \example declarative/objectlistmodel
- \title Object ListModel
+ \title Fonts
+ \example declarative/text/fonts
*/
/*!
- \example declarative/package
- \title Package
+ \title Threaded ListModel
+ \example declarative/threading/threadedlistmodel
*/
/*!
- \example declarative/parallax
- \title Parallax
+ \title WorkerScript
+ \example declarative/threading/workerscript
*/
/*!
- \example declarative/plugins
- \title Plugins
+ \title Clocks
+ \example declarative/toys/clocks
+
+ This example shows how to create a Clock component and reuse it in a grid.
*/
/*!
- \example declarative/progressbar
- \title Progress Bars
+ \title Dial
+ \example declarative/toys/dial
+
+ This example shows how to implement a dial in QML.
*/
/*!
- \example declarative/proxywidgets
- \title Proxy Widgets
+ \title Dynamic
+ \example declarative/toys/dynamic
+
+ This example shows how to create dynamic objects QML.
*/
/*!
- \example declarative/scrollbar
- \title Scrollbar
+ \title Tic-Tac-Toe
+ \example declarative/toys/tic-tac-toe
*/
/*!
- \example declarative/searchbox
- \title Search Box
+ \title TV Tennis
+ \example declarative/toys/tvtennis
*/
/*!
- \example declarative/slideswitch
- \title Slide Switch
+ \title Velocity
+ \example declarative/toys/velocity
*/
/*!
- \example declarative/sql
- \title SQL
+ \title Gestures
+ \example declarative/touchinteraction/gestures
*/
/*!
- \example declarative/states
- \title States
+ \title Mouse Area
+ \example declarative/touchinteraction/mousearea
*/
/*!
- \example declarative/stringlistmodel
- \title String ListModel
+ \title Flipable
+ \example declarative/ui-components/flipable
+
+ This example shows how to use a Flipable element in QML.
*/
/*!
- \example declarative/tabwidget
- \title Tab Widget
+ \title Progress Bars
+ \example declarative/ui-components/progressbar
*/
/*!
- \example declarative/tic-tac-toe
- \title Tic-Tac-Toe
+ \title Scrollbar
+ \example declarative/ui-components/scrollbar
*/
/*!
- \example declarative/tvtennis
- \title TV Tennis
+ \title Search Box
+ \example declarative/ui-components/searchbox
*/
/*!
- \example declarative/velocity
- \title Velocity
+ \title Slide Switch
+ \example declarative/ui-components/slideswitch
*/
/*!
- \example declarative/webview
- \title WebView
+ \title Spinner
+ \example declarative/ui-components/spinner
*/
/*!
- \example declarative/workerscript
- \title WorkerScript
+ \title Tab Widget
+ \example declarative/ui-components/tabwidget
*/
/*!
- \example declarative/xmldata
\title XML Data
+ \example declarative/xml/xmldata
*/
/*!
- \example declarative/xmlhttprequest
\title XMLHttpRequest
+ \example declarative/xml/xmlhttprequest
*/
diff --git a/doc/src/files-and-resources/datastreamformat.qdoc b/doc/src/files-and-resources/datastreamformat.qdoc
index bab2c2c..c4be7bb 100644
--- a/doc/src/files-and-resources/datastreamformat.qdoc
+++ b/doc/src/files-and-resources/datastreamformat.qdoc
@@ -41,7 +41,8 @@
/*!
\page datastreamformat.html
- \title Format of the QDataStream Operators
+ \title Serializing Qt Data Types
+ \ingroup qt-network
\brief Representations of data types that can be serialized by QDataStream.
The \l QDataStream allows you to serialize some of the Qt data types.
diff --git a/doc/src/files-and-resources/resources.qdoc b/doc/src/files-and-resources/resources.qdoc
index 00646ac..83d74a3 100644
--- a/doc/src/files-and-resources/resources.qdoc
+++ b/doc/src/files-and-resources/resources.qdoc
@@ -54,6 +54,8 @@
/*!
\page resources.html
\title The Qt Resource System
+ \ingroup qt-network
+ \brief A platform-independent mechanism for storing binary files in an application.
\keyword resource system
diff --git a/doc/src/frameworks-technologies/accessible.qdoc b/doc/src/frameworks-technologies/accessible.qdoc
index 101d22a..0aff214 100644
--- a/doc/src/frameworks-technologies/accessible.qdoc
+++ b/doc/src/frameworks-technologies/accessible.qdoc
@@ -47,8 +47,10 @@
/*!
\page accessible.html
\title Accessibility
-
- \ingroup frameworks-technologies
+ \brief How to make your applications accessible to those with disabilities.
+
+ \ingroup technology-apis
+ \ingroup best-practices
\tableofcontents
diff --git a/doc/src/frameworks-technologies/activeqt-container.qdoc b/doc/src/frameworks-technologies/activeqt-container.qdoc
index c1c0947..03cfa8f 100644
--- a/doc/src/frameworks-technologies/activeqt-container.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-container.qdoc
@@ -41,10 +41,11 @@
/*!
\page activeqt-container.html
- \title Using ActiveX controls and COM objects in Qt
+ \title Using ActiveX controls and COM in Qt
+ \ingroup qt-activex
- \brief The QAxContainer module is a Windows-only extension for
- accessing ActiveX controls and COM objects.
+ \brief A Windows-only extension for accessing ActiveX controls and
+ COM objects.
The QAxContainer module is part of the \l ActiveQt framework. It
provides a library implementing a QWidget subclass, QAxWidget,
diff --git a/doc/src/frameworks-technologies/activeqt-server.qdoc b/doc/src/frameworks-technologies/activeqt-server.qdoc
index 4afcee1..900953a 100644
--- a/doc/src/frameworks-technologies/activeqt-server.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-server.qdoc
@@ -41,10 +41,10 @@
/*!
\page activeqt-server.html
- \title Building ActiveX servers and controls with Qt
+ \title Building ActiveX servers in Qt
+ \ingroup qt-activex
- \brief The QAxServer module is a Windows-only static library that
- you can use to turn a standard Qt binary into a COM server.
+ \brief A Windows-only static library for turning a Qt binary into a COM server.
The QAxServer module is part of the \l ActiveQt framework. It
consists of three classes:
diff --git a/doc/src/frameworks-technologies/activeqt.qdoc b/doc/src/frameworks-technologies/activeqt.qdoc
index b752122..6f4ec30 100644
--- a/doc/src/frameworks-technologies/activeqt.qdoc
+++ b/doc/src/frameworks-technologies/activeqt.qdoc
@@ -53,11 +53,10 @@
/*!
\page activeqt.html
- \title ActiveQt Framework
+ \title Qt's ActiveX Framework (ActiveQt)
\brief An overview of Qt's ActiveX and COM integration on Windows.
- \ingroup platform-specific
- \ingroup frameworks-technologies
+ \ingroup qt-activex
\keyword ActiveQt
Qt's ActiveX and COM support allows Qt for Windows developers to:
diff --git a/doc/src/frameworks-technologies/animation.qdoc b/doc/src/frameworks-technologies/animation.qdoc
index 5548b57..dc705ba 100644
--- a/doc/src/frameworks-technologies/animation.qdoc
+++ b/doc/src/frameworks-technologies/animation.qdoc
@@ -47,6 +47,7 @@
/*!
\page animation-overview.html
\title The Animation Framework
+ \ingroup qt-gui-concepts
\brief An overview of the Animation Framework
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index 505b65c..5b184fa 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -58,7 +58,7 @@
/*!
\page containers.html
\title Generic Containers
- \ingroup frameworks-technologies
+ \ingroup technology-apis
\ingroup groups
\keyword container class
\keyword container classes
diff --git a/doc/src/frameworks-technologies/dbus-adaptors.qdoc b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
index 5fc7a79..3dd0e4d 100644
--- a/doc/src/frameworks-technologies/dbus-adaptors.qdoc
+++ b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
@@ -42,7 +42,9 @@
/*!
\page usingadaptors.html
\title Using QtDBus Adaptors
+ \brief How to create and use DBus adaptors in Qt.
+ \ingroup technology-apis
\ingroup best-practices
Adaptors are special classes that are attached to any QObject-derived class
diff --git a/doc/src/frameworks-technologies/dbus-intro.qdoc b/doc/src/frameworks-technologies/dbus-intro.qdoc
index 1fe2ed2..10726e5 100644
--- a/doc/src/frameworks-technologies/dbus-intro.qdoc
+++ b/doc/src/frameworks-technologies/dbus-intro.qdoc
@@ -45,7 +45,7 @@
\brief An introduction to Inter-Process Communication and Remote Procedure Calling with D-Bus.
\keyword QtDBus
- \ingroup frameworks-technologies
+ \ingroup technology-apis
\section1 Introduction
diff --git a/doc/src/frameworks-technologies/desktop-integration.qdoc b/doc/src/frameworks-technologies/desktop-integration.qdoc
index 7f01ae3..59b2570 100644
--- a/doc/src/frameworks-technologies/desktop-integration.qdoc
+++ b/doc/src/frameworks-technologies/desktop-integration.qdoc
@@ -40,16 +40,12 @@
****************************************************************************/
/*!
- \group desktop
- \title Desktop Integration Classes
-*/
-
-/*!
\page desktop-integration.html
\title Desktop Integration
\brief Integrating with the user's desktop environment.
\ingroup best-practices
+ \ingroup qt-gui-concepts
Qt applications behave well in the user's desktop environment, but certain
integrations require additional, and sometimes platform specific, techniques.
diff --git a/doc/src/frameworks-technologies/dnd.qdoc b/doc/src/frameworks-technologies/dnd.qdoc
index 49468de..0e952ad 100644
--- a/doc/src/frameworks-technologies/dnd.qdoc
+++ b/doc/src/frameworks-technologies/dnd.qdoc
@@ -40,18 +40,12 @@
****************************************************************************/
/*!
- \group draganddrop
- \title Drag And Drop Classes
-
- \brief Classes dealing with drag and drop and mime type encoding and decoding.
-*/
-
-/*!
\page dnd.html
\title Drag and Drop
\brief An overview of the drag and drop system provided by Qt.
- \ingroup frameworks-technologies
+ \ingroup technology-apis
+ \ingroup qt-gui-concepts
Drag and drop provides a simple visual mechanism which users can use
to transfer information between and within applications. (In the
diff --git a/doc/src/frameworks-technologies/eventsandfilters.qdoc b/doc/src/frameworks-technologies/eventsandfilters.qdoc
index 96ee18c..0cd60b8 100644
--- a/doc/src/frameworks-technologies/eventsandfilters.qdoc
+++ b/doc/src/frameworks-technologies/eventsandfilters.qdoc
@@ -54,7 +54,8 @@
/*!
\page eventsandfilters.html
- \title Events and Event Filters
+ \title The Event System
+ \ingroup qt-basic-concepts
\brief A guide to event handling in Qt.
\ingroup frameworks-technologies
diff --git a/doc/src/frameworks-technologies/gestures.qdoc b/doc/src/frameworks-technologies/gestures.qdoc
index 1b395b0..c999fa6 100644
--- a/doc/src/frameworks-technologies/gestures.qdoc
+++ b/doc/src/frameworks-technologies/gestures.qdoc
@@ -42,12 +42,13 @@
/*!
\page gestures-overview.html
\title Gestures Programming
- \ingroup frameworks-technologies
\startpage index.html Qt Reference Documentation
+ \ingroup technology-apis
+ \ingroup qt-gui-concepts
- \brief An overview of the Qt support for Gesture programming.
+ \brief An overview of Qt support for Gesture programming.
- Qt includes a framework for gesture programming that gives has the ability
+ Qt includes a framework for gesture programming that has the ability
to form gestures from a series of events, independently of the input methods
used. A gesture could be a particular movement of a mouse, a touch screen
action, or a series of events from some other source. The nature of the input,
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index 6844aed..681568e 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -46,12 +46,11 @@
/*!
\page graphicsview.html
- \title The Graphics View Framework
+ \title Graphics View Framework
+ \ingroup qt-graphics
\brief An overview of the Graphics View framework for interactive 2D
graphics.
- \ingroup frameworks-technologies
-
\keyword Graphics View
\keyword GraphicsView
\keyword Graphics
diff --git a/doc/src/frameworks-technologies/implicit-sharing.qdoc b/doc/src/frameworks-technologies/implicit-sharing.qdoc
index e4d6f65..f42ec93 100644
--- a/doc/src/frameworks-technologies/implicit-sharing.qdoc
+++ b/doc/src/frameworks-technologies/implicit-sharing.qdoc
@@ -50,7 +50,7 @@
/*!
\page implicit-sharing.html
\title Implicit Sharing
- \ingroup frameworks-technologies
+ \ingroup qt-basic-concepts
\brief Reference counting for fast copying.
diff --git a/doc/src/frameworks-technologies/ipc.qdoc b/doc/src/frameworks-technologies/ipc.qdoc
index 18a9455..5139f04 100644
--- a/doc/src/frameworks-technologies/ipc.qdoc
+++ b/doc/src/frameworks-technologies/ipc.qdoc
@@ -44,7 +44,8 @@
\title Inter-Process Communication in Qt
\brief Inter-Process communication in Qt applications.
- \ingroup frameworks-technologies
+ \ingroup technology-apis
+ \ingout qt-network
Qt provides several ways to implement Inter-Process Communication
(IPC) in Qt applications.
diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc
index 2d035c7..61b906e 100644
--- a/doc/src/frameworks-technologies/phonon.qdoc
+++ b/doc/src/frameworks-technologies/phonon.qdoc
@@ -41,8 +41,10 @@
/*!
\page phonon-overview.html
- \title Phonon Overview
- \ingroup frameworks-technologies
+ \title Phonon multimedia framework
+ \brief Using the Phonon multimedia framework in Qt.
+ \ingroup technology-apis
+ \ingroup best-practices
\tableofcontents
diff --git a/doc/src/frameworks-technologies/threads.qdoc b/doc/src/frameworks-technologies/threads.qdoc
index fd6bebb..f7dde59 100644
--- a/doc/src/frameworks-technologies/threads.qdoc
+++ b/doc/src/frameworks-technologies/threads.qdoc
@@ -47,6 +47,7 @@
/*!
\page threads.html
\title Thread Support in Qt
+ \ingroup qt-basic-concepts
\brief A detailed discussion of thread handling in Qt.
\ingroup frameworks-technologies
diff --git a/doc/src/frameworks-technologies/unicode.qdoc b/doc/src/frameworks-technologies/unicode.qdoc
index 8fa168a..88393a0 100644
--- a/doc/src/frameworks-technologies/unicode.qdoc
+++ b/doc/src/frameworks-technologies/unicode.qdoc
@@ -58,7 +58,7 @@
\keyword Unicode
- \ingroup frameworks-technologies
+ \ingroup technology-apis
Unicode is a multi-byte character set, portable across all major
computing platforms and with decent coverage over most of the world.
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index 6974634..f8c70fe 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -53,15 +53,14 @@
\l{Qt Examples} and are used to highlight certain features of
Qt.
- \table 50%
+ \table
\header
\o {2,1} Getting an Overview
\row
\o \inlineimage qtdemo-small.png
- \o
- If you run the \l{Examples and Demos Launcher}, you'll see many of Qt's
+ \o If you run the \l{Examples and Demos Launcher}, you'll see many of Qt's
widgets in action.
-
+
The \l{Qt Widget Gallery} also provides overviews of selected Qt
widgets in each of the styles used on various supported platforms.
\endtable
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index 542f672..2e7f47e 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -50,6 +50,39 @@
*/
/*!
+ \group all-examples
+ \title Qt Examples
+
+ Qt includes a set of examples that cover nearly every aspect of Qt
+ development. They aren't meant to be impressive when you run them,
+ but in each case the source code has been carefully written to
+ illustrate one or more best Qt programming practices.
+
+ You can run the examples from the \l{Examples and Demos Launcher}
+ application (except see \l{QML Examples and Demos} {QML Examples}
+ for special instructions for running thos examples).
+
+ The examples are listed below by functional area. Each example
+ listed in a particular functional area is meant to illustrate how
+ best to use Qt to do some particular task in that functional area,
+ but the examples will often use features from other functional
+ areas as well for completeness.
+
+ If you are new to Qt, you should probably start by going through
+ the \l{Tutorials}, and then begin with the
+ \l{mainwindows/application} {Application} example.
+
+ In addition to these examples and the \l{Tutorials}{tutorials}, 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 Examples by functional area
+
+ \generatelist{related}
+*/
+
+/*!
\page examples.html
\title Qt Examples
\brief The example programs provided with Qt.
@@ -461,6 +494,8 @@
/*!
\page examples-widgets.html
\title Widgets Examples
+ \ingroup all-examples
+ \brief Lots of examples of how to use different kinds of widgets.
\contentspage Qt Examples
\nextpage Dialog Examples
@@ -509,7 +544,9 @@
/*!
\page examples-dialogs.html
+ \ingroup all-examples
\title Dialog Examples
+ \brief Using Qt's standard dialogs and building and using custom dialogs.
\previouspage Widgets Examples
\contentspage Qt Examples
@@ -539,7 +576,9 @@
/*!
\page examples-mainwindow.html
+ \ingroup all-examples
\title Main Window Examples
+ \building applications around a main window.
\previouspage Dialog Examples
\contentspage Qt Examples
@@ -567,7 +606,9 @@
/*!
\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
@@ -594,7 +635,9 @@
/*!
\page examples-itemviews.html
+ \ingroup all-examples
\title Item Views Examples
+ \brief Using the model/view design pattern to separate presentation from data.
\previouspage Layout Examples
\contentspage Qt Examples
@@ -632,7 +675,9 @@
/*!
\page examples-graphicsview.html
+ \ingroup all-examples
\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
@@ -651,6 +696,7 @@
\o \l{graphicsview/diagramscene}{Diagram Scene}\raisedaster
\o \l{graphicsview/dragdroprobot}{Drag and Drop Robot}\raisedaster
\o \l{graphicsview/elasticnodes}{Elastic Nodes}\raisedaster
+ \o \l{graphicsview/padnavigator}{Pad Navigator}\raisedaster
\o \l{graphicsview/portedasteroids}{Ported Asteroids}
\o \l{graphicsview/portedcanvas}{Ported Canvas}
\endlist
@@ -677,6 +723,7 @@
/*!
\page examples-painting.html
+ \ingroup all-examples
\title Painting Examples
\previouspage QML Examples and Demos
@@ -709,6 +756,7 @@
/*!
\page examples-richtext.html
+ \ingroup all-examples
\title Rich Text Examples
\previouspage Painting Examples
@@ -732,6 +780,7 @@
/*!
\page examples-desktop.html
+ \ingroup all-examples
\title Desktop Examples
\previouspage Rich Text Examples
@@ -755,6 +804,7 @@
/*!
\page examples-draganddrop.html
+ \ingroup all-examples
\title Drag and Drop Examples
\previouspage Desktop Examples
@@ -783,6 +833,7 @@
/*!
\page examples-threadandconcurrent.html
+ \ingroup all-examples
\title Threading and Concurrent Programming Examples
\previouspage Drag and Drop Examples
@@ -823,6 +874,7 @@
/*!
\page examples.tools.html
+ \ingroup all-examples
\title Tools Examples
\previouspage Threading and Concurrent Programming Examples
@@ -861,6 +913,7 @@
/*!
\page examples-network.html
+ \ingroup all-examples
\title Network Examples
\previouspage Tools Examples
@@ -899,6 +952,7 @@
/*!
\page examples-ipc.html
+ \ingroup all-examples
\title Inter-Process Communication Examples
\previouspage Network Examples
@@ -916,6 +970,7 @@
/*!
\page examples-opengl.html
+ \ingroup all-examples
\title OpenGL Examples
\previouspage Inter-Process Communication Examples
@@ -950,6 +1005,7 @@
/*!
\page examples-openvg.html
+ \ingroup all-examples
\title OpenVG Examples
\previouspage OpenGL Examples
@@ -971,6 +1027,7 @@
/*!
\page examples-multimedia.html
+ \ingroup all-examples
\title Multimedia Examples
\previouspage OpenGL Examples
@@ -1020,6 +1077,7 @@
/*!
\page examples-sql.html
+ \ingroup all-examples
\title SQL Examples
\previouspage Multimedia Examples
@@ -1049,6 +1107,7 @@
/*!
\page examples-xml.html
+ \ingroup all-examples
\title XML Examples
\previouspage SQL Examples
@@ -1085,6 +1144,7 @@
/*!
\page examples-designer.html
+ \ingroup all-examples
\title Qt Designer Examples
\previouspage XML Examples
@@ -1110,6 +1170,7 @@
/*!
\page examples-uitools.html
+ \ingroup all-examples
\title UiTools Examples
\previouspage Qt Designer Examples
@@ -1126,6 +1187,7 @@
/*!
\page examples-linguist.html
+ \ingroup all-examples
\title Qt Linguist Examples
\previouspage UiTools Examples
@@ -1146,6 +1208,7 @@
/*!
\page examples-script.html
+ \ingroup all-examples
\title Qt Script Examples
\previouspage Qt Linguist Examples
@@ -1175,6 +1238,7 @@
/*!
\page examples-webkit.html
+ \ingroup all-examples
\title WebKit Examples
\previouspage Qt Script Examples
@@ -1215,7 +1279,8 @@
*/
/*!
- \page examples-helpsystem.html
+ \page examples-helpsystem.html
+ \ingroup all-examples
\title Help System Examples
\previouspage WebKit Examples
@@ -1239,6 +1304,7 @@
/*!
\page examples-statemachine.html
+ \ingroup all-examples
\title State Machine Examples
\previouspage Help System Examples
@@ -1265,6 +1331,7 @@
/*!
\page examples-animation.html
+ \ingroup all-examples
\title Animation Framework Examples
\previouspage State Machine Examples
@@ -1287,6 +1354,7 @@
/*!
\page examples-multitouch.html
+ \ingroup all-examples
\title Multi-Touch Examples
\previouspage Animation Framework Examples
@@ -1306,6 +1374,7 @@
/*!
\page examples-gestures.html
+ \ingroup all-examples
\title Gestures Examples
\previouspage Multi-Touch Examples
@@ -1322,6 +1391,7 @@
/*!
\page examples-dbus.html
+ \ingroup all-examples
\title D-Bus Examples
\previouspage Gestures Examples
@@ -1341,6 +1411,7 @@
/*!
\page examples-embeddedlinux.html
+ \ingroup all-examples
\title Qt for Embedded Linux Examples
\previouspage D-Bus Examples
@@ -1363,6 +1434,7 @@
/*!
\page examples-activeqt.html
+ \ingroup all-examples
\title ActiveQt Examples
\previouspage Qt for Embedded Linux Examples
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 3ea351e..36abc10 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -703,21 +703,19 @@ If you are using pre-built binaries, follow the instructions given in the
\ingroup qtsymbian
\brief How to install Qt on the Symbian platform using Linux.
-\note Qt for the Symbian platform has some requirements that are given in more detail
-in the \l{Qt for the Symbian platform Requirements} document. TODO list requirements like SDK here.
-
\note \bold {This document describes how to install and configure Qt for
the Symbian platform from scratch, using Linux as the build host.
-Qt does not come with a binary package for Linux yet, but if you want to avoid
-the full build of Qt and start developing applications right away, you can
-download drop-in binaries from here: TODO}
+Qt for Symbian binaries can be downloaded directly so development of
+applications using Qt for Symbian can start right away.}
\list 1
\o Setup the development environment
- TODO Make sure your Symbian development environment is correctly installed and
- patched as explained in the \l{Qt for the Symbian platform Requirements} document.
+ \note Qt for the Symbian platform has some requirements on the development
+ platform. The Symbian SDK for Linux as well as a cross compiler for the ARM
+ processor used on Symbian devices should be present on the development machine.
+ See {http://qt.gitorious.org/qt/pages/QtCreatorSymbianLinux} for more details.
\o Install Qt
@@ -770,7 +768,7 @@ download drop-in binaries from here: TODO}
The Qt libraries are built with "All -Tcb" capability, so that
they can support all types of applications. However, these
- capabilities are automatically lowered if you make a selfsigned
+ capabilities are automatically lowered if you make a self-signed
package.
\o Building a Qt package with a Symbian developer certificate
@@ -826,7 +824,7 @@ download drop-in binaries from here: TODO}
Note the identifier on the line where your Symbian device
appears. Then execute the following, using the first and
- second part of the identifier in place of \c XXXX,
+ second part of the identifier in place of \c XXX,
respectively.
\snippet doc/src/snippets/code/doc_src_installation.qdoc 44
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index b73e15d..cedebf9 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -41,15 +41,15 @@
/*!
\page known-issues.html
- \title Known Issues in %VERSION%
+ \title Known Issues in this Qt Version
\ingroup platform-specific
- \brief A summary of known issues in Qt %VERSION% at the time of release.
+ \brief A summary of known issues in this Qt version at the time of release.
- An up-to-date list of known issues with Qt %VERSION% can be found via the
+ An up-to-date list of known issues can be found at
\l{http://bugreports.qt.nokia.com/}{Qt Bug Tracker}.
- For a list list of known bugs in Qt %VERSION%, see the \l{Task Tracker}
- on the Qt website.
+ For a list list of known bugs, see the \l{Task Tracker} at the Qt
+ website.
An overview of known issues may also be found at:
\l{http://qt.gitorious.org/qt/pages/QtKnownIssues}
diff --git a/doc/src/howtos/HWacceleration.qdoc b/doc/src/howtos/HWacceleration.qdoc
index fbc657c..c7b1a72 100644
--- a/doc/src/howtos/HWacceleration.qdoc
+++ b/doc/src/howtos/HWacceleration.qdoc
@@ -41,17 +41,20 @@
/*!
\page HWAcc_rendering.html
- \title Using hardware acceleration on embedded platforms.
+ \title Hardware Acceleration &amp Embedded Platforms.
+ \brief How to use hardware acceleration for fast rendering.
\ingroup best-practices
\section1 Abstract
+
This document describes how to use hardware acceleration for fast
- rendering on embedded platforms supported by Qt. In short, it explains
- how the graphics pipeline works. Since there might be differences to
- how the APIs are being used on different embedded platforms, a table
- links to documentation dedicated to platform specific documentation
- for each supported hardware acceleration API.
+ rendering on embedded platforms supported by Qt. In short, it
+ explains how the graphics pipeline works. Since there might be
+ differences to how the APIs are being used on different embedded
+ platforms, a table links to documentation dedicated to platform
+ specific documentation for each supported hardware acceleration
+ API.
\input platforms/emb-hardwareacceleration.qdocinc
diff --git a/doc/src/howtos/accelerators.qdoc b/doc/src/howtos/accelerators.qdoc
index 65f1def..b6ef5c2 100644
--- a/doc/src/howtos/accelerators.qdoc
+++ b/doc/src/howtos/accelerators.qdoc
@@ -42,6 +42,7 @@
/*!
\page accelerators.html
\title Standard Accelerator Keys
+ \brief Recommended accelerator keys.
\ingroup best-practices
diff --git a/doc/src/howtos/appicon.qdoc b/doc/src/howtos/appicon.qdoc
index dd39509..9377961 100644
--- a/doc/src/howtos/appicon.qdoc
+++ b/doc/src/howtos/appicon.qdoc
@@ -42,6 +42,7 @@
/*!
\page appicon.html
\title Setting the Application Icon
+ \brief How to set your application's icon.
\ingroup best-practices
diff --git a/doc/src/howtos/guibooks.qdoc b/doc/src/howtos/guibooks.qdoc
index 1a70670..bccfbe6 100644
--- a/doc/src/howtos/guibooks.qdoc
+++ b/doc/src/howtos/guibooks.qdoc
@@ -43,6 +43,7 @@
\page guibooks.html
\title Books about GUI Design
\ingroup best-practices
+ \brief Some recommended books about GUI design.
This is not a comprehensive list -- there are many other books worth
buying. Here we mention just a few user interface books that don't
diff --git a/doc/src/howtos/qtdesigner.qdoc b/doc/src/howtos/qtdesigner.qdoc
index 2dd7fcf..92041f0 100644
--- a/doc/src/howtos/qtdesigner.qdoc
+++ b/doc/src/howtos/qtdesigner.qdoc
@@ -42,6 +42,7 @@
/*!
\page qtdesigner-components.html
\title Creating and Using Components for Qt Designer
+ \brief How to create and use custom widget plugins.
\ingroup best-practices
\tableofcontents
diff --git a/doc/src/howtos/restoring-geometry.qdoc b/doc/src/howtos/restoring-geometry.qdoc
index 36c5e4f..e72b993 100644
--- a/doc/src/howtos/restoring-geometry.qdoc
+++ b/doc/src/howtos/restoring-geometry.qdoc
@@ -42,7 +42,7 @@
/*!
\page restoring-geometry.html
\title Restoring a Window's Geometry
-
+ \brief How to save &amp restore window geometry.
\ingroup best-practices
This document describes how to save and restore a \l{Window
diff --git a/doc/src/howtos/session.qdoc b/doc/src/howtos/session.qdoc
index e2e87a8..f53af04 100644
--- a/doc/src/howtos/session.qdoc
+++ b/doc/src/howtos/session.qdoc
@@ -42,7 +42,7 @@
/*!
\page session.html
\title Session Management
-
+ \brief How to do session management with Qt.
\ingroup best-practices
A \e session is a group of running applications, each of which has a
diff --git a/doc/src/howtos/sharedlibrary.qdoc b/doc/src/howtos/sharedlibrary.qdoc
index 70fc4db..ed803ed 100644
--- a/doc/src/howtos/sharedlibrary.qdoc
+++ b/doc/src/howtos/sharedlibrary.qdoc
@@ -42,7 +42,7 @@
/*!
\page sharedlibrary.html
\title Creating Shared Libraries
-
+ \brief How to create shared libraries.
\ingroup best-practices
The following sections list certain things that should be taken into
diff --git a/doc/src/howtos/timers.qdoc b/doc/src/howtos/timers.qdoc
index cfc2fb4..b001916 100644
--- a/doc/src/howtos/timers.qdoc
+++ b/doc/src/howtos/timers.qdoc
@@ -42,7 +42,7 @@
/*!
\page timers.html
\title Timers
- \brief How to use timers in your application.
+ \brief How to use Qt timers in your application.
\ingroup best-practices
diff --git a/doc/src/images/declarative-image_fillMode.gif b/doc/src/images/declarative-image_fillMode.gif
deleted file mode 100644
index eb0a9af..0000000
--- a/doc/src/images/declarative-image_fillMode.gif
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-integrating-graphicswidgets.png b/doc/src/images/declarative-integrating-graphicswidgets.png
deleted file mode 100644
index d57f4b9..0000000
--- a/doc/src/images/declarative-integrating-graphicswidgets.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-preserveaspectcrop.png b/doc/src/images/declarative-qtlogo-preserveaspectcrop.png
new file mode 100644
index 0000000..64fb086
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-preserveaspectcrop.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-preserveaspectfit.png b/doc/src/images/declarative-qtlogo-preserveaspectfit.png
new file mode 100644
index 0000000..2585fa5
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-preserveaspectfit.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-stretch.png b/doc/src/images/declarative-qtlogo-stretch.png
new file mode 100644
index 0000000..32a0114
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-stretch.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-tile.png b/doc/src/images/declarative-qtlogo-tile.png
new file mode 100644
index 0000000..7d1b9d0
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-tile.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-tilehorizontally.png b/doc/src/images/declarative-qtlogo-tilehorizontally.png
new file mode 100644
index 0000000..367a8c7
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-tilehorizontally.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo-tilevertically.png b/doc/src/images/declarative-qtlogo-tilevertically.png
new file mode 100644
index 0000000..68afafa
--- /dev/null
+++ b/doc/src/images/declarative-qtlogo-tilevertically.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo1.png b/doc/src/images/declarative-qtlogo.png
index 940d159..940d159 100644
--- a/doc/src/images/declarative-qtlogo1.png
+++ b/doc/src/images/declarative-qtlogo.png
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo2.png b/doc/src/images/declarative-qtlogo2.png
deleted file mode 100644
index b1d128a..0000000
--- a/doc/src/images/declarative-qtlogo2.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo3.png b/doc/src/images/declarative-qtlogo3.png
deleted file mode 100644
index d516524..0000000
--- a/doc/src/images/declarative-qtlogo3.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo4.png b/doc/src/images/declarative-qtlogo4.png
deleted file mode 100644
index 7c8aa64..0000000
--- a/doc/src/images/declarative-qtlogo4.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo5.png b/doc/src/images/declarative-qtlogo5.png
deleted file mode 100644
index b7b3513..0000000
--- a/doc/src/images/declarative-qtlogo5.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/declarative-qtlogo6.png b/doc/src/images/declarative-qtlogo6.png
deleted file mode 100644
index 07a078f..0000000
--- a/doc/src/images/declarative-qtlogo6.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/multitouch-fingerpaint-example.png b/doc/src/images/multitouch-fingerpaint-example.png
new file mode 100644
index 0000000..c741b65
--- /dev/null
+++ b/doc/src/images/multitouch-fingerpaint-example.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index 2e6f9bd..b759435 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -44,16 +44,15 @@
\keyword Qt Reference Documentation
\raw HTML
- <div class="indexbox" >
+ <div class="indexbox guide" >
<div class="heading">
Qt Developer Guide</div>
<div class="indexboxcont indexboxbar">
- <div class="section indexIcon">
- <img src="images/qt_guide.png" alt="" /></div>
+ <div class="section indexIcon"><span></span></div>
<div class="section">
<p>Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code.</p>
</div>
- <div class="section sectionlist lastcol">
+ <div class="section sectionlist">
<ul>
<li><a href="">Getting started</a></li>
<li><a href="installation.html">Installation &amp; first steps</a></li>
@@ -65,50 +64,50 @@
</div>
</div>
</div>
- <div class="indexbox">
+ <div class="indexbox api">
<div class="heading">
Qt API Overviews</div>
- <div class="indexboxcont indexboxbar tricol">
- <div class="sectionlist">
+ <div class="indexboxcont indexboxbar ">
+ <div class="sectionlist tricol">
<ul>
- <li><a href="modules.html">All modules</a></li>
- <li><a href="classes.html">All classes</a></li>
- <li><a href="namespaces.html">All namespaces</a></li>
- <li><a href="functions.html">All functions</a></li>
- <li><a href="platform-specific.html">Platform support &amp; specifics</a></li>
+ <li><a href="classes.html">Class index</a></li>
+ <li><a href="functions.html">Function index</a></li>
+ <li><a href="modules.html">Modules</a></li>
+ <li><a href="namespaces.html">Namespaces</a></li>
+ <li><a href="qtglobal.html">Global stuff</a></li>
+ <li><a href="qdeclarativeelements.html">QML elements</a></li>
</ul>
</div>
- <div class="sectionlist">
+ <div class="sectionlist tricol">
<ul>
- <li><a href="object.html">QObject model</a></li>
- <li><a href="application-windows.html">Window architecture</a></li>
- <li><a href="widgets-and-layouts.html">Styles &amp; layout</a></li>
- <li><a href="eventsandfilters.html">Event handling</a></li>
- <li><a href="paintsystem.html">Paint system</a></li>
+ <li><a href="qt-basic-concepts.html">Basic Qt Architecture</a></li>
+ <li><a href="declarativeui.html">Device UI's &amp; Qt Quick</a></li>
+ <li><a href="qt-gui-concepts.html">Desktop UI components</a></li>
+ <li><a href="platform-specific.html">Platform-specific info</a></li>
+ <li><a href="qt-graphics.html">Graphics, Painting &amp Printing</a></li>
+ <li><a href="qt-network.html">Input/Output &amp networking</a></li>
</ul>
</div>
- <div class="lastcol">
+ <div class="sectionlist">
<ul>
- <li><a href="graphicsview.html">Canvas UI with Graphics View</a></li>
- <li><a href="declarativeui.html">UI design &amp; Qt Quick</a></li>
- <li><a href="io.html">Input/output</a></li>
- <li><a href="webintegration.html">Integrating Web Content</a></li>
- <li><a href="developing-with-qt.html">X-platform, debug &amp; deploy</a></li>
+ <li><a href="model-view-programming.html">Model/View programming</a></li>
+ <li><a href="technology-apis.html">Qt API's for other technologies</a></li>
+ <li><a href="best-practices.html">Qt How-to's &amp best practices</a></li>
+ <li><a href="developing-with-qt.html">Cross-platform development</a></li>
</ul>
</div>
</div>
</div>
- <div class="indexbox">
+ <div class="indexbox tools">
<div class="heading">
Qt Tools</div>
<div class="indexboxcont">
- <div class="section indexIcon">
- <img src="images/qt_tools.png" alt="" /></div>
+ <div class="section indexIcon"><span></span></div>
<div class="section">
<p>Qt offers a selection of development tools for different tasks. Use Qt Creator for
project and code management as well as building powerfull UIs.</p>
</div>
- <div class="section sectionlist lastcol">
+ <div class="section sectionlist">
<ul>
<li><a href="http://doc.qt.nokia.com/qtcreator-1.3/index.html">Qt Creator</a></li>
<li><a href="designer-manual.html">Qt Designer</a></li>
@@ -118,9 +117,8 @@
<li><a href="qvfb.html">Virtual Framebuffer</a></li>
</ul>
</div>
- </div>
- </div>
-
+ </div>
+ </div>
\endraw
*/
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 1ab1c00..2c0744b 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -41,7 +41,7 @@
/*!
\group modules
- \title All Qt Modules
+ \title All Modules
\startpage index.html Qt Reference Documentation
\nextpage QtCore
@@ -96,8 +96,8 @@
/*!
\module QtCore
\title QtCore Module
- \contentspage All Qt Modules
- \previouspage All Qt Modules
+ \contentspage All Modules
+ \previouspage All Modules
\nextpage QtGui
\ingroup modules
@@ -115,7 +115,7 @@
/*!
\module QtGui
\title QtGui Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtCore
\nextpage QtNetwork
\ingroup modules
@@ -132,7 +132,7 @@
\module QtMultimedia
\page qtmultimedia-module.html
\title QtMultimedia Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtCore
\nextpage QtNetwork
\ingroup modules
@@ -156,7 +156,7 @@
/*!
\module QtNetwork
\title QtNetwork Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtMultimedia
\nextpage QtOpenGL
\ingroup modules
@@ -178,7 +178,7 @@
/*!
\module QtOpenGL
\title QtOpenGL Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtNetwork
\nextpage QtOpenVG
\ingroup modules
@@ -231,7 +231,7 @@
\module QtOpenVG
\title QtOpenVG Module
\since 4.6
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtOpenGL
\nextpage QtScript
\ingroup modules
@@ -286,7 +286,7 @@
\module QtScript
\title QtScript Module
\since 4.3
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtOpenVG
\nextpage QtScriptTools
\ingroup modules
@@ -346,7 +346,7 @@
\module QtScriptTools
\title QtScriptTools Module
\since 4.5
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtScript
\nextpage QtSql
\ingroup modules
@@ -370,7 +370,7 @@
/*!
\module QtSql
\title QtSql Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtScript
\nextpage QtSvg
\ingroup modules
@@ -393,7 +393,7 @@
\module QtSvg
\title QtSvg Module
\since 4.1
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtSql
\nextpage QtWebKit
\ingroup modules
@@ -444,7 +444,7 @@
/*!
\module QtXml
\title QtXml Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtSvg
\nextpage QtXmlPatterns
\ingroup modules
@@ -471,7 +471,7 @@
\module QtXmlPatterns
\title QtXmlPatterns Module
\since 4.4
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtXml
\nextpage Phonon Module
\ingroup modules
@@ -551,7 +551,7 @@
\page phonon-module.html
\module Phonon
\title Phonon Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtXmlPatterns
\nextpage Qt3Support
\ingroup modules
@@ -621,7 +621,7 @@
/*!
\module Qt3Support
\title Qt3Support Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage Phonon Module
\nextpage QtDesigner
\ingroup modules
@@ -654,7 +654,7 @@
/*!
\module QtDesigner
\title QtDesigner Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage Qt3Support
\nextpage QtUiTools
\ingroup modules
@@ -681,7 +681,7 @@
\module QtUiTools
\title QtUiTools Module
\since 4.1
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtDesigner
\nextpage QtHelp
\ingroup modules
@@ -717,7 +717,7 @@
/*!
\module QtHelp
\title QtHelp Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtUiTools
\nextpage QtTest
\ingroup modules
@@ -776,7 +776,7 @@
/*!
\module QtTest
\title QtTest Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtHelp
\nextpage QAxContainer
\ingroup modules
@@ -806,7 +806,7 @@
/*!
\module QAxContainer
\title QAxContainer Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QtTest
\nextpage QAxServer
\ingroup modules
@@ -858,7 +858,7 @@
/*!
\module QAxServer
\title QAxServer Module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QAxContainer
\nextpage QtDBus module
\ingroup modules
@@ -910,7 +910,7 @@
/*!
\module QtDBus
\title QtDBus module
- \contentspage All Qt Modules
+ \contentspage All Modules
\previouspage QAxServer
\ingroup modules
diff --git a/doc/src/network-programming/bearermanagement.qdoc b/doc/src/network-programming/bearermanagement.qdoc
index 10d697a..b10481e 100644
--- a/doc/src/network-programming/bearermanagement.qdoc
+++ b/doc/src/network-programming/bearermanagement.qdoc
@@ -40,12 +40,11 @@
****************************************************************************/
/*!
-\page bearer-management.html
+ \page bearer-management.html
-\title Bearer Management
-\brief An API to control the system's connectivity state.
-
-\ingroup network
+ \title Bearer Management
+ \ingroup qt-network
+ \brief An API to control the system's connectivity state.
Bearer Management controls the connectivity state of the system so that
the user can start or stop interfaces or roam transparently between
diff --git a/doc/src/network-programming/qtnetwork.qdoc b/doc/src/network-programming/qtnetwork.qdoc
index 36f48cf..9134809 100644
--- a/doc/src/network-programming/qtnetwork.qdoc
+++ b/doc/src/network-programming/qtnetwork.qdoc
@@ -50,6 +50,7 @@
/*!
\page network-programming.html
\title Network Programming
+ \ingroup qt-network
\brief An Introduction to Network Programming with Qt
The QtNetwork module offers classes that allow you to write TCP/IP clients
diff --git a/doc/src/network-programming/ssl.qdoc b/doc/src/network-programming/ssl.qdoc
index 2feb7b6..7f365a9 100644
--- a/doc/src/network-programming/ssl.qdoc
+++ b/doc/src/network-programming/ssl.qdoc
@@ -40,11 +40,11 @@
****************************************************************************/
/*!
- \group ssl
+ \page ssl.html
\title Secure Sockets Layer (SSL) Classes
- \ingroup groups
-
\brief Classes for secure communication over network sockets.
+ \ingroup qt-network
+
\keyword SSL
The classes below provide support for secure network communication using
diff --git a/doc/src/objectmodel/metaobjects.qdoc b/doc/src/objectmodel/metaobjects.qdoc
index c1b0ea6..e891183 100644
--- a/doc/src/objectmodel/metaobjects.qdoc
+++ b/doc/src/objectmodel/metaobjects.qdoc
@@ -41,7 +41,8 @@
/*!
\page metaobjects.html
- \title Meta-Object System
+ \title The Meta-Object System
+ \ingroup qt-basic-concepts
\brief An overview of Qt's meta-object system and introspection capabilities.
\keyword meta-object
diff --git a/doc/src/objectmodel/object.qdoc b/doc/src/objectmodel/object.qdoc
index 2f06004..e0ba6ed 100644
--- a/doc/src/objectmodel/object.qdoc
+++ b/doc/src/objectmodel/object.qdoc
@@ -41,7 +41,8 @@
/*!
\page object.html
- \title Qt Object Model
+ \title Object Model
+ \ingroup qt-basic-concepts
\brief A description of the powerful features made possible by Qt's dynamic object model.
\ingroup frameworks-technologies
diff --git a/doc/src/objectmodel/objecttrees.qdoc b/doc/src/objectmodel/objecttrees.qdoc
index 11824ae..97d646a 100644
--- a/doc/src/objectmodel/objecttrees.qdoc
+++ b/doc/src/objectmodel/objecttrees.qdoc
@@ -41,7 +41,8 @@
/*!
\page objecttrees.html
- \title Object Trees and Object Ownership
+ \title Object Trees & Ownership
+ \ingroup qt-basic-concepts
\brief Information about the parent-child pattern used to describe
object ownership in Qt.
diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc
index a807caf..bc9554c 100644
--- a/doc/src/objectmodel/properties.qdoc
+++ b/doc/src/objectmodel/properties.qdoc
@@ -41,7 +41,8 @@
/*!
\page properties.html
- \title Qt's Property System
+ \title The Property System
+ \ingroup qt-basic-concepts
\brief An overview of Qt's property system.
Qt provides a sophisticated property system similar to the ones
diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc
index 0f3f618..f33badf 100644
--- a/doc/src/objectmodel/signalsandslots.qdoc
+++ b/doc/src/objectmodel/signalsandslots.qdoc
@@ -41,7 +41,8 @@
/*!
\page signalsandslots.html
- \title Signals and Slots
+ \title Signals & Slots
+ \ingroup qt-basic-concepts
\brief An overview of Qt's signals and slots inter-object
communication mechanism.
diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc
index 7302e30..c3c59af 100644
--- a/doc/src/overviews.qdoc
+++ b/doc/src/overviews.qdoc
@@ -48,26 +48,97 @@
*/
/*!
- \group frameworks-technologies
- \title Frameworks and Technologies
+ \group qt-basic-concepts
+ \title Basic Qt Architecture
- \brief Documentation about the frameworks and technologies in Qt
+ \brief The basic architecture of the Qt cross-platform application and UI framework.
- These documents dive into the frameworks of classes that Qt provides,
- and provide background information about the technical solutions used
- in Qt's architecture.
+ Qt is a cross-platform application and UI framework for writing
+ web-enabled applications for desktop, mobile, and embedded
+ operating systems. These pages explain basic architectural
+ concepts of Qt:
+
+ \generatelist {related}
+ */
+
+/*!
+ \group qt-gui-concepts
+ \title Qt Desktop UI Components
+
+ \brief The Qt components for constructing native look & feel desktop UI's.
+
+ These pages are about Qt's traditional set of GUI components for
+ building both native look ^ feel and custom UI's for the desktop
+ environment. Use \l {declarativeui.html} {Qt Quick} for building
+ UI's for mobile devices.
+
+ \generatelist {related}
+ */
+
+/*!
+ \group qt-graphics
+ \title Qt Graphics and Painting
+
+ \brief The Qt components for doing graphics.
+
+ \generatelist {related}
+ */
+
+/*!
+ \group qt-network
+ \title Network programming with Qt
+
+ \brief The these pages are about Qt's support for network programming.
+
+ \generatelist {related}
+ */
+
+/*!
+ \group technology-apis
+ \title Qt API's for other technologies
+
+ These pages document Qt's API's for some widely-used standards and
+ technologies.
\generatelist{related}
*/
/*!
+ \group qt-activex
+ \title Qt For ActiveX
+ \brief Qt API's for using ActiveX controls, servers, and COM.
+ \ingroup technology-apis
+ \ingroup platform-specific
+
+ These pages document Qt's API's for developing with ActiveX
+ controls, servers, and COM.
+
+ \generatelist{related}
+*/
+
+/*!
+ \group qt-sql
+ \title Using SQL in Qt
+ \brief Qt API's for using SQL.
+ \ingroup technology-apis
+ \ingroup best-practices
+
+ These pages document Qt's API's for using SQL database systems
+ in Qt applications.
+
+ \generatelist{related}
+*/
+
+/*!
\group best-practices
\title How-To's and Best Practices
\brief How-To Guides and Best Practices
- These documents provide guidelines and best practices explaining
- how to use Qt to solve specific technical problems.
+ These documents provide guidelines and best practices for using Qt
+ to solve specific technical problems. They are listed
+ alphabetically by the first word in the title, so scan the entire
+ list to find what you want.
\generatelist{related}
*/
diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc
index 5807f57..b360d0b 100644
--- a/doc/src/painting-and-printing/coordsys.qdoc
+++ b/doc/src/painting-and-printing/coordsys.qdoc
@@ -41,7 +41,8 @@
/*!
\page coordsys.html
- \title The Coordinate System
+ \title Coordinate System
+ \ingroup qt-graphics
\brief Information about the coordinate system used by the paint
system.
diff --git a/doc/src/painting-and-printing/paintsystem.qdoc b/doc/src/painting-and-printing/paintsystem.qdoc
index 802751f..44c84a2 100644
--- a/doc/src/painting-and-printing/paintsystem.qdoc
+++ b/doc/src/painting-and-printing/paintsystem.qdoc
@@ -60,7 +60,9 @@
/*!
\page paintsystem.html
- \title The Paint System
+ \title Paint System
+ \brief A system for painting on the screen or on print devices using the same API
+ \ingroup qt-graphics
\ingroup frameworks-technologies
Qt's paint system enables painting on screen and print devices
diff --git a/doc/src/painting-and-printing/printing.qdoc b/doc/src/painting-and-printing/printing.qdoc
index 3d6ade2..6dad097 100644
--- a/doc/src/painting-and-printing/printing.qdoc
+++ b/doc/src/painting-and-printing/printing.qdoc
@@ -49,6 +49,7 @@
/*!
\page printing.html
\title Printing with Qt
+ \ingroup qt-graphics
\previouspage Styling
\contentspage The Paint System
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 8f5b6a5..16e0c0f 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -517,7 +517,7 @@
Note that some modules rely on other modules. If your application uses
QtXmlPatterns, QtWebkit or QtScript it may still require \c NetworkServices
- \o as these modules rely on QtNetwork to go online.
+ as these modules rely on QtNetwork to go online.
For more information see the documentation of the individual Qt classes. If
a class does not mention Symbian capabilities, it requires none.
diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc
index 591d6f1..6ffc568 100644
--- a/doc/src/platforms/symbian-introduction.qdoc
+++ b/doc/src/platforms/symbian-introduction.qdoc
@@ -191,7 +191,10 @@
\table
\row \o -i \o Install the package right away using PC suite.
\row \o -p \o Only preprocess the template \c .pkg file.
- \row \o -c=<file> \o Read certificate information from a file.
+ \row \o -c <file> \o Read certificate information from a file.
+ \row \o -u \o Preserves unsigned package.
+ \row \o -s \o Generates stub sis for ROM.
+ \row \o -n <name> \o Specifies the final sis name.
\endtable
Execute the \c{createpackage.pl} script without any
diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
index 22ea240..e3ad483 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp
@@ -67,3 +67,23 @@ beginInsertColumns(parent, 6, 8);
//! [5]
beginRemoveColumns(parent, 4, 6);
//! [5]
+
+
+//! [6]
+beginMoveRows(sourceParent, 2, 4, destinationParent, 2);
+//! [6]
+
+
+//! [7]
+beginMoveRows(sourceParent, 2, 4, destinationParent, 6);
+//! [7]
+
+
+//! [8]
+beginMoveRows(parent, 2, 2, parent, 0);
+//! [8]
+
+
+//! [9]
+beginMoveRows(parent, 2, 2, parent, 4);
+//! [9]
diff --git a/doc/src/snippets/declarative/Sprite.qml b/doc/src/snippets/declarative/Sprite.qml
new file mode 100644
index 0000000..6670703
--- /dev/null
+++ b/doc/src/snippets/declarative/Sprite.qml
@@ -0,0 +1,3 @@
+import Qt 4.7
+
+Rectangle { width: 80; height: 50; color: "red" }
diff --git a/doc/src/snippets/declarative/border-image.qml b/doc/src/snippets/declarative/borderimage.qml
index 9c4247e..9c4247e 100644
--- a/doc/src/snippets/declarative/border-image.qml
+++ b/doc/src/snippets/declarative/borderimage.qml
diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/declarative/componentCreation.js
new file mode 100644
index 0000000..f6fb379
--- /dev/null
+++ b/doc/src/snippets/declarative/componentCreation.js
@@ -0,0 +1,47 @@
+//![0]
+var component;
+var sprite;
+
+function finishCreation() {
+ if (component.status == Component.Ready) {
+ sprite = component.createObject(appWindow);
+ if (sprite == null) {
+ // Error Handling
+ } else {
+ sprite.x = 100;
+ sprite.y = 100;
+ // ...
+ }
+ } else if (component.status == Component.Error) {
+ // Error Handling
+ console.log("Error loading component:", component.errorsString());
+ }
+}
+//![0]
+
+function createSpriteObjects() {
+
+//![1]
+component = Qt.createComponent("Sprite.qml");
+if (component.status == Component.Ready)
+ finishCreation();
+else
+ component.statusChanged.connect(finishCreation);
+//![1]
+
+//![2]
+component = Qt.createComponent("Sprite.qml");
+sprite = component.createObject(appWindow);
+
+if (sprite == null) {
+ // Error Handling
+ console.log("Error loading component:", component.errorsString());
+} else {
+ sprite.x = 100;
+ sprite.y = 100;
+ // ...
+}
+//![2]
+
+}
+
diff --git a/doc/src/snippets/declarative/createComponent.qml b/doc/src/snippets/declarative/createComponent.qml
new file mode 100644
index 0000000..c4a1617
--- /dev/null
+++ b/doc/src/snippets/declarative/createComponent.qml
@@ -0,0 +1,9 @@
+import Qt 4.7
+import "componentCreation.js" as MyModule
+
+Rectangle {
+ id: appWindow
+ width: 300; height: 300
+
+ Component.onCompleted: MyModule.createSpriteObjects();
+}
diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml
new file mode 100644
index 0000000..6b331c4
--- /dev/null
+++ b/doc/src/snippets/declarative/createQmlObject.qml
@@ -0,0 +1,18 @@
+import Qt 4.7
+
+Rectangle {
+ id: targetItem
+ property QtObject newObject
+
+ width: 100
+ height: 100
+
+ function createIt() {
+//![0]
+newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}',
+ targetItem, "dynamicSnippet1");
+//![0]
+ }
+
+ Component.onCompleted: createIt()
+}
diff --git a/doc/src/snippets/declarative/drag.qml b/doc/src/snippets/declarative/drag.qml
index 9465efb..79469e3 100644
--- a/doc/src/snippets/declarative/drag.qml
+++ b/doc/src/snippets/declarative/drag.qml
@@ -9,7 +9,7 @@ Rectangle {
MouseArea {
anchors.fill: parent
drag.target: pic
- drag.axis: "XAxis"
+ drag.axis: Drag.XAxis
drag.minimumX: 0
drag.maximumX: blurtest.width-pic.width
}
diff --git a/doc/src/snippets/declarative/dynamicObjects.qml b/doc/src/snippets/declarative/dynamicObjects.qml
new file mode 100644
index 0000000..6a8c927
--- /dev/null
+++ b/doc/src/snippets/declarative/dynamicObjects.qml
@@ -0,0 +1,29 @@
+import Qt 4.7
+
+//![0]
+Rectangle {
+ id: rootItem
+ width: 300
+ height: 300
+
+ Component {
+ id: rectComponent
+
+ Rectangle {
+ id: rect
+ width: 40; height: 40;
+ color: "red"
+
+ NumberAnimation on opacity { from: 1; to: 0; duration: 1000 }
+
+ Component.onCompleted: rect.destroy(1000);
+ }
+ }
+
+ function createRectangle() {
+ var object = rectComponent.createObject(rootItem);
+ }
+
+ Component.onCompleted: createRectangle()
+}
+//![0]
diff --git a/doc/src/snippets/declarative/flickableScrollbar.qml b/doc/src/snippets/declarative/flickableScrollbar.qml
new file mode 100644
index 0000000..147751a
--- /dev/null
+++ b/doc/src/snippets/declarative/flickableScrollbar.qml
@@ -0,0 +1,26 @@
+import Qt 4.7
+
+//![0]
+Rectangle {
+ width: 200; height: 200
+
+ Flickable {
+ id: flickable
+//![0]
+ anchors.fill: parent
+ contentWidth: image.width; contentHeight: image.height
+
+ Image { id: image; source: "pics/qt.png" }
+//![1]
+ }
+
+ Rectangle {
+ id: scrollbar
+ anchors.right: flickable.right
+ y: flickable.visibleArea.yPosition * flickable.height
+ width: 10
+ height: flickable.visibleArea.heightRatio * flickable.height
+ color: "black"
+ }
+}
+//![1]
diff --git a/doc/src/snippets/declarative/focusscopes.qml b/doc/src/snippets/declarative/focusscopes.qml
new file mode 100644
index 0000000..686de29
--- /dev/null
+++ b/doc/src/snippets/declarative/focusscopes.qml
@@ -0,0 +1,27 @@
+import Qt 4.7
+
+//![0]
+Rectangle {
+ color: "lightsteelblue"; width: 240; height: 320
+
+ ListView {
+ anchors.fill: parent
+ focus: true
+
+ model: ListModel {
+ ListElement { name: "Bob" }
+ ListElement { name: "John" }
+ ListElement { name: "Michael" }
+ }
+
+ delegate: FocusScope {
+ width: childrenRect.width; height: childrenRect.height
+ TextInput {
+ focus: true
+ text: name
+ Keys.onReturnPressed: console.log(name)
+ }
+ }
+ }
+ }
+//![0]
diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml
index 1d3df97..cf345aa 100644
--- a/doc/src/snippets/declarative/gridview/gridview.qml
+++ b/doc/src/snippets/declarative/gridview/gridview.qml
@@ -4,7 +4,7 @@ import Qt 4.7
Rectangle {
width: 240; height: 180; color: "white"
// ContactModel model is defined in dummydata/ContactModel.qml
- // The viewer automatically loads files in dummydata/* to assist
+ // The launcher automatically loads files in dummydata/* to assist
// development without a real data source.
// Define a delegate component. A component will be
diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml
index 794b3f2..1282f8d 100644
--- a/doc/src/snippets/declarative/listview/highlight.qml
+++ b/doc/src/snippets/declarative/listview/highlight.qml
@@ -4,7 +4,7 @@ Rectangle {
width: 180; height: 200; color: "white"
// ContactModel model is defined in dummydata/ContactModel.qml
- // The viewer automatically loads files in dummydata/* to assist
+ // The launcher automatically loads files in dummydata/* to assist
// development without a real data source.
// Define a delegate component. A component will be
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml
index 61bf126..44f0540 100644
--- a/doc/src/snippets/declarative/listview/listview.qml
+++ b/doc/src/snippets/declarative/listview/listview.qml
@@ -5,7 +5,7 @@ Rectangle {
width: 180; height: 200; color: "white"
// ContactModel model is defined in dummydata/ContactModel.qml
- // The viewer automatically loads files in dummydata/* to assist
+ // The launcher automatically loads files in dummydata/* to assist
// development without a real data source.
// Define a delegate component. A component will be
diff --git a/doc/src/snippets/declarative/mouseregion.qml b/doc/src/snippets/declarative/mouseregion.qml
index a464069..683770b 100644
--- a/doc/src/snippets/declarative/mouseregion.qml
+++ b/doc/src/snippets/declarative/mouseregion.qml
@@ -3,13 +3,21 @@ import Qt 4.7
Rectangle { width: 200; height: 100
Row {
//! [0]
-Rectangle { width: 100; height: 100; color: "green"
- MouseArea { anchors.fill: parent; onClicked: { parent.color = 'red' } }
+Rectangle {
+ width: 100; height: 100
+ color: "green"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { parent.color = 'red' }
+ }
}
//! [0]
//! [1]
Rectangle {
- width: 100; height: 100; color: "green"
+ width: 100; height: 100
+ color: "green"
+
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro b/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro
index 68eeaf2..68eeaf2 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/contextproperties.pro
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/contextproperties.pro
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp b/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
index 4073a6c..4073a6c 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
index 1053f73..1053f73 100644
--- a/doc/src/declarative/snippets/qtbinding/contextproperties/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/contextproperties/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
index d0d253a..d0d253a 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.h
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.h
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
index e6af0d0..e6af0d0 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/custompalette.pro
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/custompalette.pro
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp b/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
index dc651f6..dc651f6 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
index f1a3b4f..f1a3b4f 100644
--- a/doc/src/declarative/snippets/qtbinding/custompalette/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/custompalette/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/resources/example.qrc b/doc/src/snippets/declarative/qtbinding/resources/example.qrc
index 5e49415..5e49415 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/example.qrc
+++ b/doc/src/snippets/declarative/qtbinding/resources/example.qrc
diff --git a/doc/src/declarative/snippets/qtbinding/resources/images/background.png b/doc/src/snippets/declarative/qtbinding/resources/images/background.png
index e69de29..e69de29 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/images/background.png
+++ b/doc/src/snippets/declarative/qtbinding/resources/images/background.png
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.cpp b/doc/src/snippets/declarative/qtbinding/resources/main.cpp
index 5459b9e..5459b9e 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/resources/main.qml b/doc/src/snippets/declarative/qtbinding/resources/main.qml
index dfe923f..dfe923f 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/resources/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/resources/resources.pro b/doc/src/snippets/declarative/qtbinding/resources/resources.pro
index cc01ee1..cc01ee1 100644
--- a/doc/src/declarative/snippets/qtbinding/resources/resources.pro
+++ b/doc/src/snippets/declarative/qtbinding/resources/resources.pro
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
index 537a288..537a288 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.cpp
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
index 2efa542..2efa542 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/main.qml
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/main.qml
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
index 4954a5f..4954a5f 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.cpp
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.cpp
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
index 8d17121..8d17121 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.h
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.h
diff --git a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
index d803e6a..d803e6a 100644
--- a/doc/src/declarative/snippets/qtbinding/stopwatch/stopwatch.pro
+++ b/doc/src/snippets/declarative/qtbinding/stopwatch/stopwatch.pro
diff --git a/doc/src/sql-programming/qsqldatatype-table.qdoc b/doc/src/sql-programming/qsqldatatype-table.qdoc
index fc961f5..fb5fb49 100644
--- a/doc/src/sql-programming/qsqldatatype-table.qdoc
+++ b/doc/src/sql-programming/qsqldatatype-table.qdoc
@@ -41,19 +41,20 @@
/*!
\page sql-types.html
- \title Recommended Use of Data Types in Databases
+ \title Data Types for Qt-supported Database Systems
+ \brief Recommended data types for database systems
- \ingroup best-practices
+ \ingroup qt-sql
- \section1 Recommended Use of Types in Qt Supported Databases
+ \section1 Data Types for Qt Supported Database Systems
- This table shows the recommended data types used when extracting data
- from the databases supported in Qt. It is important to note that the
- types used in Qt are not necessarily valid as input to the specific
- database. One example could be that a double would work perfectly as
- input for floating point records in a database, but not necessarily
- as a storage format for output from the database since it would be stored
- with 64-bit precision in C++.
+ This table shows the recommended data types for extracting data from
+ the databases supported in Qt. Note that types used in Qt are not
+ necessarily valid as input types to a specific database
+ system. e.g., A double might work perfectly as input for floating
+ point records in a particular database, but not necessarily as a
+ storage format for output from that database, because it would be
+ stored with 64-bit precision in C++.
\tableofcontents
diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc
index 6bccd83..f0e4e52 100644
--- a/doc/src/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql-programming/sql-driver.qdoc
@@ -44,7 +44,7 @@
\title SQL Database Drivers
\brief How to configure and install QtSql drivers for supported databases.
- \ingroup best-practices
+ \ingroup qt-sql
The QtSql module uses driver \l{How to Create Qt
Plugins}{plugins} to communicate with the different database
diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc
index f1f3e5e..b34810c 100644
--- a/doc/src/sql-programming/sql-programming.qdoc
+++ b/doc/src/sql-programming/sql-programming.qdoc
@@ -49,6 +49,7 @@
/*!
\page sql-programming.html
\title SQL Programming
+ \ingroup qt-sql
\nextpage Connecting to Databases
\brief Database integration for Qt applications.
@@ -118,6 +119,7 @@
/*!
\page sql-connecting.html
\title Connecting to Databases
+ \ingroup qt-sql
\contentspage SQL Programming
\previouspage SQL Programming
@@ -187,6 +189,7 @@
/*!
\page sql-sqlstatements.html
\title Executing SQL Statements
+ \ingroup qt-sql
\previouspage Connecting to Databases
\contentspage SQL Programming
@@ -337,6 +340,7 @@
/*!
\page sql-model.html
\title Using the SQL Model Classes
+ \ingroup qt-sql
\previouspage Executing SQL Statements
\contentspage SQL Programming
@@ -483,6 +487,7 @@
/*!
\page sql-presenting.html
\title Presenting Data in a Table View
+ \ingroup qt-sql
\previouspage Using the SQL Model Classes
\contentspage SQL Programming
@@ -587,6 +592,7 @@
/*!
\page sql-forms.html
\title Creating Data-Aware Forms
+ \ingroup qt-sql
\previouspage Presenting Data in a Table View
\contentspage SQL Programming
diff --git a/doc/src/template/images/api_examples.png b/doc/src/template/images/api_examples.png
deleted file mode 100755
index 1fcbc96..0000000
--- a/doc/src/template/images/api_examples.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/api_lookup.png b/doc/src/template/images/api_lookup.png
deleted file mode 100755
index 1cffd5e..0000000
--- a/doc/src/template/images/api_lookup.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/api_topics.png b/doc/src/template/images/api_topics.png
deleted file mode 100755
index a76a6c3..0000000
--- a/doc/src/template/images/api_topics.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_l.png b/doc/src/template/images/bg_l.png
index 95470c7..90b1da1 100755
--- a/doc/src/template/images/bg_l.png
+++ b/doc/src/template/images/bg_l.png
Binary files differ
diff --git a/doc/src/template/images/bg_l_blank.png b/doc/src/template/images/bg_l_blank.png
index e0eca3f..5a9673d 100755
--- a/doc/src/template/images/bg_l_blank.png
+++ b/doc/src/template/images/bg_l_blank.png
Binary files differ
diff --git a/doc/src/template/images/bg_ll.png b/doc/src/template/images/bg_ll.png
deleted file mode 100755
index 99796e7..0000000
--- a/doc/src/template/images/bg_ll.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ll_blank.png b/doc/src/template/images/bg_ll_blank.png
deleted file mode 100755
index 95a1c45..0000000
--- a/doc/src/template/images/bg_ll_blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_lr.png b/doc/src/template/images/bg_lr.png
deleted file mode 100755
index fef1d17..0000000
--- a/doc/src/template/images/bg_lr.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_r.png b/doc/src/template/images/bg_r.png
index 42a35a5..f0fb121 100755
--- a/doc/src/template/images/bg_r.png
+++ b/doc/src/template/images/bg_r.png
Binary files differ
diff --git a/doc/src/template/images/bg_ul.png b/doc/src/template/images/bg_ul.png
deleted file mode 100755
index 303181f..0000000
--- a/doc/src/template/images/bg_ul.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ul_blank.png b/doc/src/template/images/bg_ul_blank.png
deleted file mode 100755
index 7051261..0000000
--- a/doc/src/template/images/bg_ul_blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ur.png b/doc/src/template/images/bg_ur.png
deleted file mode 100755
index bfa51a4..0000000
--- a/doc/src/template/images/bg_ur.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/bg_ur_blank.png b/doc/src/template/images/bg_ur_blank.png
deleted file mode 100755
index 5779961..0000000
--- a/doc/src/template/images/bg_ur_blank.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/box_bg.png b/doc/src/template/images/box_bg.png
index 232655a..3322f92 100755
--- a/doc/src/template/images/box_bg.png
+++ b/doc/src/template/images/box_bg.png
Binary files differ
diff --git a/doc/src/template/images/breadcrumb.png b/doc/src/template/images/breadcrumb.png
index f0571ce..0ded551 100755
--- a/doc/src/template/images/breadcrumb.png
+++ b/doc/src/template/images/breadcrumb.png
Binary files differ
diff --git a/doc/src/template/images/bullet_gt.png b/doc/src/template/images/bullet_gt.png
index 8875925..7561b4e 100755
--- a/doc/src/template/images/bullet_gt.png
+++ b/doc/src/template/images/bullet_gt.png
Binary files differ
diff --git a/doc/src/template/images/bullet_sq.png b/doc/src/template/images/bullet_sq.png
index db85ee3..a84845e 100755
--- a/doc/src/template/images/bullet_sq.png
+++ b/doc/src/template/images/bullet_sq.png
Binary files differ
diff --git a/doc/src/template/images/content_bg.png b/doc/src/template/images/content_bg.png
deleted file mode 100755
index 416397d..0000000
--- a/doc/src/template/images/content_bg.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/form_bg.png b/doc/src/template/images/form_bg.png
deleted file mode 100755
index bf2ee54..0000000
--- a/doc/src/template/images/form_bg.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/header.png b/doc/src/template/images/header.png
deleted file mode 100644
index 141488b..0000000
--- a/doc/src/template/images/header.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/page.png b/doc/src/template/images/page.png
new file mode 100644
index 0000000..1db151b
--- /dev/null
+++ b/doc/src/template/images/page.png
Binary files differ
diff --git a/doc/src/template/images/page_bg.png b/doc/src/template/images/page_bg.png
index fb7d051..9b3bd99 100755
--- a/doc/src/template/images/page_bg.png
+++ b/doc/src/template/images/page_bg.png
Binary files differ
diff --git a/doc/src/template/images/print.png b/doc/src/template/images/print.png
deleted file mode 100755
index 4581da1..0000000
--- a/doc/src/template/images/print.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_guide.png b/doc/src/template/images/qt_guide.png
deleted file mode 100755
index 9f53a05..0000000
--- a/doc/src/template/images/qt_guide.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_icon.png b/doc/src/template/images/qt_icon.png
deleted file mode 100755
index fbaee35..0000000
--- a/doc/src/template/images/qt_icon.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_ref_doc.png b/doc/src/template/images/qt_ref_doc.png
deleted file mode 100755
index 141488b..0000000
--- a/doc/src/template/images/qt_ref_doc.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/qt_tools.png b/doc/src/template/images/qt_tools.png
deleted file mode 100755
index cc24179..0000000
--- a/doc/src/template/images/qt_tools.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/sep.png b/doc/src/template/images/sep.png
deleted file mode 100755
index c895646..0000000
--- a/doc/src/template/images/sep.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/template/images/spinner.gif b/doc/src/template/images/spinner.gif
new file mode 100644
index 0000000..1ed786f
--- /dev/null
+++ b/doc/src/template/images/spinner.gif
Binary files differ
diff --git a/doc/src/template/images/sprites-combined.png b/doc/src/template/images/sprites-combined.png
index 4186022..3a48b21 100755
--- a/doc/src/template/images/sprites-combined.png
+++ b/doc/src/template/images/sprites-combined.png
Binary files differ
diff --git a/doc/src/template/scripts/functions.js b/doc/src/template/scripts/functions.js
index fa454e3..7d93486 100755
--- a/doc/src/template/scripts/functions.js
+++ b/doc/src/template/scripts/functions.js
@@ -1,10 +1,8 @@
-
/* START non link areas where cursor should change to pointing hand */
$('.t_button').mouseover(function() {
$('.t_button').css('cursor','pointer');
/*document.getElementById(this.id).style.cursor='pointer';*/
});
-
/* END non link areas */
$('#smallA').click(function() {
$('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','smaller');
@@ -35,27 +33,139 @@ $('#bigA').click(function() {
$(this).addClass('active')
});
-function doSearch(str){
-
-if (str.length>3)
- {
- alert('Search is not yet activated.');
- // document.getElementById("refWrapper").innerHTML="";
- return;
- }
- else
- return;
-
-// var url="indexSearch.php";
-// url=url+"?q="+str;
- // url=url+"&sid="+Math.random();
- // var url="http://localhost:8983/solr/select?";
- // url=url+"&q="+str;
- // url=url+"&fq=&start=0&rows=10&fl=&qt=&wt=&explainOther=&hl.fl=";
-
- // $.get(url, function(data){
- // alert(data);
- // document.getElementById("refWrapper").innerHTML=data;
- //});
-
-} \ No newline at end of file
+
+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++) {
+ var linkStart = "<li class=\"liveResult\"><a href='"+qturl+"";
+ var linkEnd = "</a></li>";
+
+ 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++){
+ full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ full_li_element = full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd;
+
+ $('#ul001').append(full_li_element);
+ $('#ul001 .defaultLink').css('display','none');
+
+ }
+ }
+
+ 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++){
+ full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
+
+ $('#ul002').append(full_li_element);
+ $('#ul002 .defaultLink').css('display','none');
+
+ }
+ }
+ 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++){
+ full_li_element = linkStart + propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ full_li_element =full_li_element + "'>" + propertyTags[i].getElementsByTagName('pageTitle')[0].firstChild.nodeValue + linkEnd ;
+
+ $('#ul003').append(full_li_element);
+ $('#ul003 .defaultLink').css('display','none');
+
+ }
+ }
+ }
+
+ 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;
+ lookupCount=0;
+ articleCount = 0;
+ exampleCount = 0;
+
+}
+
+//build regular expression object to find empty string or any number of blank
+var blankRE=/^\s*$/;
+function CheckEmptyAndLoadList()
+{
+ $('.liveResult').remove();
+ var value = document.getElementById('pageType').value;
+ if((blankRE.test(value)) || (value.length < 3))
+ {
+ //empty inputbox
+ // load default li elements into the ul if empty
+ // loadAllList(); // replaced
+ $('.defaultLink').css('display','block');
+ // $('.liveResult').css('display','none');
+ }else{
+ $('.defaultLink').css('display','none');
+ }
+}
+/*
+$(window).resize(function(){
+if($(window).width()<400)
+ $('body').addClass('offline');
+else
+ $('body').removeClass('offline');
+ });
+ */
+// Loads on doc ready
+ $(document).ready(function () {
+ 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');
+ CheckEmptyAndLoadList();
+ }
+
+ $('#pageType').keyup(function () {
+ var searchString = $('#pageType').val() ;
+ if ((searchString == null) || (searchString.length < 3)) {
+ $('.liveResult').remove(); // replaces removeResults();
+ CheckEmptyAndLoadList();
+ $('.report').remove();
+ // debug$('.content').prepend('<li>too short or blank</li>'); // debug
+ return;
+ }
+ if (this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(function () {
+ // debug$('.content').prepend('<li>new search started </li>');// debug
+ // debug$('.content').prepend('<p class=\"report\">Search string ' +searchString +'</p>'); // debug
+
+ $.ajax({
+ contentType: "application/x-www-form-urlencoded",
+ url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
+ data: 'searchString='+searchString,
+ dataType:'xml',
+ type: 'post',
+ success: function (response, textStatus) {
+
+ $('.liveResult').remove(); // replaces removeResults();
+ processNokiaData(response);
+
+ }
+ });
+ }, 500);
+ });
+ });
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index d5920b9..5ad90e3 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -58,6 +58,23 @@
{
vertical-align: baseline;
}
+ tt, .qmlreadonly span, .qmldefault span
+ {
+ word-spacing:5px;
+ }
+ .heading
+ {
+ font: normal 600 16px/1.0 Arial;
+ padding-bottom: 15px;
+ }
+ .subtitle
+ {
+ font-size: 13px;
+ }
+ .small-subtitle
+ {
+ font-size: 13px;
+ }
legend
{
color: #000000;
@@ -73,7 +90,6 @@
{
font-size: 100%;
}
- /* Page style */
html
{
background-color: #e5e5e5;
@@ -92,6 +108,11 @@
{
font-style: italic;
}
+ a
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
.header, .footer, .wrapper
{
min-width: 600px;
@@ -106,23 +127,19 @@
{
padding-left: 216px;
height: 15px;
- background: url(../images/bg_ul.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 0;
overflow: hidden;
}
.offline .wrapper .hd
{
- background: url(../images/bg_ul_blank.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -15px;
}
.wrapper .hd span
{
height: 15px;
display: block;
- background: url(../images/bg_ur.png) no-repeat 100% 0;
overflow: hidden;
- }
- .offline .wrapper .hd span
- {
- /* background: url(../images/bg_ur_blank.png) no-repeat 100% 0; */
+ background: url(../images/page.png) no-repeat 100% -30px;
}
.wrapper .bd
{
@@ -137,18 +154,18 @@
{
padding-left: 216px;
height: 15px;
- background: url(../images/bg_ll.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -75px;
overflow: hidden;
}
.offline .wrapper .ft
{
- background: url(../images/bg_ll_blank.png) no-repeat 0 0;
+ background: url(../images/page.png) no-repeat 0 -90px;
}
.wrapper .ft span
{
height: 15px;
display: block;
- background: url(../images/bg_lr.png) no-repeat 100% 0;
+ background: url(../images/page.png) no-repeat 100% -60px;
overflow: hidden;
}
.header, .footer
@@ -182,186 +199,9 @@
width: 302px;
height: 22px;
text-indent: -999em;
- background: url(../images/qt_ref_doc.png) no-repeat 0 0;
- }
- /* header elements */
- #nav-topright
- {
- height: 70px;
- }
-
- #nav-topright ul
- {
- list-style-type: none;
- float: right;
- width: 370px;
- margin-top: 11px;
- }
-
- #nav-topright li
- {
- display: inline-block;
- margin-right: 20px;
- float: left;
- }
-
- #nav-topright li.nav-topright-last
- {
- margin-right: 0;
- }
-
- #nav-topright li a
- {
- background: transparent url(../images/sprites-combined.png) no-repeat;
- height: 18px;
- display: block;
- overflow: hidden;
- text-indent: -9999px;
- }
-
- #nav-topright li.nav-topright-home a
- {
- width: 65px;
- background-position: -2px -91px;
- }
-
- #nav-topright li.nav-topright-home a:hover
- {
- background-position: -2px -117px;
- }
-
-
- #nav-topright li.nav-topright-dev a
- {
- width: 30px;
- background-position: -76px -91px;
- }
-
- #nav-topright li.nav-topright-dev a:hover
- {
- background-position: -76px -117px;
- }
-
-
- #nav-topright li.nav-topright-labs a
- {
- width: 40px;
- background-position: -114px -91px;
- }
-
- #nav-topright li.nav-topright-labs a:hover
- {
- background-position: -114px -117px;
- }
-
- #nav-topright li.nav-topright-doc a
- {
- width: 32px;
- background-position: -162px -91px;
- }
-
- #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a
- {
- background-position: -162px -117px;
- }
-
- #nav-topright li.nav-topright-blog a
- {
- width: 40px;
- background-position: -203px -91px;
- }
-
- #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a
- {
- background-position: -203px -117px;
- }
-
- #nav-topright li.nav-topright-shop a
- {
- width: 40px;
- background-position: -252px -91px;
- }
-
- #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a
- {
- background-position: -252px -117px;
+ background: url(../images/sprites-combined.png) no-repeat -78px -235px;
}
- #nav-logo
- {
- background: transparent url( "../images/sprites-combined.png" ) no-repeat 0 -225px;
- left: -3px;
- position: absolute;
- width: 75px;
- height: 75px;
- top: 13px;
- }
- #nav-logo a
- {
- width: 75px;
- height: 75px;
- display: block;
- text-indent: -9999px;
- overflow: hidden;
- }
- /* Clearing */
- .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
- /* ^ Clearing */
-
-
-
- .shortCut-topleft-inactive
- {
- padding-left: 3px;
- background: transparent url( "../images/sprites-combined.png" ) no-repeat 0px -58px;
- height: 20px;
- width: 93px;
- }
- .shortCut-topleft-inactive span
- {
- font-variant: normal;
- }
- #shortCut
- {
- padding-top: 10px;
- font-weight: bolder;
- color: #b0adab;
- }
- #shortCut ul
- {
- list-style-type: none;
- float: left;
- width: 347px;
- margin-left: 100px;
- }
- #shortCut li
- {
- display: inline-block;
- margin-right: 25px;
- float: left;
- white-space: nowrap;
- }
- #shortCut li a
- {
- color: #b0adab;
- text-decoration: none;
- }
- #shortCut li a:hover
- {
- color: #44a51c;
- text-decoration: none;
- }
-
- /* end of header elements */
-
- /* menu element */
.sidebar
{
float: left;
@@ -369,32 +209,32 @@
width: 200px;
font-size: 11px;
}
- .sidebar a
- {
- color: #00732f;
- text-decoration: none;
- }
- .offline .sidebar, .offline .feedback
+
+ .offline .sidebar, .offline .feedback, .offline .t_button
{
display: none;
}
+
.sidebar .searchlabel
{
padding: 0 0 2px 17px;
font: normal bold 11px/1.2 Verdana;
}
+
.sidebar .search
{
padding: 0 15px 0 16px;
}
+
.sidebar .search form
{
- width: 167px;
- height: 21px;
- padding: 2px 0 0 5px;
- background: url(../images/form_bg.png) no-repeat 0 0;
+ background: url(../images/sprites-combined.png) no-repeat -6px -348px;
+ height:21px;
+ padding:2px 0 0 5px;
+ width:167px;
}
- .sidebar .search form fieldset input#searchstring
+
+ .sidebar .search form input#pageType
{
width: 158px;
height: 19px;
@@ -403,35 +243,68 @@
outline: none;
font: 13px/1.2 Verdana;
}
+
.sidebar .box
{
padding: 17px 15px 5px 16px;
}
+
.sidebar .box .first
{
background-image: none;
}
+
.sidebar .box h2
{
font: normal 18px/1.2 Arial;
- padding: 15px 0 0 40px;
+ padding: 0;
min-height: 32px;
}
+ .sidebar .box h2 span
+ {
+ overflow: hidden;
+ display: inline-block;
+ }
.sidebar .box#lookup h2
{
- background: url(../images/api_lookup.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #lookup.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -6px -311px;
+ width: 27px;
+ height: 35px;
+ margin-right: 13px;
}
.sidebar .box#topics h2
{
- background: url(../images/api_topics.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #topics.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -94px -311px;
+ width: 27px;
+ height: 32px;
+ margin-right: 13px;
}
.sidebar .box#examples h2
{
- background: url(../images/api_examples.png) no-repeat 0 0;
+ background-image: none;
+ }
+ .sidebar #examples.box h2 span
+ {
+ background: url(../images/sprites-combined.png) no-repeat -48px -311px;
+ width: 30px;
+ height: 31px;
+ margin-right: 9px;
}
+
.sidebar .box .list
{
display: block;
+ max-height:200px;
+ overflow-y:auto;
+ overflow-x:none;
}
.sidebar .box .live
{
@@ -443,33 +316,34 @@
{
text-decoration: underline;
}
+ .sidebar .box ul
+ {
+ padding:10px;
+ }
.sidebar .box ul li
{
padding-left: 12px;
background: url(../images/bullet_gt.png) no-repeat 0 5px;
- margin-bottom: 15px;
+ margin-bottom: 5px;
}
.sidebar .bottombar
{
background: url(../images/box_bg.png) repeat-x 0 bottom;
}
- /* content elements */
.wrap
{
- overflow: hidden;
+ margin: 0 5px 0 208px;
+ overflow: visible;
}
.offline .wrap
{
margin: 0 5px 0 5px;
}
- /* tool bar */
.wrap .toolbar
{
background-color: #fafafa;
border-bottom: 1px solid #d1d1d1;
- height: 20px;
- margin-left: 3px;
- margin-right: 5px;
+ height: 20px;
position: relative;
}
.wrap .toolbar .toolblock
@@ -487,7 +361,7 @@
{
padding: 0 0 10px 21px;
right: 5px;
- vertical-align: top;
+ vertical-align: middle;
overflow: hidden;
}
.wrap .toolbar .toolbuttons .active
@@ -507,32 +381,56 @@
font-weight: bold;
color: #B0ADAB;
}
- #smallA
+
+ .toolbuttons #print
+ {
+ border-left: 1px solid #c5c4c4;
+ margin-top: 0;
+ padding-left: 7px;
+ text-indent: 0;
+ }
+ .toolbuttons #print a
+ {
+ width: 16px;
+ height: 16px;
+ }
+
+ .toolbuttons #print a span
+ {
+ width: 16px;
+ height: 16px;
+ text-indent: -999em;
+ display: block;
+ overflow: hidden;
+ background: url(../images/sprites-combined.png) no-repeat -137px -311px;
+ }
+
+ .toolbuttons #smallA
{
font-size: 10pt;
}
- #medA
+ .toolbuttons #medA
{
font-size: 12pt;
}
- #bigA
+ .toolbuttons #bigA
{
font-size: 14pt;
+ margin-right: 7px;
}
+
#smallA:hover, #medA:hover, #bigA:hover
{
color: #00732F;
}
- #print
+
+ .offline .wrap .breadcrumb
{
- font-size: 14pt;
- line-height: 20pt;
}
- #printIcon
+
+ .wrap .breadcrumb ul
{
- margin-left: 5px;
}
- /* bread crumbs */
.wrap .breadcrumb ul li
{
float: left;
@@ -545,6 +443,10 @@
{
font-weight: normal;
}
+ .wrap .breadcrumb ul li a
+ {
+ color: #363534;
+ }
.wrap .breadcrumb ul li.first
{
background-image: none;
@@ -554,29 +456,29 @@
.wrap .content
{
padding: 30px;
- position: relative;
}
- /* text elements */
- .heading
+
+ .wrap .content li
{
- font: normal 600 16px/1.0 Arial;
- padding-bottom: 15px;
+ padding-left: 12px;
+ background: url(../images/bullet_sq.png) no-repeat 0 5px;
+ font: normal 400 10pt/1 Verdana;
+ /* color: #44a51c;*/
+ margin-bottom: 10px;
}
-
- .subtitle
+ .content li:hover
{
- font-size: 13px;
+ /* text-decoration: underline;*/
}
- .small-subtitle
+ .offline .wrap .content
{
- font-size: 13px;
+ padding-top: 15px;
}
-
+
.wrap .content h1
{
font: 600 18px/1.2 Arial;
- padding-bottom: 15px;
}
.wrap .content h2
{
@@ -588,25 +490,18 @@
}
.wrap .content p
{
- line-height:20px;
- padding:10px 5px 10px 5px;
+ line-height: 20px;
+ padding: 5px;
}
+ .wrap .content table p
+ {
+ line-height: 20px;
+ padding: 0px;
+ }
.wrap .content ul
{
padding-left: 25px;
- }
- .wrap .content li
- {
- padding-left: 12px;
- background: url(../images/bullet_sq.png) no-repeat 0 5px;
- font: normal 400 10pt/1 Verdana;
- margin-bottom: 10px;
- line-height: 14px;
- }
- a
- {
- color: #00732F;
- text-decoration: none;
+ padding-top: 10px;
}
a:hover
{
@@ -618,22 +513,26 @@
color: #4c0033;
text-decoration: none;
}
- .offline .wrap .content
+ .content a:visited:hover
{
- padding-top: 15px;
- }
- .footer
+ color: #4c0033;
+ text-decoration: underline;
+ } .footer
{
min-height: 100px;
color: #797775;
font: normal 9px/1 Verdana;
text-align: center;
padding-top: 40px;
+ background-color: #E6E7E8;
+ margin: 0;
}
.feedback
{
- float: right;
- padding-right: 10px;
+ float: none;
+ position: absolute;
+ right: 15px;
+ bottom: 10px;
font: normal 8px/1 Verdana;
color: #B0ADAB;
}
@@ -644,37 +543,244 @@
color: #00732F;
text-decoration: underline;
}
+ .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+ #nav-topright
+ {
+ height: 70px;
+ }
+
+ #nav-topright ul
+ {
+ list-style-type: none;
+ float: right;
+ width: 370px;
+ margin-top: 11px;
+ }
+
+ #nav-topright li
+ {
+ display: inline-block;
+ margin-right: 20px;
+ float: left;
+ }
+
+ #nav-topright li.nav-topright-last
+ {
+ margin-right: 0;
+ }
+
+ #nav-topright li a
+ {
+ background: transparent url(../images/sprites-combined.png) no-repeat;
+ height: 18px;
+ display: block;
+ overflow: hidden;
+ text-indent: -9999px;
+ }
+
+ #nav-topright li.nav-topright-home a
+ {
+ width: 65px;
+ background-position: -2px -91px;
+ }
+
+ #nav-topright li.nav-topright-home a:hover
+ {
+ background-position: -2px -117px;
+ }
+
+
+ #nav-topright li.nav-topright-dev a
+ {
+ width: 30px;
+ background-position: -76px -91px;
+ }
+
+ #nav-topright li.nav-topright-dev a:hover
+ {
+ background-position: -76px -117px;
+ }
+
+
+ #nav-topright li.nav-topright-labs a
+ {
+ width: 40px;
+ background-position: -114px -91px;
+ }
+
+ #nav-topright li.nav-topright-labs a:hover
+ {
+ background-position: -114px -117px;
+ }
+
+ #nav-topright li.nav-topright-doc a
+ {
+ width: 32px;
+ background-position: -162px -91px;
+ }
+
+ #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a
+ {
+ background-position: -162px -117px;
+ }
+
+ #nav-topright li.nav-topright-blog a
+ {
+ width: 40px;
+ background-position: -203px -91px;
+ }
+
+ #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a
+ {
+ background-position: -203px -117px;
+ }
+
+ #nav-topright li.nav-topright-shop a
+ {
+ width: 40px;
+ background-position: -252px -91px;
+ }
+
+ #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a
+ {
+ background-position: -252px -117px;
+ }
+
+ #nav-logo
+ {
+ background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px;
+ left: -3px;
+ position: absolute;
+ width: 75px;
+ height: 75px;
+ top: 13px;
+ }
+ #nav-logo a
+ {
+ width: 75px;
+ height: 75px;
+ display: block;
+ text-indent: -9999px;
+ overflow: hidden;
+ }
+
+
+ .shortCut-topleft-inactive
+ {
+ padding-left: 3px;
+ background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
+ height: 20px;
+ width: 47px;
+ }
+ .shortCut-topleft-inactive span
+ {
+ font-variant: normal;
+ }
+ .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover
+ {
+ text-decoration:none;
+ }
+ #shortCut
+ {
+ padding-top: 10px;
+ font-weight: bolder;
+ color: #b0adab;
+ }
+ #shortCut ul
+ {
+ list-style-type: none;
+ float: left;
+ width: 347px;
+ margin-left: 100px;
+ }
+ #shortCut li
+ {
+ display: inline-block;
+ margin-right: 25px;
+ float: left;
+ white-space: nowrap;
+ }
+ #shortCut li a
+ {
+ color: #b0adab;
+ }
+ #shortCut li a:hover
+ {
+ color: #44a51c;
+ }
+
hr
{
- background-color: #e0e0e0;
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
height: 1px;
width: 100%;
text-align: left;
margin: 15px 0px 15px 0px;
}
-
+
.content .alignedsummary
{
margin: 15px;
}
- /* tables */
+ pre
+ {
+ border: 1px solid #DDDDDD;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ overflow-x: auto;
+ }
table, pre
{
-moz-border-radius: 7px 7px 7px 7px;
background-color: #F6F6F6;
border: 1px solid #E6E6E6;
border-collapse: separate;
- font-size: 11px;
- min-width: 395px;
+ font-size: 11px;
+ /*min-width: 395px;*/
margin-bottom: 25px;
+ display: inline-block;
+ }
+ thead
+ {
+ margin-top: 5px;
+ font:600 12px/1.2 Arial;
+ }
+ th
+ {
+ padding: 5px 15px 5px 15px;
+ background-color: #E1E1E1;
+ /* border-bottom: 1px solid #E6E6E6;*/
+ border-left: 1px solid #E6E6E6;
+ /* border-right: 1px solid #E6E6E6;*/
+ }
+ td
+ {
+ padding: 3px 15px 3px 20px;
+ /* border-left: 1px solid #E6E6E6;
+ border-right: 1px solid #E6E6E6;*/
}
- thead{margin-top: 5px;}
- th{ padding: 3px 15px 3px 15px;}
- td{padding: 3px 15px 3px 20px;}
+ tr.odd td:hover, tr.even td:hover
+ {
+ /* border-right: 1px solid #C3C3C3;
+ border-left: 1px solid #C3C3C3;*/
+ }
+
+ td.rightAlign
+ {
+ padding: 3px 15px 3px 10px;
+ }
table tr.odd
{
border-left: 1px solid #E6E6E6;
- background-color: #F6F6F6;
+ background-color: #F6F6F6;
color: #66666E;
}
table tr.even
@@ -683,14 +789,11 @@
background-color: #ffffff;
color: #66666E;
}
- table tr.odd:hover
- {
- background-color: #E6E6E6;
- }
- table tr.even:hover
+ table tr.odd td:hover, table tr.even td:hover
{
background-color: #E6E6E6;
}
+
span.comment
{
color: #8B0000;
@@ -700,15 +803,7 @@
{
color: #254117;
}
- pre
- {
- -moz-border-radius:7px 7px 7px 7px;
- background-color:#F6F6F6;
- border:1px solid #DDDDDD;
- margin:0 20px 10px 10px;
- padding:20px 15px 20px 20px;
- overflow-x:auto;
- }
+
.qmltype
{
text-align: center;
@@ -736,11 +831,11 @@
#feedbackBox
{
- display:none;
- -moz-border-radius:7px 7px 7px 7px;
- border:1px solid #DDDDDD;
- position:fixed;
- top:100px;
+ display: none;
+ -moz-border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ position: fixed;
+ top: 100px;
left: 33%;
height: 190px;
width: 400px;
@@ -750,27 +845,27 @@
}
#feedcloseX a
{
- display:inline;
+ display: inline;
padding: 5px 5px 0 0;
- margin-bottom:3px;
+ margin-bottom: 3px;
color: #363534;
- font-weight:600;
+ font-weight: 600;
float: right;
text-decoration: none;
}
+
#feedbox
- /* here */
{
- display:inline;
+ display: inline;
width: 370px;
height: 120px;
- margin:0px 25px 10px 15px;
+ margin: 0px 25px 10px 15px;
}
#feedsubmit
{
- display:inline;
- float:right;
- margin:4px 32px 0 0;
+ display: inline;
+ float: right;
+ margin: 4px 32px 0 0;
}
#blurpage
{
@@ -786,36 +881,72 @@
}
.toc
{
- float: right;
- -moz-border-radius:7px 7px 7px 7px;
- background-color:#F6F6F6;
- border:1px solid #DDDDDD;
- margin:0 20px 10px 10px;
- padding:20px 15px 20px 20px;
+ float: right;
+ -moz-border-radius: 7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border: 1px solid #DDDDDD;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
height: auto;
width: 200px;
}
- .toc h3
+ .toc h3, .generic a
{
- font:600 12px/1.2 Arial;
+ font: 600 12px/1.2 Arial;
}
+
+ .generic{
+ max-width:75%;
+ }
+ .generic td{
+ padding:0;
+ }
+
+ .generic .odd .alphaChar{
+ background-color: #F6F6F6;
+ }
+
+ .generic .even .alphaChar{
+ background-color: #FFFFFF;
+ }
+
+ .alignedsummary{}
+ .propsummary{}
+ .memItemLeft{}
+ .memItemRight{}
+ .bottomAlign{}
+ .highlightedCode
+ {
+ margin:10px;
+ }
+ .LegaleseLeft{}
+ .valuelist{}
+ .annotated{}
+ .obsolete{}
+ .compat{}
+ .flags{}
+ .qmlsummary{}
+ .qmlitem{}
+ .qmlproto{}
+ .qmlname{}
+ .qmlreadonly{}
+ .qmldefault{}
+ .qmldoc{}
+ .qt-style{}
+ .redFont{}
+ code{}
.wrap .content .toc ul
{
- /* float: left;*/
padding-left: 0px;
-
}
.wrap .content .toc .level2
{
- /* float: left;*/
- padding-left: 15px;
-
+ margin-left: 15px;
}
-
.content .toc li
{
@@ -823,133 +954,191 @@
background: url(../images/bullet_dn.png) no-repeat 0 5px;
}
- .relpage
+ .relpage
{
-moz-border-radius: 7px 7px 7px 7px;
border: 1px solid #DDDDDD;
padding: 25px 25px;
- clear:both;
+ clear: both;
}
.relpage ul
{
float: none;
padding: 15px;
}
- .content .relpage li
+ .content .relpage li
{
font: normal 11px/1.2 Verdana;
}
- /* edit */
h3.fn, span.fn
{
background-color: #F6F6F6;
border-width: 1px;
border-style: solid;
border-color: #E6E6E6;
- font-weight: bold;
- /* padding: 6px 0px 6px 10px;*/
- /* margin: 42px 0px 0px 0px;*/
+ font-weight: bold;
+ word-spacing:3px;
}
- /* edit */
- .indexbox
- {
- width: 100%;
- }
- .content .indexboxcont li
- {
- font: normal 600 13px/1 Verdana;
- }
+ .functionIndex {
+ font-size:12pt;
+ word-spacing:10px;
+ margin-bottom:10px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ }
+
+ .centerAlign
+ {
+ text-align:center;
+ }
+
+ .rightAlign
+ {
+ text-align:right;
+ }
- /* .indexbox a
- {
- color: #00732f;
- text-decoration: none;
- }*/
- .indexbox a:hover, .indexbox a:visited:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
- .indexbox a:visited
+
+ .leftAlign
+ {
+ text-align:left;
+ }
+
+ .topAlign{
+ vertical-align:top
+ }
+
+ .functionIndex a{
+ display:inline-block;
+ }
+
+ /* start index box */
+ .indexbox
{
- color: #00732f;
- text-decoration: none;
+ width: 100%;
+ display:inline-block;
}
.indexboxcont
{
display: block;
+ /* overflow: hidden;*/
}
.indexboxbar
{
- background: transparent url( "../images/horBar.png" ) repeat-x left bottom;
+ background: transparent url(../images/horBar.png ) repeat-x left bottom;
margin-bottom: 25px;
+ /* background-image: none;
+ border-bottom: 1px solid #e2e2e2;*/
}
.indexboxcont .section
{
- display: inline-block;
+ display: inline-block;
width: 49%;
*width:42%;
_width:42%;
padding:0 2% 0 1%;
vertical-align:top;
+
}
.indexboxcont .indexIcon
- {
+ {
width: 11%;
*width:18%;
_width:18%;
overflow:hidden;
+
}
+
+.indexboxcont .section {
+ float: left;
+}
+
.indexboxcont .section p
- {
+ {
padding-top: 20px;
padding-bottom: 20px;
}
-
.indexboxcont .sectionlist
{
display: inline-block;
- width: 33%;
- margin-right: -2px;
- vertical-align: top;
+ width: 32.5%;
padding: 0;
}
- .tricol
- {
-
- }
.indexboxcont .sectionlist ul
{
- padding-left: 15px;
margin-bottom: 20px;
}
-/*
+
.indexboxcont .sectionlist ul li
{
line-height: 12px;
}
-*/
- .lastcol
+
+ .content .indexboxcont li
{
- display: inline-block;
- vertical-align: top;
- padding: 0;
- max-width: 25%;
+ font: normal 600 13px/1 Verdana;
}
- .tricol .lastcol
+ .indexbox a:hover, .indexbox a:visited:hover
{
- margin-left:-6px;
+ color: #4c0033;
+ text-decoration: underline;
}
- /*.toc ul*/
+ .indexbox a:visited
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
+
+ .indexbox .indexIcon {
+ width: 11%;
+ }
- /* end page elements */
+
+ .indexbox .indexIcon span
+ {
+ display: block;
+ }
+
+ .indexbox.guide .indexIcon span
+ {
+ width: 96px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -5px -376px;
+ padding: 0;
+ }
+
+ .indexbox.tools .indexIcon span
+ {
+ width: 115px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -111px -376px;
+ padding: 0;
+ }
+ .indexboxcont:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+
+.sidebar .search form input.loading
+{
+ background:url("../images/spinner.gif") no-repeat scroll right center transparent;
+}
+
+ /* end of screen media */
+
+
}
/* end of screen media */
@@ -957,7 +1146,7 @@
@media print
{
- .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
+ input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
{
display: none;
background: none;
diff --git a/doc/src/widgets-and-layouts/layout.qdoc b/doc/src/widgets-and-layouts/layout.qdoc
index 0cfde22..2ca202f 100644
--- a/doc/src/widgets-and-layouts/layout.qdoc
+++ b/doc/src/widgets-and-layouts/layout.qdoc
@@ -47,6 +47,7 @@
/*!
\page layout.html
\title Layout Management
+ \ingroup qt-gui-concepts
\brief A tour of the standard layout managers and an introduction to custom
layouts.
diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc
index 9a28715..31dfe40 100644
--- a/doc/src/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets-and-layouts/styles.qdoc
@@ -47,14 +47,9 @@
/*!
\page style-reference.html
- \title Implementing Styles and Style Aware Widgets
- \brief An overview of styles and the styling of widgets.
-
- \ingroup frameworks-technologies
-
- \previouspage Widget Classes
- \contentspage Widgets and Layouts
- \nextpage {Qt Style Sheets}{Style sheets}
+ \title Styles and Style Aware Widgets
+ \ingroup qt-gui-concepts
+ \brief Styles and the styling of widgets.
Styles (classes that inherit QStyle) draw on behalf of widgets
and encapsulate the look and feel of a GUI. The QStyle class is
@@ -90,8 +85,6 @@
current style. This document shows how widgets draw themselves
and which possibilities the style gives them.
- \tableofcontents
-
\section1 Classes for Widget Styling
These classes are used to customize an application's appearance and
diff --git a/doc/src/widgets-and-layouts/widgets.qdoc b/doc/src/widgets-and-layouts/widgets.qdoc
index 7bd27b6..9fe2d69 100644
--- a/doc/src/widgets-and-layouts/widgets.qdoc
+++ b/doc/src/widgets-and-layouts/widgets.qdoc
@@ -40,130 +40,121 @@
****************************************************************************/
/*!
- \page widgets-and-layouts.html
- \title Widgets and Layouts
-
- \ingroup frameworks-technologies
-
- \nextpage Widget Classes
-
- The primary elements for designing user interfaces in Qt are widgets and layouts.
-
- \section1 Widgets
-
- \l{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}.
-
- \image parent-child-widgets.png A parent widget containing various child widgets.
-
- The QWidget class provides the basic capability to render to the screen, and to
- handle user input events. All UI elements that Qt provides are either subclasses
- of QWidget, or are used in connection with a QWidget subclass. Creating custom
- widgets is done by subclassing QWidget or a suitable subclass and reimplementing
- the virtual event handlers.
-
- \section1 Layouts
-
- \l{Layout Management}{Layouts} are an elegant and flexible way to automatically
- arrange child widgets within their container. Each widget reports its size requirements
- to the layout through the \l{QWidget::}{sizeHint} and \l{QWidget::}{sizePolicy}
- properties, and the layout distributes the available space accordingly.
-
- \table
- \row
- \o \image qgridlayout-with-5-children.png
- \o \image qformlayout-with-6-children.png
- \endtable
-
- \l{Qt Designer Manual}{\QD} is a powerful tool for interactively creating and
- arranging widgets in layouts.
-
- \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.
+ \page widgets-and-layouts.html
+ \title Widgets and Layouts
+ \ingroup qt-gui-concepts
+ \brief The primary elements for designing user interfaces in Qt.
+
+ \section1 Widgets
+
+ Widgets are the primary elements for creating user interfaces in Qt.
+ \l{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}.
+
+ \image parent-child-widgets.png A parent widget containing various child widgets.
+
+ The QWidget class provides the basic capability to render to the
+ screen, and to handle user input events. All UI elements that Qt
+ provides are either subclasses of QWidget, or are used in connection
+ with a QWidget subclass. Creating custom widgets is done by
+ subclassing QWidget or a suitable subclass and reimplementing the
+ virtual event handlers.
+
+ \section1 Layouts
+
+ \l{Layout Management}{Layouts} are an elegant and flexible way to
+ automatically arrange child widgets within their container. Each
+ widget reports its size requirements to the layout through the
+ \l{QWidget::}{sizeHint} and \l{QWidget::}{sizePolicy} properties,
+ and the layout distributes the available space accordingly.
+
+ \table
+ \row
+ \o \image qgridlayout-with-5-children.png
+ \o \image qformlayout-with-6-children.png
+ \endtable
+
+ \l{Qt Designer Manual}{\QD} is a powerful tool for interactively creating and
+ arranging widgets in layouts.
+
+ \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.
- \table
- \row
- \o \image windowsxp-tabwidget.png
- \o \image plastique-tabwidget.png
- \o \image macintosh-tabwidget.png
- \endtable
-
- \l{Qt Style Sheets} are a powerful mechanism that allows you to customize the
- appearance of widgets, in addition to what is already possible by subclassing QStyle.
-*/
-
-/*!
- \page widget-classes.html
- \title Widget Classes
+ \table
+ \row
+ \o \image windowsxp-tabwidget.png
+ \o \image plastique-tabwidget.png
+ \o \image macintosh-tabwidget.png
+ \endtable
- \contentspage Widgets and Layouts
- \nextpage Layout Management
+ \l{Qt Style Sheets} are a powerful mechanism that allows you to customize the
+ appearance of widgets, in addition to what is already possible by subclassing QStyle.
- Below you find a list of all widget classes in Qt. You can also browse the
- widget classes Qt provides in the various supported styles in the
- \l{Qt Widget Gallery}.
+ \section1 The Widget Classes
- \tableofcontents
+ The following sections list the widget classes. See the \l{Qt Widget
+ Gallery} for some examples.
- \section1 Basic Widgets
+ \section2 Basic Widgets
- These basic widgets (controls), such as buttons, comboboxes and scroll bars, are
- designed for direct use.
+ These basic widgets (controls), e.g. buttons, comboboxes and
+ scroll bars, are designed for direct use.
- \table
- \row
- \o \image windows-label.png
- \o \image windowsvista-pushbutton.png
- \o \image gtk-progressbar.png
- \row
- \o \image plastique-combobox.png
- \o \image macintosh-radiobutton.png
- \o \image cde-lineedit.png
- \endtable
+ \table
+ \row
+ \o \image windows-label.png
+ \o \image windowsvista-pushbutton.png
+ \o \image gtk-progressbar.png
+ \row
+ \o \image plastique-combobox.png
+ \o \image macintosh-radiobutton.png
+ \o \image cde-lineedit.png
+ \endtable
- \annotatedlist basicwidgets
+ \annotatedlist basicwidgets
- \section1 Advanced Widgets
+ \section2 Advanced Widgets
- Advanced GUI widgets such as tab widgets and progress bars provide more
- complex user interface controls.
+ Advanced GUI widgets, e.g. tab widgets and progress bars, provide
+ more complex user interface controls.
- \table
- \row
- \o \image windowsxp-treeview.png
- \o \image gtk-calendarwidget.png
- \o \image qundoview.png
- \endtable
+ \table
+ \row
+ \o \image windowsxp-treeview.png
+ \o \image gtk-calendarwidget.png
+ \o \image qundoview.png
+ \endtable
- \annotatedlist advanced
+ \annotatedlist advanced
- \table
- \row
- \o \image windowsvista-tabwidget.png
- \o \image macintosh-groupbox.png
- \endtable
+ \table
+ \row
+ \o \image windowsvista-tabwidget.png
+ \o \image macintosh-groupbox.png
+ \endtable
- \section1 Organizer Widgets
+ \section2 Organizer Widgets
- Classes like splitters, tab bars, button groups, etc are used to
- organize and group GUI primitives into more complex applications or
- dialogs.
+ Classes like splitters, tab bars, button groups, etc are used for
+ organizing and grouping GUI primitives into more complex
+ applications and dialogs.
- \annotatedlist organizers
+ \annotatedlist organizers
- \section1 Abstract Widget Classes
+ \section2 Abstract Widget Classes
- Abstract widget classes usable through subclassing. They are generally
- not usable in themselves, but provide functionality that can be used
- by inheriting these classes.
+ The abstract widget classes are base classes. They are not usable as
+ standalone classes but provide functionality when they are subclassed.
- \annotatedlist abstractwidgets
+ \annotatedlist abstractwidgets
*/
/*!
diff --git a/doc/src/windows-and-dialogs/dialogs.qdoc b/doc/src/windows-and-dialogs/dialogs.qdoc
index acee0c5..0b0a842 100644
--- a/doc/src/windows-and-dialogs/dialogs.qdoc
+++ b/doc/src/windows-and-dialogs/dialogs.qdoc
@@ -52,6 +52,7 @@
/*!
\page dialogs.html
\title Dialog Windows
+ \ingroup qt-gui-concepts
\brief An overview over dialog windows.
\previouspage The Application Main Window
diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc
index 6adfa75..c1e66d9 100644
--- a/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -46,11 +46,11 @@
/*!
\page application-windows.html
- \title Application Windows and Dialogs
+ \title Window and Dialog Widgets
+ \brief Windows and Dialogs in Qt.
+ \ingroup qt-gui-concepts
\ingroup frameworks-technologies
- \nextpage The Application Main Window
-
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
windows without such decoration using suitable window flags). In Qt, QMainWindow
@@ -164,12 +164,9 @@
/*!
\page mainwindow.html
- \title The Application Main Window
- \brief Everything you need for a typical modern main application window,
- including menus, toolbars, workspace, etc.
-
- \contentspage Application Windows and Dialogs
- \nextpage Dialog Windows
+ \title Application Main Window
+ \ingroup qt-gui-concepts
+ \brief Creating the application window.
\tableofcontents