summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/bughowto.qdoc26
-rw-r--r--doc/src/deployment/deployment.qdoc25
-rw-r--r--doc/src/development/qmake-manual.qdoc44
-rw-r--r--doc/src/diagrams/gestures/pangesture.svg273
-rw-r--r--doc/src/diagrams/gestures/pinchgesture.svg341
-rw-r--r--doc/src/diagrams/gestures/swipegesture-details.svg168
-rw-r--r--doc/src/diagrams/gestures/swipegesture.svg158
-rw-r--r--doc/src/diagrams/webkit-domtraversal.pngbin0 -> 108725 bytes
-rw-r--r--doc/src/diagrams/webkit-simpleselector.pngbin0 -> 82564 bytes
-rw-r--r--doc/src/examples/audiodevices.qdoc2
-rw-r--r--doc/src/examples/audioinput.qdoc2
-rw-r--r--doc/src/examples/audiooutput.qdoc2
-rw-r--r--doc/src/examples/domtraversal.qdoc139
-rw-r--r--doc/src/examples/ftp.qdoc12
-rw-r--r--doc/src/examples/googlesuggest.qdoc148
-rw-r--r--doc/src/examples/imagegestures.qdoc116
-rw-r--r--doc/src/examples/simpleselector.qdoc128
-rw-r--r--doc/src/examples/stickman.qdoc9
-rw-r--r--doc/src/examples/videographicsitem.qdoc2
-rw-r--r--doc/src/examples/videowidget.qdoc30
-rw-r--r--doc/src/external-resources.qdoc50
-rw-r--r--doc/src/frameworks-technologies/eventsandfilters.qdoc2
-rw-r--r--doc/src/frameworks-technologies/gestures.qdoc249
-rw-r--r--doc/src/frameworks-technologies/statemachine.qdoc115
-rw-r--r--doc/src/getting-started/examples.qdoc107
-rw-r--r--doc/src/getting-started/installation.qdoc46
-rw-r--r--doc/src/getting-started/known-issues.qdoc28
-rw-r--r--doc/src/howtos/guibooks.qdoc6
-rw-r--r--doc/src/howtos/openvg.qdoc4
-rw-r--r--doc/src/images/googlesuggest-example.pngbin18809 -> 9006 bytes
-rw-r--r--doc/src/images/graphicseffect-bloom.pngbin79982 -> 0 bytes
-rw-r--r--doc/src/images/graphicseffect-effects.pngbin486123 -> 0 bytes
-rw-r--r--doc/src/images/graphicseffect-grayscale.pngbin58121 -> 0 bytes
-rw-r--r--doc/src/images/graphicseffect-pixelize.pngbin26390 -> 0 bytes
-rw-r--r--doc/src/images/hoverevents.pngbin0 -> 3210 bytes
-rw-r--r--doc/src/images/pangesture.pngbin0 -> 7153 bytes
-rw-r--r--doc/src/images/pinchgesture.pngbin0 -> 10094 bytes
-rw-r--r--doc/src/images/platformHWAcc.pngbin0 -> 11068 bytes
-rw-r--r--doc/src/images/simpleanchorlayout-example.pngbin0 -> 13463 bytes
-rw-r--r--doc/src/images/swipegesture.pngbin0 -> 6864 bytes
-rw-r--r--doc/src/images/webkit-domtraversal.pngbin0 -> 91304 bytes
-rw-r--r--doc/src/images/webkit-simpleselector.pngbin0 -> 130292 bytes
-rw-r--r--doc/src/internationalization/i18n.qdoc282
-rw-r--r--doc/src/internationalization/linguist-manual.qdoc45
-rw-r--r--doc/src/modules.qdoc41
-rw-r--r--doc/src/network-programming/qtnetwork.qdoc4
-rw-r--r--doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc (renamed from doc/src/snippets/gestures/qgesture.h)72
-rw-r--r--doc/src/platforms/emb-HwAcc-WinCE.qdoc (renamed from doc/src/snippets/gestures/imageviewer/tapandholdgesture.h)47
-rw-r--r--doc/src/platforms/emb-directfb-EmbLinux.qdoc330
-rw-r--r--doc/src/platforms/emb-fonts.qdoc6
-rw-r--r--doc/src/platforms/emb-hardwareacceleration.qdocinc129
-rw-r--r--doc/src/platforms/emb-opengl-EmbLinux.qdoc (renamed from doc/src/platforms/emb-opengl.qdoc)112
-rw-r--r--doc/src/platforms/emb-opengl.qdocinc85
-rw-r--r--doc/src/platforms/emb-openvg-EmbLinux.qdoc53
-rw-r--r--doc/src/platforms/emb-openvg.qdocinc288
-rw-r--r--doc/src/platforms/platform-notes.qdoc103
-rw-r--r--doc/src/platforms/qt-embedded-linux.qdoc2
-rw-r--r--doc/src/platforms/qt-embedded.qdoc9
-rw-r--r--doc/src/platforms/s60-introduction.qdoc10
-rw-r--r--doc/src/platforms/supported-platforms.qdoc6
-rw-r--r--doc/src/platforms/wince-introduction.qdoc2
-rw-r--r--doc/src/platforms/wince-opengl.qdoc70
-rw-r--r--doc/src/platforms/wince-openvg.qdoc65
-rw-r--r--doc/src/platforms/wince-signing.qdoc96
-rw-r--r--doc/src/platforms/winsystem.qdoc12
-rw-r--r--doc/src/qt-webpages.qdoc11
-rw-r--r--doc/src/qt4-intro.qdoc26
-rw-r--r--doc/src/snippets/code/doc_src_i18n.qdoc2
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qobject.cpp3
-rw-r--r--doc/src/snippets/code/src_corelib_tools_qbytearray.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp12
-rw-r--r--doc/src/snippets/code/src_gui_painting_qregion_unix.cpp6
-rw-r--r--doc/src/snippets/code/src_opengl_qglshaderprogram.cpp15
-rw-r--r--doc/src/snippets/gestures/imageviewer/imagewidget.cpp364
-rw-r--r--doc/src/snippets/gestures/imageviewer/imagewidget.h137
-rw-r--r--doc/src/snippets/gestures/imageviewer/tapandholdgesture.cpp159
-rw-r--r--doc/src/snippets/gestures/qgesture.cpp283
-rw-r--r--doc/src/snippets/gestures/qstandardgestures.cpp483
-rw-r--r--doc/src/snippets/gestures/qstandardgestures.h126
-rw-r--r--doc/src/snippets/statemachine/main2.cpp11
-rw-r--r--doc/src/snippets/statemachine/main5.cpp44
-rw-r--r--doc/src/sql-programming/sql-programming.qdoc4
82 files changed, 3578 insertions, 2211 deletions
diff --git a/doc/src/bughowto.qdoc b/doc/src/bughowto.qdoc
index 971634add6..e9ae9657c9 100644
--- a/doc/src/bughowto.qdoc
+++ b/doc/src/bughowto.qdoc
@@ -48,24 +48,32 @@
about it so that we can fix it.
Before reporting a bug, please check the \l{FAQs}, \l{Platform
- Notes}, and the \l{Task Tracker} on the Qt website to see
+ Notes}, and the \l{Qt Bug Tracker} on the Qt website to see
if the issue is already known.
- If you have found a new bug, please submit a bug report using
- the \l{Bug Report Form}. Always include the following information
- in your bug report:
+ The first thing you should do is to sign up for an account for
+ the \l{Qt Bug Tracker}, if you do not already have one. Once you
+ have done that you can submit and track your bug reports and they
+ will be publicly available from the moment you submit them.
+
+ Always include the following information in your bug report:
\list 1
\o The name and version number of your compiler
\o The name and version number of your operating system
\o The version of Qt you are using, and what configure options it was
- compiled with.
+ compiled with
+ \o Reliable and clear description on how to reproduce the problem
\endlist
+
+ If possible, please provide a test written using the QtTest module
+ as this will improve the procedure of reproducing your problem and
+ allow the developers to address the issue in a more efficient way.
- If the problem you are reporting is only visible at run-time, try to
- create a small test program that shows the problem when run. Often,
- such a program can be created with some minor changes to one
- of the many example programs in Qt's \c examples directory.
+ Otherwise, if the problem you are reporting is only visible at run-time,
+ try to create a small test program that shows the problem when run.
+ Often, such a program can be created with some minor changes to one of
+ the many example programs in Qt's examples directory.
If you have implemented a bug fix and want to contribute your fix
directly, then you can do so through the \l{Public Qt Repository}.
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index f2bae232b8..b5b1b9cf89 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -345,6 +345,7 @@
are many ways to solve this:
\list
+
\o You can install the Qt libraries in one of the system
library paths (e.g. \c /usr/lib on most systems).
@@ -804,6 +805,30 @@
compiler version against the same C runtime version. This prevents
deploying errors caused by different versions of the C runtime libraries.
+ \section2 Visual Studio 2008 And Manual Installs
+
+ As well as the above details for VS 2005 and onwards, Visual Studio 2008
+ applications may have problems when deploying manually, say to a USB
+ stick.
+
+ The recommended procedure is to configure Qt with the \c -plugin-manifests
+ option using the 'configure' tool. Then follow the \l {http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx}{guidelines}
+ for manually deploying private assemblies.
+
+ In brief the steps are
+
+ \list 1
+
+ \o create a folder structure on the development computer that will match the target USB stick directory structure, for example '\\app' and for your dlls, '\\app\\lib'.
+
+ \o on the development computer, from the appropriate 'redist' folder copy over Microsoft.VC80.CRT and Microsoft.VC80.MFC to the directories '\\app' and '\\app\\lib' on the development PC.
+
+ \o xcopy the \\app folder to the target USB stick.
+ \endlist
+
+ Your application should now run. Also be aware that even with a service
+ pack installed the Windows DLLs that are linked to will be the defaults. See
+ the information on \l {http://msdn.microsoft.com/en-us/library/cc664727.aspx}{how to select the appropriate target DLLs}.
\section1 Application Dependencies
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index d040d3d991..9548848f74 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -2252,6 +2252,18 @@ For example:
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_INCDIR_EGL may also need to be set.
+ \section1 QMAKE_INCDIR_OPENGL_ES1, QMAKE_INCDIR_OPENGL_ES1CL, QMAKE_INCDIR_OPENGL_ES2
+
+ These variables contain the location of OpenGL headers files to be added
+ to INCLUDEPATH when building an application with OpenGL ES 1, OpenGL ES 1 Common
+ Lite or OpenGL ES 2 support respectively.
+
+ The value of this variable is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ If the OpenGL implementation uses EGL (most OpenGL/ES systems),
+ then QMAKE_INCDIR_EGL may also need to be set.
+
\target QMAKE_INCDIR_OPENVG
\section1 QMAKE_INCDIR_OPENVG
@@ -2341,6 +2353,13 @@ For example:
of this variable is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ \section1 QMAKE_LFLAGS_RPATH
+
+ \e {This is used on Unix platforms only.}
+
+ Library paths in this definition are added to the executable at link
+ time so that the added paths will be preferentially searched at runtime.
+
\section1 QMAKE_LFLAGS_QT_DLL
This variable contains link flags when building programs that
@@ -2491,6 +2510,17 @@ For example:
variable is typically handled by \c qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ \section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES1CL, QMAKE_LIBS_OPENGL_ES2
+
+ These variables contain all the OpenGL libraries for OpenGL ES 1,
+ OpenGL ES 1 Common Lite profile and OpenGL ES 2.
+
+ The value of these variables is typically handled by \c qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ If the OpenGL implementation uses EGL (most OpenGL/ES systems),
+ then QMAKE_LIBS_EGL may also need to be set.
+
\section1 QMAKE_LIBS_OPENVG
This variable contains all OpenVG libraries. The value of this
@@ -2667,6 +2697,20 @@ For example:
\snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 45
+ \section1 QMAKE_RPATH
+
+ \e {This is used on Unix platforms only.}
+
+ Is equivalent to \l QMAKE_LFLAGS_RPATH.
+
+ \section1 QMAKE_RPATHDIR
+
+ \e {This is used on Unix platforms only.}
+
+ A list of library directory paths, these paths are added to the
+ executable at link time so that the paths will be preferentially
+ searched at runtime.
+
\section1 QMAKE_RUN_CC
This variable specifies the individual rule needed to build an object.
diff --git a/doc/src/diagrams/gestures/pangesture.svg b/doc/src/diagrams/gestures/pangesture.svg
new file mode 100644
index 0000000000..c5b95ca042
--- /dev/null
+++ b/doc/src/diagrams/gestures/pangesture.svg
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="pangesture.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient3198">
+ <stop
+ style="stop-color:#c8c8e1;stop-opacity:1;"
+ offset="0"
+ id="stop3200" />
+ <stop
+ style="stop-color:#e0e0e0;stop-opacity:0;"
+ offset="1"
+ id="stop3202" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective2473"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3198"
+ id="linearGradient3204"
+ x1="487.5"
+ y1="158.61218"
+ x2="487.5"
+ y2="171.11218"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-143.75,1.0517187e-5)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="2"
+ inkscape:cx="297.42699"
+ inkscape:cy="855.02875"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1184"
+ inkscape:window-height="668"
+ inkscape:window-x="152"
+ inkscape:window-y="228">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2383"
+ visible="true"
+ enabled="true"
+ units="pt"
+ spacingx="1pt"
+ spacingy="1pt" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3235"
+ width="275"
+ height="162.5"
+ x="137.5"
+ y="114.86218"
+ ry="25.253815"
+ rx="25.253815"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:5, 5;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3167"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(62.5,18.75)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#c90000;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3169"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(206.25,18.75)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:5.625, 5.625;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 200,183.61218 C 243.75,171.11218 300,171.11218 343.75,183.61218"
+ sodipodi:nodetypes="cc"
+ id="path12"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <g
+ id="g3214"
+ transform="translate(2.07835,-3.2783474)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72">
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 316.67165,230.64053 C 318.73754,225.81328 330.55722,234.70496 337.5,236.73718 L 337.5,189.86218 C 337.5,180.48718 346.875,180.48718 346.875,189.86218 L 346.875,222.67468 L 346.875,208.61218 C 346.875,203.92468 356.25,203.92468 356.25,208.61218 L 356.25,222.67468 L 356.25,213.29968 C 356.25,208.61218 365.625,208.61218 365.625,213.29968 L 365.625,227.36218 L 365.625,217.98718 C 365.625,213.29968 375,213.29968 375,217.98718 L 375,264.86218 C 365.625,269.54968 346.875,269.54968 337.5,264.86218 L 337.5,250.79968 C 331.50558,243.39877 314.0625,236.73718 316.67165,230.64053 z"
+ id="path2480"
+ sodipodi:nodetypes="ccccccccccccccccc" />
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.9375;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 345.62962,192.2547 C 345.62962,188.66774 345.62962,185.08078 342.1875,185.08078 C 338.7454,185.08078 338.7454,188.66774 338.7454,192.2547 C 338.7454,195.84166 345.62962,195.84166 345.62962,192.2547 z"
+ id="path2478"
+ sodipodi:nodetypes="cccc" />
+ </g>
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ id="path3218"
+ d="M 165.625,142.98718 L 175,133.61218 L 184.375,142.98718 L 165.625,142.98718 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ sodipodi:nodetypes="cccc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 193.75,139.86218 L 206.25,127.36218 L 218.75,139.86218 L 193.75,139.86218 z"
+ id="path3220" />
+ <path
+ style="fill:none;fill-opacity:0.75000000000000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 143.75,164.86218 L 175,133.61218 L 187.5,146.11218 L 206.25,127.36218 L 243.75,164.86218"
+ id="path3157"
+ sodipodi:nodetypes="ccccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ id="path3222"
+ d="M 237.5,146.11218 L 243.75,139.86218 L 250,146.11218 L 237.5,146.11218 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="cccc" />
+ <path
+ style="fill:none;fill-opacity:0.75000000000000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 231.25,152.36218 L 243.75,139.86218 L 256.25,152.36218"
+ id="path3159"
+ sodipodi:nodetypes="ccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="cc"
+ id="path3186"
+ d="M 175,158.61218 L 187.5,146.11218"
+ style="fill:none;fill-opacity:0.75000000000000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:url(#linearGradient3204);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 281.25,171.11218 L 318.75,133.61218 L 331.25,146.11218 L 350,127.36218 L 375,152.36218 L 387.5,139.86218 L 400,152.36218 L 400,171.11218"
+ id="path3196"
+ sodipodi:nodetypes="cccccccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="M 309.375,142.98718 L 318.75,133.61218 L 328.125,142.98718 L 309.375,142.98718 z"
+ id="path3182"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ id="path3184"
+ d="M 337.5,139.86218 L 350,127.36218 L 362.5,139.86218 L 337.5,139.86218 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="cccc"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="M 381.25,146.11218 L 387.5,139.86218 L 393.75,146.11218 L 381.25,146.11218 z"
+ id="path3188"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path3208"
+ d="M 287.5,164.86218 L 318.75,133.61218 L 331.25,146.11218 L 350,127.36218 L 387.5,164.86218"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="ccc"
+ id="path3210"
+ d="M 375,152.36218 L 387.5,139.86218 L 400,152.36218"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 318.75,158.61218 L 331.25,146.11218"
+ id="path3212"
+ sodipodi:nodetypes="cc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ </g>
+</svg>
diff --git a/doc/src/diagrams/gestures/pinchgesture.svg b/doc/src/diagrams/gestures/pinchgesture.svg
new file mode 100644
index 0000000000..1c520b9c0d
--- /dev/null
+++ b/doc/src/diagrams/gestures/pinchgesture.svg
@@ -0,0 +1,341 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="pinchgesture.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective2473"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3362"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3429"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3639"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.979899"
+ inkscape:cx="299.95763"
+ inkscape:cy="879.65793"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1184"
+ inkscape:window-height="668"
+ inkscape:window-x="223"
+ inkscape:window-y="324">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2383"
+ visible="true"
+ enabled="true"
+ units="pt"
+ spacingx="1pt"
+ spacingy="1pt" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3235"
+ width="275"
+ height="162.5"
+ x="137.5"
+ y="114.86218"
+ ry="25.253815"
+ rx="25.253815"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <rect
+ ry="0"
+ rx="0"
+ y="127.36218"
+ x="168.75"
+ height="81.25"
+ width="212.5"
+ id="rect3839"
+ style="opacity:1;fill:#4040a0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 168.75,158.61218 C 200,164.86218 243.75,164.86218 275,171.11218 C 293.75,164.86218 356.25,158.61218 381.25,158.61218 L 381.25,208.61218 L 256.25,208.61218 L 168.75,208.61218 L 168.75,158.61218 z"
+ id="path3845"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <rect
+ style="opacity:1;fill:#404060;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.93750000000000000;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3328"
+ width="75"
+ height="56.25"
+ x="237.5"
+ y="139.86218"
+ rx="0"
+ ry="0"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:#2f4f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 312.5,164.86218 C 306.25,158.61218 281.25,171.11218 262.5,164.86218 C 247.30507,158.35772 243.75,164.86218 237.5,171.11218 L 237.5,196.11218 L 312.5,196.11218 L 312.5,164.86218 z"
+ id="path3841"
+ sodipodi:nodetypes="cccccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:0.12437811;fill-rule:evenodd;stroke:#000000;stroke-width:2.50000000000000000;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:5, 5;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3167"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(118.75,0)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:#c90000;stroke-width:2.50000000000000000;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3169"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(225.5176,19.302421)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ transform="translate(50,-6.25)"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ sodipodi:ry="12.5"
+ sodipodi:rx="12.5"
+ sodipodi:cy="164.86218"
+ sodipodi:cx="137.5"
+ id="path3649"
+ style="opacity:1;fill:#ffffff;fill-opacity:0;fill-rule:evenodd;stroke:#c90000;stroke-width:2.50000000000000000;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <g
+ id="g3641"
+ inkscape:label="Layer 1"
+ transform="matrix(-0.75,0,0,0.75,585.42164,37.937193)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72">
+ <g
+ id="g3643">
+ <path
+ sodipodi:nodetypes="ccccccccccccccccc"
+ id="path3645"
+ d="M 497.22886,219.23332 C 499.98338,212.79698 515.74295,224.65256 525,227.36218 L 525,164.86218 C 525,152.36218 537.5,152.36218 537.5,164.86218 L 537.5,208.61218 L 537.5,189.86218 C 537.5,183.61218 550,183.61218 550,189.86218 L 550,208.61218 L 550,196.11218 C 550,189.86218 562.5,189.86218 562.5,196.11218 L 562.5,214.86218 L 562.5,202.36218 C 562.5,196.11218 575,196.11218 575,202.36218 L 575,264.86218 C 562.5,271.11218 537.5,271.11218 525,264.86218 L 525,246.11218 C 517.00744,236.2443 493.75,227.36218 497.22886,219.23332 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path3647"
+ d="M 535.83948,168.05221 C 535.83948,163.26959 535.83948,158.48698 531.25,158.48698 C 526.66052,158.48698 526.66052,163.26959 526.66052,168.05221 C 526.66052,172.83482 535.83948,172.83482 535.83948,168.05221 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:5.625, 5.625;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 187.5,158.61218 L 256.25,164.86218"
+ sodipodi:nodetypes="cc"
+ id="path12"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ transform="translate(156.25,6.25)"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ sodipodi:ry="12.5"
+ sodipodi:rx="12.5"
+ sodipodi:cy="164.86218"
+ sodipodi:cx="137.5"
+ id="path3659"
+ style="opacity:1;fill:#ffffff;fill-opacity:0.12437811;fill-rule:evenodd;stroke:#000000;stroke-width:2.50000000000000000;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:5, 5;stroke-dashoffset:0;stroke-opacity:1"
+ sodipodi:type="arc" />
+ <path
+ inkscape:export-ydpi="72"
+ inkscape:export-xdpi="72"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ id="path3661"
+ sodipodi:nodetypes="cc"
+ d="M 293.75,171.11218 L 362.5,183.61218"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:5.625, 5.625;stroke-dashoffset:0;stroke-opacity:1" />
+ <g
+ id="g3431"
+ inkscape:label="Layer 1"
+ transform="matrix(0.7386058,0.1302361,-0.1302361,0.7386058,-8.1572814,-2.6927947)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72">
+ <g
+ id="g3210">
+ <path
+ sodipodi:nodetypes="ccccccccccccccccc"
+ id="path3191"
+ d="M 497.22886,219.23332 C 499.98338,212.79698 515.74295,224.65256 525,227.36218 L 525,164.86218 C 525,152.36218 537.5,152.36218 537.5,164.86218 L 537.5,208.61218 L 537.5,189.86218 C 537.5,183.61218 550,183.61218 550,189.86218 L 550,208.61218 L 550,196.11218 C 550,189.86218 562.5,189.86218 562.5,196.11218 L 562.5,214.86218 L 562.5,202.36218 C 562.5,196.11218 575,196.11218 575,202.36218 L 575,264.86218 C 562.5,271.11218 537.5,271.11218 525,264.86218 L 525,246.11218 C 517.00744,236.2443 493.75,227.36218 497.22886,219.23332 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path3197"
+ d="M 535.83948,168.05221 C 535.83948,163.26959 535.83948,158.48698 531.25,158.48698 C 526.66052,158.48698 526.66052,163.26959 526.66052,168.05221 C 526.66052,172.83482 535.83948,172.83482 535.83948,168.05221 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 312.5,171.11218 L 356.25,171.11218"
+ id="path3847"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:#c44060;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 362.5,171.11218 L 362.5,139.86218 L 312.5,139.86218 L 312.5,171.11218 L 362.5,171.11218 z"
+ id="path3849"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 368.75,139.86218 L 356.25,127.36218 L 318.75,127.36218 L 306.25,139.86218 L 368.75,139.86218 z"
+ id="path3853"
+ sodipodi:nodetypes="ccccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path3855"
+ d="M 331.25,158.61218 L 331.25,146.11218 L 318.75,146.11218 L 318.75,158.61218 L 331.25,158.61218 z"
+ style="fill:#5b77ff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:#c0cb54;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 356.25,171.11218 L 356.25,146.11218 L 343.75,146.11218 L 343.75,171.11218 L 356.25,171.11218 z"
+ id="path3857"
+ sodipodi:nodetypes="ccccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ id="path3868"
+ d="M 282.8125,167.98719 L 293.75,167.98719"
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:0.25px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path3870"
+ d="M 295.3125,167.98719 L 295.3125,160.17469 L 282.8125,160.17469 L 282.8125,167.98719 L 295.3125,167.98719 z"
+ style="fill:#681e2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.25000000000000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path3872"
+ d="M 296.875,160.17469 L 293.75,157.04969 L 284.375,157.04969 L 281.25,160.17469 L 296.875,160.17469 z"
+ style="fill:#6e6c6c;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.25000000000000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:#2f3e85;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.31250000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 287.5,164.86219 L 287.5,161.73719 L 284.375,161.73719 L 284.375,164.86219 L 287.5,164.86219 z"
+ id="path3874"
+ sodipodi:nodetypes="cccc"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ id="path3876"
+ d="M 293.75,167.98719 L 293.75,161.73719 L 290.625,161.73719 L 290.625,167.98719 L 293.75,167.98719 z"
+ style="fill:#65692a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.31250000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pinchgesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ </g>
+</svg>
diff --git a/doc/src/diagrams/gestures/swipegesture-details.svg b/doc/src/diagrams/gestures/swipegesture-details.svg
new file mode 100644
index 0000000000..0f7de5b487
--- /dev/null
+++ b/doc/src/diagrams/gestures/swipegesture-details.svg
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="swipegesture-details.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective2473"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3362"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3429"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="321.9787"
+ inkscape:cy="855.02875"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1184"
+ inkscape:window-height="668"
+ inkscape:window-x="152"
+ inkscape:window-y="228">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2383"
+ visible="true"
+ enabled="true"
+ units="pt"
+ spacingx="1pt"
+ spacingy="1pt" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3235"
+ width="275"
+ height="162.5"
+ x="137.5"
+ y="114.86218"
+ ry="25.253815"
+ rx="25.253815"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:5, 5;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3167"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(43.75,-25)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#c90000;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3169"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(218.75,18.75)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:5.625, 5.625;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 181.25,139.86218 L 356.25,183.61218"
+ sodipodi:nodetypes="cc"
+ id="path12"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <g
+ id="g3431"
+ inkscape:label="Layer 1"
+ transform="matrix(0.7386058,0.1302361,-0.1302361,0.7386058,-15.203718,-5.6523172)">
+ <g
+ id="g3210">
+ <path
+ sodipodi:nodetypes="ccccccccccccccccc"
+ id="path3191"
+ d="M 497.22886,219.23332 C 499.98338,212.79698 515.74295,224.65256 525,227.36218 L 525,164.86218 C 525,152.36218 537.5,152.36218 537.5,164.86218 L 537.5,208.61218 L 537.5,189.86218 C 537.5,183.61218 550,183.61218 550,189.86218 L 550,208.61218 L 550,196.11218 C 550,189.86218 562.5,189.86218 562.5,196.11218 L 562.5,214.86218 L 562.5,202.36218 C 562.5,196.11218 575,196.11218 575,202.36218 L 575,264.86218 C 562.5,271.11218 537.5,271.11218 525,264.86218 L 525,246.11218 C 517.00744,236.2443 493.75,227.36218 497.22886,219.23332 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path3197"
+ d="M 535.83948,168.05221 C 535.83948,163.26959 535.83948,158.48698 531.25,158.48698 C 526.66052,158.48698 526.66052,163.26959 526.66052,168.05221 C 526.66052,172.83482 535.83948,172.83482 535.83948,168.05221 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 181.25,139.86218 L 356.25,139.86218"
+ id="path3436"
+ sodipodi:nodetypes="cc" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 287.5,139.86218 C 287.5,146.11218 287.5,158.61218 281.25,164.86218"
+ id="path3438"
+ sodipodi:nodetypes="cc" />
+ </g>
+</svg>
diff --git a/doc/src/diagrams/gestures/swipegesture.svg b/doc/src/diagrams/gestures/swipegesture.svg
new file mode 100644
index 0000000000..fc60a4db23
--- /dev/null
+++ b/doc/src/diagrams/gestures/swipegesture.svg
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="swipegesture.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <inkscape:perspective
+ id="perspective2473"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3362"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3429"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="321.9787"
+ inkscape:cy="855.02875"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:window-width="1184"
+ inkscape:window-height="668"
+ inkscape:window-x="152"
+ inkscape:window-y="228">
+ <inkscape:grid
+ type="xygrid"
+ id="grid2383"
+ visible="true"
+ enabled="true"
+ units="pt"
+ spacingx="1pt"
+ spacingy="1pt" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <rect
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect3235"
+ width="275"
+ height="162.5"
+ x="137.5"
+ y="114.86218"
+ ry="25.253815"
+ rx="25.253815"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:5, 5;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3167"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(43.75,-25)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#c90000;stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="path3169"
+ sodipodi:cx="137.5"
+ sodipodi:cy="164.86218"
+ sodipodi:rx="12.5"
+ sodipodi:ry="12.5"
+ d="M 150,164.86218 A 12.5,12.5 0 1 1 125,164.86218 A 12.5,12.5 0 1 1 150,164.86218 z"
+ transform="translate(218.75,18.75)"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <path
+ style="fill:none;fill-opacity:0.75;fill-rule:evenodd;stroke:#000000;stroke-width:1.875;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:5.625, 5.625;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 181.25,139.86218 L 356.25,183.61218"
+ sodipodi:nodetypes="cc"
+ id="path12"
+ inkscape:export-filename="/home/dboddie/git/qt/doc/src/images/pangesture.png"
+ inkscape:export-xdpi="72"
+ inkscape:export-ydpi="72" />
+ <g
+ id="g3431"
+ inkscape:label="Layer 1"
+ transform="matrix(0.7386058,0.1302361,-0.1302361,0.7386058,-15.203718,-5.6523172)">
+ <g
+ id="g3210">
+ <path
+ sodipodi:nodetypes="ccccccccccccccccc"
+ id="path3191"
+ d="M 497.22886,219.23332 C 499.98338,212.79698 515.74295,224.65256 525,227.36218 L 525,164.86218 C 525,152.36218 537.5,152.36218 537.5,164.86218 L 537.5,208.61218 L 537.5,189.86218 C 537.5,183.61218 550,183.61218 550,189.86218 L 550,208.61218 L 550,196.11218 C 550,189.86218 562.5,189.86218 562.5,196.11218 L 562.5,214.86218 L 562.5,202.36218 C 562.5,196.11218 575,196.11218 575,202.36218 L 575,264.86218 C 562.5,271.11218 537.5,271.11218 525,264.86218 L 525,246.11218 C 517.00744,236.2443 493.75,227.36218 497.22886,219.23332 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="cccc"
+ id="path3197"
+ d="M 535.83948,168.05221 C 535.83948,163.26959 535.83948,158.48698 531.25,158.48698 C 526.66052,158.48698 526.66052,163.26959 526.66052,168.05221 C 526.66052,172.83482 535.83948,172.83482 535.83948,168.05221 z"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/doc/src/diagrams/webkit-domtraversal.png b/doc/src/diagrams/webkit-domtraversal.png
new file mode 100644
index 0000000000..5cd6d1ff7d
--- /dev/null
+++ b/doc/src/diagrams/webkit-domtraversal.png
Binary files differ
diff --git a/doc/src/diagrams/webkit-simpleselector.png b/doc/src/diagrams/webkit-simpleselector.png
new file mode 100644
index 0000000000..e442f977f8
--- /dev/null
+++ b/doc/src/diagrams/webkit-simpleselector.png
Binary files differ
diff --git a/doc/src/examples/audiodevices.qdoc b/doc/src/examples/audiodevices.qdoc
index 0d0932ea33..1505846174 100644
--- a/doc/src/examples/audiodevices.qdoc
+++ b/doc/src/examples/audiodevices.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example multimedia/audio/audiodevices
+ \example multimedia/audiodevices
\title Audio Devices Example
The Audio Devices example demonstrates the basic use of QAudioDeviceInfo class
diff --git a/doc/src/examples/audioinput.qdoc b/doc/src/examples/audioinput.qdoc
index ac44d75374..8553e92fe3 100644
--- a/doc/src/examples/audioinput.qdoc
+++ b/doc/src/examples/audioinput.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example multimedia/audio/audioinput
+ \example multimedia/audioinput
\title AudioInput Example
The Audio Input example demonstrates the basic use of QAudioInput class
diff --git a/doc/src/examples/audiooutput.qdoc b/doc/src/examples/audiooutput.qdoc
index 2ed6ce4f94..58b8ea9e61 100644
--- a/doc/src/examples/audiooutput.qdoc
+++ b/doc/src/examples/audiooutput.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example multimedia/audio/audiooutput
+ \example multimedia/audiooutput
\title Audio Output Example
The Audio Output example demonstrates the basic use of the QAudioOutput class
diff --git a/doc/src/examples/domtraversal.qdoc b/doc/src/examples/domtraversal.qdoc
new file mode 100644
index 0000000000..57e61d05b3
--- /dev/null
+++ b/doc/src/examples/domtraversal.qdoc
@@ -0,0 +1,139 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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$
+**
+****************************************************************************/
+
+/*!
+ \example webkit/domtraversal
+ \title DOM Traversal Example
+
+ The DOM Traversal example shows how to use the QWebElement class to access
+ the structure of a Web page.
+
+ \image webkit-domtraversal.png
+
+ The QWebElement class provides an API that can be used to examine the structure
+ and content of a Web page via a Document Object Model (DOM) interface. It can be
+ used for basic traversal of the document structure, to search for particular
+ elements (see the \l{Simple Selector Example}), and to modify content in-place.
+
+ This example uses a QWebView widget to display the Web page, and a dock widget
+ holds the QTreeWidget that shows the document structure. These widgets are
+ placed in an instance of the \c Window class, which we describe below.
+
+ \section1 Window Class Definition
+
+ The \c Window class is derived from QMainWindow and its user interface is created
+ using \l{Qt Designer}. As a result, the class is also derived from the user
+ interface class created by \l uic:
+
+ \snippet examples/webkit/domtraversal/window.h Window class definition
+
+ Two important functions to note are the \c on_webView_loadFinished() slot and
+ the \c examineChildElements() function. The former is automatically called
+ when the QWebView widget finishes loading a page \mdash see the
+ \l{#Further Reading}{Further Reading} section for more information on this
+ mechanism.
+
+ The \c examineChildElements() function is used to traverse the document structure
+ and add items to the QTreeWidget.
+
+ \section1 Window Class Implementation
+
+ In the \c Window class constructor, we call the \l{QWidget::}{setupUi()} function
+ to set up the user interface described in the \c{window.ui} file:
+
+ \snippet examples/webkit/domtraversal/window.cpp Window constructor
+
+ When the Web page is loaded, the \c on_webView_loadFinished() slot is called. Here,
+ we clear the tree widget and begin inspection of the document by obtaining the
+ document element from the page's main frame:
+
+ \snippet examples/webkit/domtraversal/window.cpp begin document inspection
+
+ At this point, we call the \c examineChildElements() function to traverse the
+ document, starting with the child elements of the document element for which we
+ will create top level items in the tree widget.
+
+ The \c examineChildElements() function accepts a parent element and a parent item.
+ Starting with the first child element, which we obtain with the element's
+ \l{QWebElement::}{firstChild()} function, we examine each child element of the
+ parent item. For each valid (non-null) element, which we check by calling its
+ \l{QWebElement::}{isNull()} function, we create a new QTreeWidgetItem instance with
+ the element name and add it to the parent item.
+
+ \snippet examples/webkit/domtraversal/window.cpp traverse document
+
+ We recursively examine the child elements for each element by calling
+ \c examineChildElements() with the current child element and the newly-created item.
+ To obtain the next element at the same level in the document, we call its
+ \l{QWebElement::}{nextSibling()} function.
+
+ This recursive approach to reading the document makes it easy to create a simple
+ representation of the document structure in a tree widget.
+
+ For completeness, we show the \c setUrl() function, which is provided to allow the
+ document URL to be set from the example's \c main() function.
+
+ \snippet examples/webkit/domtraversal/window.cpp set URL
+
+ \section1 Starting the Example
+
+ We set up the application, create
+ a \c Window instance, set its URL, and show it:
+
+ \snippet examples/webkit/simpleselector/main.cpp main program
+
+ When the application's event loop is run, the Qt home page will load, and the
+ tree widget will be updated to show the document structure. Navigating to another
+ page will cause the tree widget to be updated to show the document structure of
+ the new page.
+
+ \section1 Further Reading
+
+ The QWebElement documentation contains more information about DOM access for the
+ QtWebKit classes.
+
+ In this example, we take advantage of Qt's
+ \l{Using a Designer UI File in Your Application#Automatic Connections}{auto-connection}
+ feature to avoid explicitly connecting signals to slots. The user interface
+ contains a QWebView widget called \c webView whose \l{QWebView::}{loadFinished()}
+ signal is automatically connected to the \c on_webView_loadFinished() slot when
+ we call \l{QWidget::}{setupUi()} in the \c Window constructor.
+*/
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
index 8fded88b8a..68fb0d7239 100644
--- a/doc/src/examples/ftp.qdoc
+++ b/doc/src/examples/ftp.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example network/ftp
+ \example network/qftp
\title FTP Example
The FTP example demonstrates a simple FTP client that can be used
@@ -90,12 +90,12 @@
the FTP server, and registers whether an entry represents a
directory or a file. We use the QFile object to download files
from the FTP server.
-
+
\section1 FtpWindow Class Implementation
We skip the \c FtpWindow constructor as it only contains code for
setting up the GUI, which is explained in other examples.
-
+
We move on to the slots, starting with \c connectOrDisconnect().
\snippet examples/network/qftp/ftpwindow.cpp 0
@@ -137,7 +137,7 @@
\snippet examples/network/qftp/ftpwindow.cpp 3
\dots
\snippet examples/network/qftp/ftpwindow.cpp 4
-
+
We first fetch the name of the file, which we find in the selected
item of \c fileList. We then start the download by using
QFtp::get(). QFtp will send progress signals during the download
@@ -153,7 +153,7 @@
finished a QFtp::Command. If an error occurred during the
command, QFtp will set \c error to one of the values in
the QFtp::Error enum; otherwise, \c error is zero.
-
+
\snippet examples/network/qftp/ftpwindow.cpp 7
After login, the QFtp::list() function will list the top-level
@@ -165,7 +165,7 @@
When a \l{QFtp::}{Get} command is finished, a file has finished
downloading (or an error occurred during the download).
-
+
\snippet examples/network/qftp/ftpwindow.cpp 9
After a \l{QFtp::}{List} command is performed, we have to check if
diff --git a/doc/src/examples/googlesuggest.qdoc b/doc/src/examples/googlesuggest.qdoc
index bec242dec3..ab8ab57a94 100644
--- a/doc/src/examples/googlesuggest.qdoc
+++ b/doc/src/examples/googlesuggest.qdoc
@@ -43,10 +43,152 @@
\example network/googlesuggest
\title Google Suggest Example
- The Google Suggest example shows how to use the network access manager
- to get the list of suggested search terms from Google.
+ The Google Suggest example demonstrates how to use the QNetworkAccessManager
+ class to obtain a list of suggestions from the Google search engine as the
+ user types into a QLineEdit.
\image googlesuggest-example.png
- \note The Google Suggest suggestion service is a registered trademark of Google Inc.
+ The application makes use of the \c get function in
+ QNetworkAccessManager to post a request and obtain the result of the search
+ query sent to the Google search engine. The results returned are listed as
+ clickable links appearing below the search box as a drop-down menu.
+
+ The widget is built up by a QLineEdit as the search box, and a QTreeView
+ used as a popup menu below the search box.
+
+ \section1 GSuggestCompletion Class Declaration
+
+ This class implements an event filter and a number of functions to display
+ the search results and to determent when and how to perform the search.
+
+ \snippet examples/network/googlesuggest/googlesuggest.h 1
+
+ The class connects to a QLineEdit and uses a QTreeWidget to display the
+ results. A QTimer controls the start of the network requests that are
+ executed using a QNetworkAccessManager.
+
+ \section1 GSuggestCompletion Class Implementation
+
+ We start by defining a constant containing the URL to be used in the Google
+ queries. This is the basis for the query. The letters typed into the search
+ box will be added to the query to perform the search itself.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 1
+
+ In the constructor, we set the parent of this GSuggestCompletion instance
+ to be the QLineEdit passed in. For simplicity, the QLineEdit is also stored
+ in the explicit \c editor member variable.
+
+ We then create a QTreeWidget as a toplevel widget and configure the various
+ properties to give it the look of a popup widget.
+
+ The popup will be populated by the results returned from Google. We set
+ the number of columns to be two, since we want to display both the
+ suggested search term and the number of hits it will trigger in the search
+ engine.
+
+ Furthermore, we install the GSuggestCompletion instance as an event filter
+ on the QTreeWidget, and connect the \c itemClicked() signal with the \c
+ doneCompletion() slot.
+
+ A single-shot QTimer is used to start the request when the user has stopped
+ typing for 500 ms.
+
+ Finally, we connect the networkManagers \c finished() signal with the \c
+ handleNetworkData() slot to handle the incoming data.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 2
+
+ Since the QTreeWidget popup has been instantiated as a toplevel widget, the
+ destructor has to delete it explicitly from memory to avoid a memory leak.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 3
+
+ The event filter handles mouse press and key press events that are
+ delivered to the popup. For mouse press events we just hide the popup and
+ return focus to the editor widget, and then return true to prevent further
+ event processing.
+
+ Key event handling is implemented so that Enter and Return execute the
+ selected link, while the Escape key hides the popup. Sine we want to be
+ able to navigate the list of suggestions using the different navigation
+ keys on the keyboard we let Qt continue regular event processing for those
+ by returning false from the eventFilter reimplementation.
+
+ For all other keys, the event will be passed on to the editor widget and the
+ popup is hidden. This way the user's typing will not be interrupted by the
+ popping up of the completion list.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 4
+
+ The \c showCompletion() function populates the QTreeWidget with the results
+ returned from the query. It takes two QStringLists, one with the suggested
+ search terms and the other with the corresponding number of hits.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 5
+
+ A QTreeWidgetItem is created for each index in the list and inserted into
+ the QTreeWidget. Finally, we adjust position and size of the popup to make
+ sure that it pops up in the correct position below the editor, and show it.
+
+ The \c doneCompletion() function, which is called by the event filter when
+ either Enter or Return keys are pressed, stops the timer to prevent further
+ requests and passes the text of the selected item to the editor. We then
+ make the \c editor QLineEdit emit the returnPressed() signal, to which the
+ application can connect to open the respective web page.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 6
+
+ The \c autoSuggest() slot is called when the timer times out, and uses the
+ text in the editor to build the complete search query. The query is then
+ passed to the QNetworkAccessManager's \c get() function to start the
+ request.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 7
+
+ The function \c preventSuggest() stops the timer to prevent further
+ requests from being started.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 8
+
+ When the network request is finished, the QNetworkAccessManager delivers the
+ data received from the server through the networkReply object.
+
+ \snippet examples/network/googlesuggest/googlesuggest.cpp 9
+
+ To extract the data from the reply we use the \c readAll() function, which
+ is inherited from QIODevice and returns a QByteArray. Since this data is
+ encoded in XML we can use a QXmlStreamReader to traverse the data and
+ extract the search result as QStrings, which we can stream into two
+ QStringLists used to populate the popup.
+
+ Finally, we schedule the QNetworkReply object for deletion using the \c
+ deleteLater function.
+
+ \section1 SearchBox Class Declaration
+
+ The SearchBox class inherits QLineEdit and adds the protected slot \c
+ doSearch().
+
+ A \c GSuggestCompletion member provides the SearchBox with the request
+ functionality and the suggestions returned from the Google search engine.
+
+ \snippet examples/network/googlesuggest/searchbox.h 1
+
+ \section1 SearchBox Class Implementation
+
+ The search box constructor instantiates the GSuggestCompletion object and
+ connects the returnPressed() signal to the doSearch() slot.
+
+ \snippet examples/network/googlesuggest/searchbox.cpp 1
+
+ The function \c doSearch() stops the completer from sending any further
+ queries to the search engine.
+
+ Further, the function extracts the selected search phrase and opens it
+ in the default web browser using QDesktopServices.
+
+ \snippet examples/network/googlesuggest/searchbox.cpp 2
+
*/
diff --git a/doc/src/examples/imagegestures.qdoc b/doc/src/examples/imagegestures.qdoc
new file mode 100644
index 0000000000..33c1ace93b
--- /dev/null
+++ b/doc/src/examples/imagegestures.qdoc
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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$
+**
+****************************************************************************/
+
+/*!
+ \example gestures/imagegestures
+ \title Image Gestures Example
+
+ This example shows how to enable gestures for a widget and use gesture input
+ to perform actions.
+
+ \image imagegestures-example.png Screenshot of the Image Gestures example.
+
+ We use two classes to create the user interface for the application: \c MainWidget
+ and \c ImageWidget. The \c MainWidget class is simply used as a container for the
+ \c ImageWidget class, which we will configure to accept gesture input. Since we
+ are interested in the way gestures are used, we will concentrate on the
+ implementation of the \c ImageWidget class.
+
+ \section1 ImageWidget Class Definition
+
+ The \c ImageWidget class is a simple QWidget subclass that reimplements the general
+ QWidget::event() handler function in addition to several more specific event handlers:
+
+ \snippet examples/gestures/imagegestures/imagewidget.h class definition begin
+ \dots
+ \snippet examples/gestures/imagegestures/imagewidget.h class definition end
+
+ We also implement a private helper function, \c gestureEvent(), to help manage
+ gesture events delivered to the widget, and three functions to perform actions
+ based on gestures: \c panTriggered(), \c pinchTriggered() and \c swipeTriggered().
+
+ \section1 ImageWidget Class Implementation
+
+ In the widget's constructor, we begin by setting up various parameters that will
+ be used to control the way images are displayed.
+
+ \snippet examples/gestures/imagegestures/imagewidget.cpp constructor
+
+ We enable three of the standard gestures for the widget by calling QWidget::grabGesture()
+ with the types of gesture we need. These will be recognized by the application's
+ default gesture recognizer, and events will be delivered to our widget.
+
+ Since QWidget does not define a specific event handler for gestures, the widget
+ needs to reimplement the general QWidget::event() to receive gesture events.
+
+ \snippet examples/gestures/imagegestures/imagewidget.cpp event handler
+
+ We implement the event handler to delegate gesture events to a private function
+ specifically written for the task, and pass all other events to QWidget's
+ implementation.
+
+ The \c gestureHandler() function examines the gestures supplied by the
+ newly-delivered QGestureEvent. Since only one gesture of a given type can be
+ used on a widget at any particular time, we can check for each gesture type
+ using the QGestureEvent::gesture() function:
+
+ \snippet examples/gestures/imagegestures/imagewidget.cpp gesture event handler
+
+ If a QGesture object is supplied for a certain type of gesture, we call a special
+ purpose function to deal with it, casting the gesture object to the appropriate
+ QGesture subclass.
+
+ To illustrate how a standard gesture can be interpreted by an application, we
+ show the implementation of the \c swipeTriggered() function, which handles the
+ gesture associated with a brushing or swiping motion on the user's display or
+ input device:
+
+ \snippet examples/gestures/imagegestures/imagewidget.cpp swipe function
+
+ The QSwipeGesture class provides specialized functions and defines a enum
+ to make it more convenient for developers to discover which direction, if
+ any, the user swiped the display. Here, we simply navigate to the previous
+ image in the collection if the user swiped upwards or to the left; otherwise
+ we navigate to the next image in the collection.
+
+ The other gestures are also handled by special purpose functions, but use
+ the values of properties held by the QGesture object passed to them.
+*/
diff --git a/doc/src/examples/simpleselector.qdoc b/doc/src/examples/simpleselector.qdoc
new file mode 100644
index 0000000000..7db6576ca5
--- /dev/null
+++ b/doc/src/examples/simpleselector.qdoc
@@ -0,0 +1,128 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 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$
+**
+****************************************************************************/
+
+/*!
+ \example webkit/simpleselector
+ \title Simple Selector Example
+
+ The Simple Selector example shows how to use QWebElement to access the
+ Document Object Model (DOM) in a Web page.
+
+ \image webkit-simpleselector.png
+
+ The QWebElement class enables access to the document structure and content in a Web page,
+ as represented by a QWebFrame instance. It can be used for basic traversal of the document
+ structure (see the \l{DOM Traversal Example}), to search for particular elements, and to
+ modify any elements found.
+
+ This example uses a QWebView widget to display a Web page. A QLineEdit widget and QPushButton
+ allow the user to enter a query and highlight the results in the page. These widgets are
+ contained in an instance of the \c Window class, which we described below.
+
+ \section1 Window Class Definition
+
+ The \c Window class describes the example's user interface and this is partially described
+ by the \c window.ui file, created using \l{Qt Designer}:
+
+ \snippet examples/webkit/simpleselector/window.h Window class definition
+
+ We use \l{Using a Designer UI File in Your Application#The Multiple Inheritance Approach}
+ {multiple inheritance} to include the user interface description. We define slots that
+ will automatically respond to signals emitted by certain user interface controls.
+
+ \section1 Window Class Implementation
+
+ Since the layout of the user interface is provided by the \c{window.ui} user interface file,
+ we only need to call the \l{QWidget::}{setupUi()} in the constructor:
+
+ \snippet examples/webkit/simpleselector/window.cpp Window class constructor
+
+ This adds all the controls to the window and sets up connections between their signals
+ and suitably-named slots in the \c Window class. The QLineEdit instance was given a name of
+ \c elementLineEdit in Qt Designer, so the \c{on_elementLineEdit_returnPressed()} slot is
+ automatically connected to its \l{QLineEdit::}{returnPressed()} signal.
+
+ This slot performs the main work of this example. We begin by obtaining a QWebFrame
+ instance for the current page shown in the QWebView widget. Each QWebFrame contains
+ a QWebElement instance that represents the document, and we obtain this in order to
+ examine its contents:
+
+ \snippet examples/webkit/simpleselector/window.cpp return pressed
+
+ Taking the contents of the QLineEdit as the query text, we call the element's
+ \l{QWebElement::}{findAll()} function to obtain a list of elements that match the
+ query.
+
+ For each element obtained, we modify its style by setting its \c style attribute
+ to give it a yellow background color.
+
+ Since we also want the query to be performed when the user clicks the \gui Highlight
+ button, we also implement the \c{on_highlightButton_clicked()} slot to simply call
+ the \c{on_elementLineEdit_returnPressed()} slot when it is invoked:
+
+ \snippet examples/webkit/simpleselector/window.cpp button clicked
+
+ For completeness, we also implement a \c setUrl() function which simply passes on
+ a QUrl instance to the equivalent function in the QWebView widget:
+
+ \snippet examples/webkit/simpleselector/window.cpp set URL
+
+ \section1 Starting the Example
+
+ The main function implementation is simple. We set up the application, create
+ a \c Window instance, set its URL, and show it:
+
+ \snippet examples/webkit/simpleselector/main.cpp main program
+
+ When the application's event loop is run, the WebKit home page will load, and the
+ user can then begin to start running queries against the contents of the page.
+ The highlighting can only be removed by reloading the page. To do this, open a
+ context menu over the page and select the \gui Reload menu item.
+
+ \section1 Further Reading
+
+ The QWebElement documentation contains more information about DOM access for the
+ QtWebKit classes.
+
+ In this example, we take advantage of Qt's
+ \l{Using a Designer UI File in Your Application#Automatic Connections}{auto-connection}
+ feature to avoid explicitly connecting signals to slots.
+*/
diff --git a/doc/src/examples/stickman.qdoc b/doc/src/examples/stickman.qdoc
index e70c39b156..c9e98d0955 100644
--- a/doc/src/examples/stickman.qdoc
+++ b/doc/src/examples/stickman.qdoc
@@ -55,9 +55,9 @@
Animations are implemented as composite states. Each child state of the animation state
represents a frame in the animation by setting the position of each joint in the stickman's
skeleton to the positions defined for the particular frame. The frames are then bound together
- with animated transitions that trigger on the source state's polished() signal. Thus, the
- machine will enter the state representing the next frame in the animation immediately after it
- has finished animating into the previous frame.
+ with animated transitions that trigger on the source state's propertiesAssigned() signal. Thus,
+ the machine will enter the state representing the next frame in the animation immediately after
+ it has finished animating into the previous frame.
\image stickman-example1.png
@@ -67,7 +67,8 @@
\snippet examples/animation/stickman/lifecycle.cpp 1
- The states are then bound together with signal transitions that listen to the polished() signal.
+ The states are then bound together with signal transitions that listen to the
+ propertiesAssigned() signal.
\snippet examples/animation/stickman/lifecycle.cpp 2
diff --git a/doc/src/examples/videographicsitem.qdoc b/doc/src/examples/videographicsitem.qdoc
index ce24f097c5..e1cb6edacd 100644
--- a/doc/src/examples/videographicsitem.qdoc
+++ b/doc/src/examples/videographicsitem.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example video/videographicsitem
+ \example multimedia/videographicsitem
\title Video Graphics Item Example
The Video Graphics Item example shows how to implement a QGraphicsItem that displays video on a
diff --git a/doc/src/examples/videowidget.qdoc b/doc/src/examples/videowidget.qdoc
index 1b214d27f9..4223c1fb95 100644
--- a/doc/src/examples/videowidget.qdoc
+++ b/doc/src/examples/videowidget.qdoc
@@ -40,7 +40,7 @@
****************************************************************************/
/*!
- \example video/videowidget
+ \example multimedia/videowidget
\title Video Widget Example
The Video Widget example shows how to implement a video widget using
@@ -50,7 +50,7 @@
\section1 VideoWidgetSurface Class Definition
- \snippet examples/video/videowidget/videowidgetsurface.h 0
+ \snippet examples/multimedia/videowidget/videowidgetsurface.h 0
The VideoWidgetSurface class inherits QAbstractVideoSurface and paints
video frames on a QWidget. This is a separate class to VideoWidget as both
@@ -62,7 +62,7 @@
\section1 VideoWidgetSurface Class Implementation
- \snippet examples/video/videowidget/videowidgetsurface.cpp 0
+ \snippet examples/multimedia/videowidget/videowidgetsurface.cpp 0
From the supportedPixelFormats() function we return a list of pixel formats
the surface can paint. The order of the list hints at which formats are
@@ -74,7 +74,7 @@
return any pixel formats if handleType is not
QAbstractVideoBuffer::NoHandle.
- \snippet examples/video/videowidget/videowidgetsurface.cpp 1
+ \snippet examples/multimedia/videowidget/videowidgetsurface.cpp 1
In isFormatSupported() we test if the frame type of a surface format maps
to a valid QImage format, that the frame size is not empty, and the handle
@@ -85,7 +85,7 @@
that the size is not empty so a reimplementation wasn't strictly necessary
in this case.
- \snippet examples/video/videowidget/videowidgetsurface.cpp 2
+ \snippet examples/multimedia/videowidget/videowidgetsurface.cpp 2
To start our surface we'll extract the image format and size from the
selected video format and save it for use in the paint() function. If the
@@ -94,7 +94,7 @@
by calling QAbstractVideoSurface::start(). Finally since the video size may
have changed we'll trigger an update of the widget, and video geometry.
- \snippet examples/video/videowidget/videowidgetsurface.cpp 5
+ \snippet examples/multimedia/videowidget/videowidgetsurface.cpp 5
The updateVideoRect() function calculates the region within the widget the
video occupies. The \l {QVideoSurfaceFormat::sizeHint()}{size hint} of the
@@ -105,7 +105,7 @@
size in the center of the widget. Otherwise we shrink the size maintaining
the aspect ratio so that it does fit.
- \snippet examples/video/videowidget/videowidgetsurface.cpp 4
+ \snippet examples/multimedia/videowidget/videowidgetsurface.cpp 4
We can't paint from outside a paint event, so when a new frame is received
in present() we save a reference to it and force an immediate repaint of
@@ -118,7 +118,7 @@
\l {QAbstractVideoSurface::UnsupportedFormatError}{UnsupportedFormatError}
on our surface and stop it immediately.
- \snippet examples/video/videowidget/videowidgetsurface.cpp 6
+ \snippet examples/multimedia/videowidget/videowidgetsurface.cpp 6
The paint() function is called by the video widget to paint the current
video frame. Before we draw the frame first we'll check the format for
@@ -128,7 +128,7 @@
construct a new QImage from the current video frame, and draw it to the
the widget.
- \snippet examples/video/videowidget/videowidgetsurface.cpp 3
+ \snippet examples/multimedia/videowidget/videowidgetsurface.cpp 3
When the surface is stopped we need to release the current frame and
invalidate the video region. Then we confirm the surface has been
@@ -141,7 +141,7 @@
The VideoWidget class uses the VideoWidgetSurface class to implement a
video widget.
- \snippet examples/video/videowidget/videowidget.h 0
+ \snippet examples/multimedia/videowidget/videowidget.h 0
The VideoWidget QWidget implementation is minimal with just the sizeHint(),
paintEvent(), and resizeEvent() functions in addition to the constructor,
@@ -149,7 +149,7 @@
\section1 VideoWidget Class Implementation
- \snippet examples/video/videowidget/videowidget.cpp 0
+ \snippet examples/multimedia/videowidget/videowidget.cpp 0
In the VideoWidget constructor we set some flags to speed up re-paints a
little. Setting the Qt::WA_NoSystemBackground flag and disabling automatic
@@ -162,17 +162,17 @@
Finally we construct an instance of the VideoWidgetSurface class.
- \snippet examples/video/videowidget/videowidget.cpp 1
+ \snippet examples/multimedia/videowidget/videowidget.cpp 1
In the destructor we simply delete the VideoWidgetSurface instance.
- \snippet examples/video/videowidget/videowidget.cpp 2
+ \snippet examples/multimedia/videowidget/videowidget.cpp 2
We get the size hint for the widget from the video format of the surface
which is calculated from viewport and pixel aspect ratio of the video
format.
- \snippet examples/video/videowidget/videowidget.cpp 3
+ \snippet examples/multimedia/videowidget/videowidget.cpp 3
When the video widget receives a paint event we first check if the surface
is started, if not then we simply fill the widget with the background
@@ -180,7 +180,7 @@
by the paint region, before calling paint on the video surface to draw the
current frame.
- \snippet examples/video/videowidget/videowidget.cpp 4
+ \snippet examples/multimedia/videowidget/videowidget.cpp 4
The resizeEvent() function is reimplemented to trigger an update of the
video region when the widget is resized.
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index ad6731bd4f..f96586994e 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -367,3 +367,53 @@
\externalpage http://www.kde.org
\title KDE
*/
+
+/*!
+ \externalpage http://www.directfb.org/index.php?path=Main%2FDownloads&amp;page=1
+ \title DirectFB - df_window example
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBPalette.html
+ \title DirectFB - IDirectFBPalette
+*/
+
+/*!
+ \externalpage http://www.cplusplus.com/reference/clibrary/cstring/memcpy/
+ \title C++ Reference - memcpy
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFB_CreateInputEventBuffer.html
+ \title DirectFB - CreateInputEventBuffer
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/types.html#DFBSurfaceBlittingFlags
+ \title DirectFB - DFBSurfaceBlittingFlags
+*/
+
+/*!
+ \externalpage http://directfb.org/docs/DirectFB_Reference_1_4/IDirectFBImageProvider.html
+ \title DirectFB - IDirectFBImageProvider
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBSurface.html
+ \title DirectFB - IDirectFBSurface
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/IDirectFBWindow
+ \title DirectFB - IDirectFBWindow
+*/
+
+/*!
+ \externalpage http://www.directfb.org/docs/DirectFB_Reference_1_4/types.html#DFBSurfaceDescription
+ \title DirectFB - DFBSurfaceDescription
+*/
+
+/*!
+ \externalpage http://www.w3.org/TR/REC-CSS2/selector.html#q1
+ \title Standard CSS2 selector
+*/
diff --git a/doc/src/frameworks-technologies/eventsandfilters.qdoc b/doc/src/frameworks-technologies/eventsandfilters.qdoc
index c769884779..52d596a162 100644
--- a/doc/src/frameworks-technologies/eventsandfilters.qdoc
+++ b/doc/src/frameworks-technologies/eventsandfilters.qdoc
@@ -215,7 +215,7 @@
\l{QCoreApplication::}{postEvent()} posts the event on a queue for
later dispatch. The next time Qt's main event loop runs, it dispatches
all posted events, with some optimization. For example, if there are
- several resize events, they are are compressed into one. The same
+ several resize events, they are compressed into one. The same
applies to paint events: QWidget::update() calls
\l{QCoreApplication::}{postEvent()}, which eliminates flickering and
increases speed by avoiding multiple repaints.
diff --git a/doc/src/frameworks-technologies/gestures.qdoc b/doc/src/frameworks-technologies/gestures.qdoc
index 158a27308e..2fa8dabe9a 100644
--- a/doc/src/frameworks-technologies/gestures.qdoc
+++ b/doc/src/frameworks-technologies/gestures.qdoc
@@ -41,10 +41,9 @@
/*!
\page gestures-overview.html
- \startpage index.html Qt Reference Documentation
-
\title Gestures Programming
\ingroup frameworks-technologies
+ \startpage index.html Qt Reference Documentation
\brief An overview of the Qt support for Gesture programming.
@@ -59,176 +58,116 @@
\section1 Overview
- QGesture is the central class in Qt's gesture framework, providing
- the API used by classes that represent specific gestures, such as
- QPanGesture, QPinchGesture, and QSwipeGesture. These standard
- classes are ready to use, and each exposes functions and
- properties that give gesture-specific information about the user's
- input. This is described in the \l{Using Standard Gestures With Widgets}
- section.
-
- QGesture is also designed to be subclassed and extended so that
- support for new gestures can be implemented by developers. Adding
- support for a new gesture involves implementing code to recognize
- the gesture from incoming events. This is described in the
+ QGesture is the central class in Qt's gesture framework, providing a container
+ for information about gestures performed by the user. QGesture exposes
+ properties that give general information that is common to all gestures, and
+ these can be extended to provide additional gesture-specific information.
+ Common panning, pinching and swiping gestures are represented by specialized
+ classes: QPanGesture, QPinchGesture and QSwipeGesture.
+
+ Developers can also implement new gestures by subclassing and extending the
+ QGestureRecognizer class. Adding support for a new gesture involves implementing
+ code to recognize the gesture from input events. This is described in the
\l{Creating Your Own Gesture Recognizer} section.
\section1 Using Standard Gestures with Widgets
- Gesture objects are applied directly to widgets and other controls that accept
- user input \mdash these are the \e{target objects}. When a gesture object is
- constructed, the target object is typically passed to the constructor, though
- it can also be passed as the argument to the \l{QGesture::}{setGestureTarget()}
- function.
+ Gestures can be enabled for instances of QWidget and QGraphicsObject subclasses.
+ An object that accepts gesture input is referred to as a \e{target object}.
+
+ To enable a gesture for a target object, call its QWidget::grabGesture() or
+ QGraphicsObject::grabGesture() function with an argument describing the
+ required gesture type. The standard types are defined by the Qt::GestureType
+ enum and include many commonly used gestures.
- \snippet examples/gestures/imageviewer/imagewidget.cpp construct swipe gesture
+ \snippet examples/gestures/imagegestures/imagewidget.cpp enable gestures
In the above code, the gesture is set up in the constructor of the target object
- itself, so the argument to the QSwipeGesture constructor is \e this.
+ itself.
+
+ When the user performs a gesture, QGestureEvent events will be delivered to the
+ target object, and these can be handled by reimplementing the QWidget::event()
+ handler function for widgets or QGraphicsItem::sceneEvent() for graphics objects.
- When the user performs a gesture, various signals may be emitted by the
- gesture object. To monitor the user's actions, you need to connect signals
- from the gesture object to slots in your code.
+ For convenience, the \l{Image Gestures Example} reimplements the general
+ \l{QWidget::}{event()} handler function and delegates gesture events to a
+ specialized gestureEvent() function:
- \snippet examples/gestures/imageviewer/imagewidget.cpp connect swipe gesture
+ \snippet examples/gestures/imagegestures/imagewidget.cpp event handler
- Here, the \l{QGesture::}{triggered()} signal is used to inform the application
- that a gesture was used. More precise monitoring of a gesture can be implemented
- by connecting its \l{QGesture::}{started()}, \l{QGesture::}{canceled()} and
- \l{QGesture::}{finished()} signals to slots.
+ The gesture events delivered to the target object can be examined individually
+ and dealt with appropriately:
- Responding to a signal is simply a matter of obtaining the gesture that sent
- it and examining the information it contains.
+ \snippet examples/gestures/imagegestures/imagewidget.cpp gesture event handler
- \snippet examples/gestures/imageviewer/imagewidget.cpp swipe slot start
+ Responding to a gesture is simply a matter of obtaining the QGesture object
+ delivered in the QGestureEvent sent to the target object and examining the
+ information it contains.
+
+ \snippet examples/gestures/imagegestures/imagewidget.cpp swipe function
Here, we examine the direction in which the user swiped the widget and modify
its contents accordingly.
- \section1 Using Standard Gestures with Graphics Items
-
- The approach used for applying gestures to widgets can also be used with
- graphics items. However, instead of passing a target object to the
- gesture object's constructor, you set a target graphics item with the
- \l{QGesture::}{setGraphicsItem()} function.
\section1 Creating Your Own Gesture Recognizer
- QGesture is a base class for a user defined gesture recognizer class. In
- order to implement the recognizer you will need to subclass the
- QGesture class and implement the pure virtual function
- \l{QGesture::}{filterEvent()} to filter out events that are not relevant
- to your gesture.
-
- Once you have implemented the \l{QGesture::}{filterEvent()} function to
- make your own recognizer you can process events. A sequence of events may,
- according to your own rules, represent a gesture. The events can be singly
- passed to the recognizer via the \l{QGesture::}{filterEvent()} function
- or as a stream of events by specifying a parent source of events. The events
- can be from any source and could result in any action as defined by the user.
- The source and action need not be graphical, though that would be the most
- likely scenario. To find how to connect a source of events to automatically
- feed into the recognizer see the QGesture documentation.
-
- Recognizers based on QGesture can emit any of the following signals to
- indicate their progress in recognizing user input:
-
- \list
- \o \l{QGesture::}{triggered()} is emitted when a gesture is recognized.
- \o \l{QGesture::}{started()} indicates that the gesture object has started
- to recognize user input.
- \o \l{QGesture::}{finished()} is emitted when the gesture object has
- recognized the user input as a gesture, and finished handling it.
- \o \l{QGesture::}{canceled()} indicates that the gesture was canceled,
- either by the user or by the application.
- \endlist
-
- These signals are emitted when the state changes with the call to
- \l{QGesture::}{updateState()}, more than one signal may
- be emitted when a change of state occurs. There are four GestureStates
-
- \table
- \header \o New State \o Description \o QGesture Actions on Entering this State
- \row \o Qt::NoGesture \o Initial value \o emit \l {QGesture::}{canceled()}
- \row \o Qt::GestureStarted \o A continuous gesture has started \o emit \l{QGesture::}{started()} and emit \l{QGesture::}{triggered()}
- \row \o Qt::GestureUpdated \o A gesture continues \o emit \l{QGesture::}{triggered()}
- \row \o Qt::GestureFinished \o A gesture has finished. \o emit \l{QGesture::}{finished()}
- \endtable
-
- \note \l{QGesture::started()}{started()} can be emitted if entering any
- state greater than NoGesture if NoGesture was the previous state. This
- means that your state machine does not need to explicitly use the
- Qt::GestureStarted state, you can simply proceed from NoGesture to
- Qt::GestureUpdated to emit a \l{QGesture::started()}{started()} signal
- and a \l{QGesture::triggered()}{triggered()} signal.
-
- You may use some or all of these states when implementing the pure
- virtual function \l{QGesture::filterEvent()}{filterEvent()}.
- \l{QGesture::filterEvent()}{filterEvent()} will usually implement a
- state machine using the GestureState enums, but the details of which
- states are used is up to the developer.
-
- You may also need to reimplement the virtual function \l{QGesture::reset()}{reset()}
- if internal data or objects need to be re-initialized. The function must
- conclude with a call to \l{QGesture::updateState()}{updateState()} to
- change the current state to Qt::NoGesture.
-
- \section1 The ImageViewer Example
-
- To illustrate how to use QGesture we will look at the ImageViewer
- example. This example uses QPanGesture, a standard gesture, and an
- implementation of TapAndHoldGesture. Note that TapAndHoldGesture is
- platform-dependent.
-
- \snippet doc/src/snippets/gestures/imageviewer/tapandholdgesture.cpp tapandhold-reset
-
- In ImageViewer we see that the ImageWidget class uses two gestures:
- \l QPanGesture and TapAndHoldGesture. The
- QPanGesture is a standard gesture which is part of Qt.
- TapAndHoldGesture is defined and implemented as part of the example.
- The ImageWidget listens for signals from the gestures, but is not
- interested in the \l{QGesture::started()}{started()} signal.
-
- \snippet doc/src/snippets/gestures/imageviewer/imagewidget.h imagewidget-slots
-
- TapAndHoldGesture uses QTouchEvent events and mouse events to detect
- start, update and end events that can be mapped onto the GestureState
- changes. The implementation in this case uses a timer as well. If the
- timeout event occurs a given number of times after the start of the gesture
- then the gesture is considered to have finished whether or not the
- appropriate touch or mouse event has occurred. Also if a large jump in
- the position of the event occurs, as calculated by the \l {QPoint::manhattanLength()}{manhattanLength()}
- call, then the gesture is canceled by calling \l{QGesture::reset()}{reset()}
- which tidies up and uses \l{QGesture::updateState()}{updateState()} to
- change state to NoGesture which will result in the \l{QGesture::canceled()}{canceled()}
- signal being emitted by the recognizer.
-
- ImageWidget handles the signals by connecting the slots to the signals,
- although \c canceled() is not connected here.
-
- \snippet doc/src/snippets/gestures/imageviewer/imagewidget.cpp imagewidget-connect
-
- These functions in turn will have to be aware of which gesture
- object was the source of the signal since we have more than one source
- per slot. This is easily done by using the QObject::sender() function
- as shown here
-
- \snippet doc/src/snippets/gestures/imageviewer/imagewidget.cpp imagewidget-triggered-1
-
- As \l{QGesture::triggered()}{triggered()} signals are handled by
- gestureTriggered() there may be position updates invoking calls to,
- for example, goNextImage(), this will cause a change in the image
- handling logic of ImageWidget and a call to updateImage() to display
- the changed state.
-
- Following the logic of how the QEvent is processed we can summmarize
- it as follows:
- \list
- \o filterEvent() becomes the event filter of the parent ImageWidget object
- for a QPanGesture object and a TapAndHoldGesture object.
- \o filterEvent() then calls updateState() to change states
- \o updateState() emits the appropriate signal(s) for the state change.
- \o The signals are caught by the defined slots in ImageWidget
- \o The widget logic changes and an update() results in a paint event.
- \endlist
+ Adding support for a new gesture involves creating and registering a new gesture
+ recognizer. Depending on the recognition process for the gesture, it may also
+ involve creating a new gesture object.
+
+ To create a new recognizer, you need to subclass QGestureRecognizer to create a
+ custom recognizer class. There is one virtual function that you must reimplement
+ and two others that can be reimplemented as required.
+
+ \section2 Filtering Input Events
+
+ The \l{QGestureRecognizer::}{recognize()} function must be reimplemented.
+ This function handles and filters the incoming input events for the target objects
+ and determines whether or not they correspond to the gesture the recognizer is
+ looking for.
+
+ Although the logic for gesture recognition is implemented in this function,
+ possibly using a state machine based on the Qt::GestureState enums, you can store
+ persistent information about the state of the recognition process in the QGesture
+ object supplied.
+
+ Your \l{QGestureRecognizer::}{recognize()} function must return a value of
+ QGestureRecognizer::Result that indicates the state of recognition for a given gesture and
+ target object. This determines whether or not a gesture event will be delivered
+ to a target object.
+
+ \section2 Custom Gestures
+
+ If you choose to represent a gesture by a custom QGesture subclass, you will need to
+ reimplement the \l{QGestureRecognizer::}{create()} function to construct
+ instances of your gesture class instead of standard QGesture instances. Alternatively,
+ you may want to use standard QGesture instances, but add additional dynamic properties
+ to them to express specific details of the gesture you want to handle.
+
+ \section2 Resetting Gestures
+
+ If you use custom gesture objects that need to be reset or otherwise specially
+ handled when a gesture is canceled, you need to reimplement the
+ \l{QGestureRecognizer::}{reset()} function to perform these special tasks.
+
+ Note that QGesture objects are only created once for each combination of target object
+ and gesture type, and they might be reused every time the user attempts to perform the
+ same gesture type on the target object. As a result, it can be useful to reimplement
+ the \l{QGestureRecognizer::}{reset()} function to clean up after each previous attempt
+ at recognizing a gesture.
+
+
+ \section1 Using a New Gesture Recognizer
+
+ To use a gesture recognizer, construct an instance of your QGestureRecognizer
+ subclass, and register it with the application with
+ QGestureRecognizer::registerRecognizer(). A recognizer for a given type of
+ gesture can be removed with QGestureRecognizer::unregisterRecognizer().
+
+
+ \section1 Further Reading
+
+ The \l{gestures/imagegestures}{Image Gestures Example} shows how to enable
+ gestures for a widget in a simple image viewer application.
*/
diff --git a/doc/src/frameworks-technologies/statemachine.qdoc b/doc/src/frameworks-technologies/statemachine.qdoc
index ed8bc851b2..b0b13a7fd5 100644
--- a/doc/src/frameworks-technologies/statemachine.qdoc
+++ b/doc/src/frameworks-technologies/statemachine.qdoc
@@ -75,6 +75,11 @@
states can be configured to set properties and invoke methods on QObjects.
Qt's event system is used to drive the state machines.
+ The state graph in the State Machine framework is hierarchical. States can be nested inside of
+ other states, and the current configuration of the state machine consists of the set of states
+ which are currently active. All the states in a valid configuration of the state machine will
+ have a common ancestor.
+
\section1 Classes in the State Machine Framework
These classes are provided by qt for creating event-driven state machines.
@@ -269,9 +274,17 @@
When a parallel state group is entered, all its child states will be
simultaneously entered. Transitions within the individual child states
- operate normally. However, any of the child states may take a transition
- outside the parent state. When this happens, the parent state and all of its
- child states are exited.
+ operate normally. However, any of the child states may take a transition which exits the parent
+ state. When this happens, the parent state and all of its child states are exited.
+
+ The parallelism in the State Machine framework follows an interleaved semantics. All parallel
+ operations will be executed in a single, atomic step of the event processing, so no event can
+ interrupt the parallel operations. However, events will still be processed sequentially, since
+ the machine itself is single threaded. As an example: Consider the situation where there are two
+ transitions that exit the same parallel state group, and their conditions become true
+ simultaneously. In this case, the event that is processed last of the two will not have any
+ effect, since the first event will already have caused the machine to exit from the parallel
+ state.
\section1 Detecting that a Composite State has Finished
@@ -413,18 +426,8 @@
value of the property before any property assignments in states were executed.)
Take the following code:
- \code
- QStateMachine machine;
- machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties);
-
- QState *s1 = new QState();
- s1->assignProperty(object, "fooBar", 1.0);
- machine.addState(s1);
- machine.setInitialState(s1);
- QState *s2 = new QState();
- machine.addState(s2);
- \endcode
+ \snippet doc/src/snippets/statemachine/main5.cpp 0
Lets say the property \c fooBar is 0.0 when the machine starts. When the machine is in state
\c s1, the property will be 1.0, since the state explicitly assigns this value to it. When the
@@ -433,21 +436,8 @@
If we are using nested states, the parent defines a value for the property which is inherited by
all descendants that do not explicitly assign a value to the property.
- \code
- QStateMachine machine;
- machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties);
- QState *s1 = new QState();
- s1->assignProperty(object, "fooBar", 1.0);
- machine.addState(s1);
- machine.setInitialState(s1);
-
- QState *s2 = new QState(s1);
- s2->assignProperty(object, "fooBar", 2.0);
- s1->setInitialState(s2);
-
- QState *s3 = new QState(s1);
- \endcode
+ \snippet doc/src/snippets/statemachine/main5.cpp 2
Here \c s1 has two children: \c s2 and \c s3. When \c s2 is entered, the property \c fooBar
will have the value 2.0, since this is explicitly defined for the state. When the machine is in
@@ -460,15 +450,8 @@
properties as they are assigned in states.
Say we have the following code:
- \code
- QState *s1 = new QState();
- QState *s2 = new QState();
- s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
- s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100));
-
- s1->addTransition(button, SIGNAL(clicked()), s2);
- \endcode
+ \snippet doc/src/snippets/statemachine/main5.cpp 3
Here we define two states of a user interface. In \c s1 the \c button is small, and in \c s2
it is bigger. If we click the button to transition from \c s1 to \c s2, the geometry of the button
@@ -476,16 +459,7 @@
smooth, however, all we need to do is make a QPropertyAnimation and add this to the transition
object.
- \code
- QState *s1 = new QState();
- QState *s2 = new QState();
-
- s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
- s2->assignProperty(button, "geometry", QRectF(0, 0, 100, 100));
-
- QSignalTransition *transition = s1->addTransition(button, SIGNAL(clicked()), s2);
- transition->addAnimation(new QPropertyAnimation(button, "geometry"));
- \endcode
+ \snippet doc/src/snippets/statemachine/main5.cpp 4
Adding an animation for the property in question means that the property assignment will no
longer take immediate effect when the state has been entered. Instead, the animation will start
@@ -504,33 +478,48 @@
property can potentially have any value, depending on the animation.
In some cases, it can be useful to be able to detect when the property has actually been assigned
- the value defined by a state. For this, we can use the state's polished() signal.
- \code
- QState *s1 = new QState();
- s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
+ the value defined by a state.
- QState *s2 = new QState();
+ Say we have the following code:
- s1->addTransition(s1, SIGNAL(polished()), s2);
- \endcode
+ \snippet doc/src/snippets/statemachine/main5.cpp 5
+
+ When \c button is clicked, the machine will transition into state \c s2, which will set the
+ geometry of the button, and then pop up a message box to alert the user that the geometry has
+ been changed.
+
+ In the normal case, where animations are not used, this will operate as expected. However, if
+ an animation for the \c geometry of \c button is set on the transition between \c s1 and \c s2,
+ the animation will be started when \c s2 is entered, but the \c geometry property will not
+ actually reach its defined value before the animation is finished running. In this case, the
+ message box will pop up before the geometry of the button has actually been set.
+
+ To ensure that the message box does not pop up until the geometry actually reaches its final
+ value, we can use the state's propertiesAssigned() signal. The propertiesAssigned() signal will be
+ emitted when the property is assigned its final value, whether this is done immediately or
+ after the animation has finished playing.
+
+ \snippet doc/src/snippets/statemachine/main5.cpp 6
- The machine will be in state \c s1 until the \c geometry property has been set. Then it will
- immediately transition into \c s2. If the transition into \c s1 has an animation for the \c
- geometry property, then the machine will stay in \c s1 until the animation has finished. If there
- is no animation, it will simply set the property and immediately enter state \c s2.
+ In this example, when \c button is clicked, the machine will enter \c s2. It will remain in state
+ \c s2 until the \c geometry property has been set to \c QRect(0, 0, 50, 50). Then it will
+ transition into \c s3. When \c s3 is entered, the message box will pop up. If the transition into
+ \c s2 has an animation for the \c geometry property, then the machine will stay in \c s2 until the
+ animation has finished playing. If there is no such animation, it will simply set the property and
+ immediately enter state \c s3.
- Either way, when the machine is in state \c s2, the property \c geometry has been assigned the
- defined value.
+ Either way, when the machine is in state \c s3, you are guaranteed that the property \c geometry
+ has been assigned the defined value.
If the global restore policy is set to QStateMachine::RestoreProperties, the state will not emit
- the polished() signal until these have been executed as well.
+ the propertiesAssigned() signal until these have been executed as well.
- \section1 What happens if a state is exited before the animation has finished
+ \section1 What Happens If A State Is Exited Before The Animation Has Finished
If a state has property assignments, and the transition into the state has animations for the
properties, the state can potentially be exited before the properties have been assigned to the
values defines by the state. This is true in particular when there are transitions out from the
- state that do not depend on the state being polished, as described in the previous section.
+ state that do not depend on the propertiesAssigned signal, as described in the previous section.
The State Machine API guarantees that a property assigned by the state machine either:
\list
@@ -545,7 +534,7 @@
If the target state does not assign any value to the property, there are two
options: By default, the property will be assigned the value defined by the state it is leaving
- (the value it would have been assigned if the animation had been permitted to finish playing.) If
+ (the value it would have been assigned if the animation had been permitted to finish playing). If
a global restore policy is set, however, this will take precedence, and the property will be
restored as usual.
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index d72f816faa..b5dc03d0a6 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -336,13 +336,6 @@
features is the archive of the \l {Qt Quarterly}.
\endtable
-
- \omit
- In the list below, examples marked with an asterisk (*) are fully
- documented. Eventually, all the examples will be fully documented,
- but sometimes we include an example before we have time to write
- about it.
- \endomit
*/
/*!
@@ -388,6 +381,8 @@
\o \l{widgets/wiggly}{Wiggly}\raisedaster
\o \l{widgets/windowflags}{Window Flags}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -416,6 +411,8 @@
\o \l{dialogs/tabdialog}{Tab Dialog}\raisedaster
\o \l{dialogs/trivialwizard}{Trivial Wizard}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -442,12 +439,14 @@
\o \l{mainwindows/recentfiles}{Recent Files}
\o \l{mainwindows/sdi}{SDI}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
\page examples-layouts.html
\title Layout Examples
-
+
\previouspage Main Window Examples
\contentspage Qt Examples
\nextpage Item Views Examples
@@ -467,6 +466,8 @@
\o \l{layouts/dynamiclayouts}{Dynamic Layouts}
\o \l{layouts/flowlayout}{Flow Layout}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -503,6 +504,8 @@
\o \l{itemviews/spinboxdelegate}{Spin Box Delegate}\raisedaster
\o \l{itemviews/stardelegate}{Star Delegate}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -529,6 +532,8 @@
\o \l{graphicsview/portedasteroids}{Ported Asteroids}
\o \l{graphicsview/portedcanvas}{Ported Canvas}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -559,6 +564,8 @@
\o \l{painting/svgviewer}{SVG Viewer}
\o \l{painting/transformations}{Transformations}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -631,16 +638,18 @@
\o \l{draganddrop/fridgemagnets}{Fridge Magnets}\raisedaster
\o \l{draganddrop/puzzle}{Drag and Drop Puzzle}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
\page examples-threadandconcurrent.html
\title Threading and Concurrent Programming Examples
-
+
\previouspage Drag and Drop Examples
\contentspage Qt Examples
\nextpage Tools Examples
-
+
\image thread-examples.png
Qt 4 makes it easier than ever to write multithreaded applications. More
@@ -669,6 +678,8 @@
\o \l{qtconcurrent/runfunction}{QtConcurrent Run Function}
\o \l{qtconcurrent/wordcount}{QtConcurrent Word Count}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -695,6 +706,7 @@
\o \l{tools/customtypesending}{Custom Type Sending}\raisedaster
\o \l{tools/echoplugin}{Echo Plugin}\raisedaster
\o \l{tools/i18n}{I18N}
+ \o \l{tools/inputpanel}{Input Panel}\raisedaster
\o \l{tools/plugandpaint}{Plug & Paint}\raisedaster
\o Plug & Paint Plugins: \l{tools/plugandpaintplugins/basictools}{Basic Tools}\raisedaster
and \l{tools/plugandpaintplugins/extrafilters}{Extra Filters}\raisedaster
@@ -704,6 +716,8 @@
\o \l{tools/treemodelcompleter}{Tree Model Completer}\raisedaster
\o \l{tools/undoframework}{Undo Framework}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -729,13 +743,15 @@
\o \l{network/network-chat}{Network Chat}
\o \l{network/fortuneclient}{Fortune Client}\raisedaster
\o \l{network/fortuneserver}{Fortune Server}\raisedaster
- \o \l{network/ftp}{FTP}\raisedaster
+ \o \l{network/qftp}{FTP}\raisedaster
\o \l{network/http}{HTTP}
\o \l{network/loopback}{Loopback}
\o \l{network/threadedfortuneserver}{Threaded Fortune Server}\raisedaster
\o \l{network/torrent}{Torrent}
\o \l{network/googlesuggest}{Google Suggest}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -745,7 +761,7 @@
\previouspage Network Examples
\contentspage Qt Examples
\nextpage OpenGL Examples
-
+
\image ipc-examples.png
\list
@@ -784,6 +800,8 @@
\o \l{opengl/samplebuffers}{Sample Buffers}
\o \l{opengl/textures}{Textures}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -806,16 +824,16 @@
Audio API in Qt applications.
\list
- \o \l{multimedia/audio/audiodevices}{Audio Devices}
- \o \l{multimedia/audio/audiooutput}{Audio Output}
- \o \l{multimedia/audio/audioinput}{Audio Input}
+ \o \l{multimedia/audiodevices}{Audio Devices}
+ \o \l{multimedia/audiooutput}{Audio Output}
+ \o \l{multimedia/audioinput}{Audio Input}
\endlist
\section1 Video Output
\list
- \o \l{video/videowidget}{Video Widget}\raisedaster
- \o \l{video/videographicsitem}{Video Graphics Item}
+ \o \l{multimedia/videowidget}{Video Widget}\raisedaster
+ \o \l{multimedia/videographicsitem}{Video Graphics Item}
\endlist
\section1 Phonon
@@ -829,6 +847,8 @@
\o \l{phonon/capabilities}{Capabilities}\raisedaster
\o \l{phonon/qmusicplayer}{Music Player}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -855,6 +875,8 @@
\o \l{sql/tablemodel}{Table Model}
\o \l{sql/sqlwidgetmapper}{SQL Widget Mapper}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
@@ -890,6 +912,8 @@
\o \l{xmlpatterns/trafficinfo}{Traffic Info}\raisedaster
\o \l{xmlpatterns/schema}{XML Schema Validation}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -996,12 +1020,26 @@
from displaying Web pages within a Qt user interface to an implementation of
a basic function Web browser.
- \list
- \o \l{webkit/previewer}{Previewer}\raisedaster
- \o \l{webkit/formextractor}{Form Extractor}
- \o \l{webkit/googlechat}{Google Chat}
- \o \l{webkit/fancybrowser}{Fancy Browser}
- \endlist
+ \table
+ \header \o Example \o Description
+ \row \o \l{webkit/domtraversal}{DOM Traversal}\raisedaster
+ \o Shows how to use QWebElement to inspect the document structure of a Web page.
+ \row \o \l{webkit/fancybrowser}{Fancy Browser}
+ \o A more advanced browser example, showing the use of jQuery to perform effects.
+ \row \o \l{webkit/formextractor}{Form Extractor}
+ \o How to use JavaScript and C++ together to read page content.
+ \row \o \l{webkit/googlechat}{Google Chat}
+ \o A real-world example that shows how an existing Web-based service can be accessed
+ using QtWebKit.
+ \row \o \l{webkit/previewer}{Previewer}\raisedaster
+ \o Shows how to make a simple Web page previewer by using Qt's text input widgets
+ together with a QWebView widget.
+ \row \o \l{webkit/simpleselector}{Simple Selector}\raisedaster
+ \o A basic demonstration, showing how to use QWebElement to select elements in a
+ Web page.
+ \endtable
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -1021,6 +1059,8 @@
\list
\o \l{help/simpletextviewer}{Simple Text Viewer}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -1060,30 +1100,31 @@
\image animation-examples.png Animation
\list
- \o \l{animation/animatedtiles}{Animated Tiles}
- \o \l{animation/appchooser}{Application Chooser}
- \o \l{animation/easing}{Easing Curves}
+ \o \l{animation/animatedtiles}{Animated Tiles}
+ \o \l{animation/appchooser}{Application Chooser}
+ \o \l{animation/easing}{Easing Curves}
\o \l{animation/moveblocks}{Move Blocks}\raisedaster
- \o \l{animation/states}{States}
+ \o \l{animation/states}{States}
\o \l{animation/stickman}{Stick man}\raisedaster
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
\page examples-gestures.html
\title Gestures Examples
-
+
\previouspage Animation Framework Examples
\contentspage Qt Examples
\nextpage D-Bus Examples
The API of the gesture framework is not yet finalized and
still subject to change.
-\omit
+
\list
- \o \l{widgets/imageviewer}{Image Viewer}
+ \o \l{gestures/imagegestures}{Image Gestures}
\endlist
-\endomit
*/
/*!
@@ -1101,6 +1142,8 @@
\o \l{dbus/pingpong}{Ping Pong}
\o \l{dbus/remotecontrolledcar}{Remote Controlled Car}
\endlist
+
+ Examples marked with an asterisk (*) are fully documented.
*/
/*!
@@ -1132,7 +1175,7 @@
\previouspage Qt for Embedded Linux Examples
\contentspage Qt Examples
\nextpage Qt Quarterly
-
+
\image activeqt-examples.png ActiveQt
\list
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 82695522be..c8e225c3bb 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -39,10 +39,6 @@
**
****************************************************************************/
-/****************************************************************************
-** Please remember to update the corresponding INSTALL files.
-****************************************************************************/
-
/*!
\group installation
\title Installation
@@ -484,6 +480,7 @@ in the \l{Qt for Windows CE Requirements} document.
\o \l{Windows CE - Introduction to using Qt}
\o \l{Windows CE - Working with Custom SDKs}
\o \l{Windows CE - Using shadow builds}
+ \o \l{Windows CE - Signing}
\endlist
Information on feature and performance tuning for embedded builds can
@@ -498,10 +495,9 @@ in the \l{Qt for Windows CE Requirements} document.
*/
/*! \page install-Symbian-installer.html
-
-\title Installing Qt on the Symbian platform using binary package
+\title Installing Qt on the Symbian Platform from a Binary Package
\ingroup qts60
-\brief How to install Qt on the Symbian platform using the binary package.
+\brief How to install Qt on the Symbian platform from a binary package.
\note Qt for Symbian platform has some requirements that are given in more detail
in the \l{Qt for Symbian platform Requirements} document.
@@ -528,9 +524,9 @@ in the \l{Qt for Symbian platform Requirements} document.
To run the demos and examples on the emulator, you need to build them first.
Open the "Qt for Symbian platform Command Prompt" from the Start menu and type:
-
+
\snippet doc/src/snippets/code/doc_src_installation.qdoc 25
-
+
To run the demos on the emulator simply navigate to the directory of the demo
you want to see and run:
@@ -538,7 +534,7 @@ in the \l{Qt for Symbian platform Requirements} document.
For more information about building and running Qt programs on the
Symbian platform,
- see \l{Symbian platform - Introduction to using Qt}.
+ see \l{Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -546,19 +542,18 @@ Symbian platform,
*/
/*! \page install-Symbian.html
-
-\title Installing Qt on the Symbian platform
+\title Installing Qt on the Symbian Platform
\ingroup installation
\ingroup qts60
-\brief How to install Qt for the Symbian platform
+\brief How to install Qt on the Symbian platform.
\note Qt for the Symbian platform has some requirements that are given in more detail
-in the \l{Qt for Symbian platform Requirements} document.
+in the \l{Qt for Symbian Platform Requirements} document.
\note \bold {This document describes how to install and configure Qt for
the Symbian platform from scratch.
-If you are using pre-built binaries, follow the instructions
-\l{Installing Qt on the Symbian platform using binary package}{here}.}
+If you are using pre-built binaries, follow the instructions given in the
+\l{Installing Qt on the Symbian Platform from a Binary Package} document.}
\list 1
@@ -608,7 +603,7 @@ If you are using pre-built binaries, follow the instructions
To build Qt for the device, type:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 28
-
+
Congratulations, Qt is now ready to use.
\o Running Qt demos
@@ -617,7 +612,7 @@ If you are using pre-built binaries, follow the instructions
to try out. An excellent starting point is the "fluidlauncher"
demo. To run the demo on a real device, you first have to install
the Qt libraries on the device:
-
+
\snippet doc/src/snippets/code/doc_src_installation.qdoc 29
\note You will need to supply certificate that allows installation
@@ -629,14 +624,14 @@ If you are using pre-built binaries, follow the instructions
This will create a self-signed \c fluidlauncher_armv5_urel.sis and
install it to your device.
-
+
To run the demos on the emulator simply navigate to the directory of the demo
you want to see and run:
\snippet doc/src/snippets/code/doc_src_installation.qdoc 27
For more information about building and running Qt programs on the
-Symbian platform, see \l{Symbian platform - Introduction to using Qt}.
+Symbian platform, see \l{Symbian platform - Introduction to Qt}.
We hope you will enjoy using Qt.
@@ -956,23 +951,30 @@ Symbian platform, see \l{Symbian platform - Introduction to using Qt}.
/*!
\page requirements-symbian.html
- \title Qt for Symbian platform Requirements
+ \title Qt for Symbian Platform Requirements
\ingroup installation
\brief Setting up the Symbian platform environment for Qt.
\previouspage General Qt Requirements
Qt for Symbian platform requires the following software installed on your development PC:
\list
- \o \l{http://www.mingw.org/}{MinGW 3.4.5 or higher}, or another windows compiler to build the tools.
\o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher}
\list
\o \bold{Note:} It may be necessary to update the Carbide compiler.
See \l{http://pepper.troll.no/s60prereleases/patches/}{here} for instructions how to check your
compiler version and how to patch it, if needed.
\endlist
+ \o \l{http://downloads.activestate.com/ActivePerl/Windows/5.6/ActivePerl-5.6.1.638-MSWin32-x86.msi}{ActivePerl v5.6.1 build 638}
+ \list
+ \o \bold{Note:} According to Symbian, version 5.6.1 build 638 is mandatory. Using later versions may result in unexplained errors.
+ \endlist
\o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher}
\o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}.
Install this to all Symbian SDKs you plan to use Qt with.
+ \o Building Qt tools from scratch requires \l{http://www.mingw.org/}{MinGW 3.4.5 or higher}, or another windows compiler.
+ \list
+ \o \bold{Note:} This is not required if you are using pre-built binary package.
+ \endlist
\o Building Qt libraries requires \l{http://www.arm.com/products/DevTools/RVCT.html}{RVCT} 2.2 [build 686] or later,
which is not available free of charge.
\endlist
diff --git a/doc/src/getting-started/known-issues.qdoc b/doc/src/getting-started/known-issues.qdoc
index 0b63423ab5..5c8888d9a3 100644
--- a/doc/src/getting-started/known-issues.qdoc
+++ b/doc/src/getting-started/known-issues.qdoc
@@ -59,34 +59,6 @@
\section1 Installation Issues
- \section2 Building the Source Package on Windows 7
-
- \list
- \o When building Qt 4.5.0 with Windows 7, the build fails with an error
- message regarding failing to embed manifest. This a known issue with
- Windows 7, explained in the Windows 7 SDK Beta
- \l{http://download.microsoft.com/download/8/8/0/8808A472-6450-4723-9C87-977069714B27/ReleaseNotes.Htm}
- {release notes}. A workaround for this issue is to patch the
- \bold{embed_manifest_exe.prf} file with the following:
-
- \code
- diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf
- index e1747f1..05f116e 100644
- --- a/mkspecs/features/win32/embed_manifest_exe.prf
- +++ b/mkspecs/features/win32/embed_manifest_exe.prf
- @@ -8,4 +8,9 @@ if(win32-msvc2005|win32-msvc2008):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE
- QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.ma
- nifest\" -outputresource:$(DESTDIR_TARGET);1$$escape_expand(\n\t))
- QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
- QMAKE_CLEAN += \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\"
- + isEmpty(RC_FILE) {
- + system("echo.>$$replace(OUT_PWD,/,\\)\\$$replace(OBJECTS_DIR,/,\\)\\Windows7WorkAround.rc")
- + RC_FILE = $$replace(OUT_PWD,/,\\)\\$$replace(OBJECTS_DIR,/,\\)\\Windows7WorkAround.rc
- + }
- +
- }
- \endcode
-
\section2 Installing the Source Package on Unix systems
\o If you download a Zip source package, you will need to convert
diff --git a/doc/src/howtos/guibooks.qdoc b/doc/src/howtos/guibooks.qdoc
index c41d8fa78b..6e64c09aa3 100644
--- a/doc/src/howtos/guibooks.qdoc
+++ b/doc/src/howtos/guibooks.qdoc
@@ -52,8 +52,10 @@
GUI Programming with Qt 4, Second Edition}}
by Jasmin Blanchette and Mark
Summerfield, ISBN 0-13-235416-0. This is the official Qt book written
- by two veteran Trolls. The first edition, which is based on Qt 4.1, is available
- \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{online}.
+ by two veteran Trolls. The first edition, which is based on Qt 4.1, is
+ \l{http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip}{available online}.
+ The second edition, based on Qt 4.3, is
+ \l{http://www.informit.com/store/product.aspx?isbn=0132354160}{also available online}.
\bold{\l{http://www.amazon.com/exec/obidos/ASIN/0385267746/trolltech/t}{The Design of Everyday Things}}
by Donald Norman, ISBN 0-38526774-6, is one of the classics of human
diff --git a/doc/src/howtos/openvg.qdoc b/doc/src/howtos/openvg.qdoc
index 42d2357789..5de2e22a1c 100644
--- a/doc/src/howtos/openvg.qdoc
+++ b/doc/src/howtos/openvg.qdoc
@@ -292,8 +292,8 @@
\section2 Pixmap filters
- Convolution, colorize, and drop shadow filters are accelerated using
- OpenVG operations.
+ Convolution, colorize, drop shadow, and blur filters are accelerated
+ using OpenVG operations.
\section1 Known issues
diff --git a/doc/src/images/googlesuggest-example.png b/doc/src/images/googlesuggest-example.png
index 4ef072afb5..477d444cbd 100644
--- a/doc/src/images/googlesuggest-example.png
+++ b/doc/src/images/googlesuggest-example.png
Binary files differ
diff --git a/doc/src/images/graphicseffect-bloom.png b/doc/src/images/graphicseffect-bloom.png
deleted file mode 100644
index dace7eb276..0000000000
--- a/doc/src/images/graphicseffect-bloom.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/graphicseffect-effects.png b/doc/src/images/graphicseffect-effects.png
deleted file mode 100644
index 609bef9882..0000000000
--- a/doc/src/images/graphicseffect-effects.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/graphicseffect-grayscale.png b/doc/src/images/graphicseffect-grayscale.png
deleted file mode 100644
index 8b6e5c6971..0000000000
--- a/doc/src/images/graphicseffect-grayscale.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/graphicseffect-pixelize.png b/doc/src/images/graphicseffect-pixelize.png
deleted file mode 100644
index 57a00571f3..0000000000
--- a/doc/src/images/graphicseffect-pixelize.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/hoverevents.png b/doc/src/images/hoverevents.png
new file mode 100644
index 0000000000..ccc079bdf1
--- /dev/null
+++ b/doc/src/images/hoverevents.png
Binary files differ
diff --git a/doc/src/images/pangesture.png b/doc/src/images/pangesture.png
new file mode 100644
index 0000000000..24caf91d3b
--- /dev/null
+++ b/doc/src/images/pangesture.png
Binary files differ
diff --git a/doc/src/images/pinchgesture.png b/doc/src/images/pinchgesture.png
new file mode 100644
index 0000000000..95614c4052
--- /dev/null
+++ b/doc/src/images/pinchgesture.png
Binary files differ
diff --git a/doc/src/images/platformHWAcc.png b/doc/src/images/platformHWAcc.png
new file mode 100644
index 0000000000..76a5a48de0
--- /dev/null
+++ b/doc/src/images/platformHWAcc.png
Binary files differ
diff --git a/doc/src/images/simpleanchorlayout-example.png b/doc/src/images/simpleanchorlayout-example.png
new file mode 100644
index 0000000000..1d5c8ac048
--- /dev/null
+++ b/doc/src/images/simpleanchorlayout-example.png
Binary files differ
diff --git a/doc/src/images/swipegesture.png b/doc/src/images/swipegesture.png
new file mode 100644
index 0000000000..0b7d35af3a
--- /dev/null
+++ b/doc/src/images/swipegesture.png
Binary files differ
diff --git a/doc/src/images/webkit-domtraversal.png b/doc/src/images/webkit-domtraversal.png
new file mode 100644
index 0000000000..8c7b2bcb97
--- /dev/null
+++ b/doc/src/images/webkit-domtraversal.png
Binary files differ
diff --git a/doc/src/images/webkit-simpleselector.png b/doc/src/images/webkit-simpleselector.png
new file mode 100644
index 0000000000..2c888ca143
--- /dev/null
+++ b/doc/src/images/webkit-simpleselector.png
Binary files differ
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index e873f4e9a8..ecc25fe0e3 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -51,6 +51,7 @@
\page internationalization.html
\title Internationalization with Qt
\brief Information about Qt's support for internationalization and multiple languages.
+ \nextpage Writing Source Code for Translation
\keyword internationalization
\keyword i18n
@@ -59,11 +60,11 @@
the application usable by people in countries other than one's own.
\tableofcontents
-
+
\section1 Relevant Qt Classes and APIs
These classes support internationalizing of Qt applications.
-
+
\annotatedlist i18n
\section1 Languages and Writing Systems
@@ -92,7 +93,7 @@
\o Greek
\o Hebrew
\o Thai and Lao
- \o All scripts in Unicode 4.0 that do not require special processing
+ \o All scripts in Unicode 5.1 that do not require special processing
\endlist
On Windows, Unix/X11 with FontConfig (client side font support)
@@ -111,6 +112,7 @@
\o Tamil
\o Telugu
\o Tibetan
+ \o N'Ko
\endlist
Many of these writing systems exhibit special features:
@@ -180,7 +182,7 @@
\section2 Use QString for All User-Visible Text
- Since QString uses the Unicode 4.0 encoding internally, every
+ Since QString uses the Unicode 5.1 encoding internally, every
language in the world can be processed transparently using
familiar text processing operations. Also, since all Qt functions
that present text to the user take a QString as a parameter,
@@ -438,9 +440,13 @@
application language.
The default event handler for QWidget subclasses responds to the
- QEvent::LanguageChange event, and will call this function when necessary;
- other application components can also force widgets to update themselves
- by posting the \l{QEvent::LanguageChange}{LanguageChange} event to them.
+ QEvent::LanguageChange event, and will call this function when necessary.
+
+ \l{QEvent::LanguageChange}{LanguageChange} events are posted when a new
+ translation is installed using the QCoreApplication::installTranslator()
+ function. Additionally, other application components can also force
+ widgets to update themselves by posting LanguageChange events to them.
+
\section1 Translating Non-Qt Classes
@@ -516,3 +522,265 @@
For details on Mac-specific translation, refer to the Qt/Mac Specific Issues
document \l{Qt for Mac OS X - Specific Issues#Translating the Application Menu and Native Dialogs}{here}.
*/
+
+/*!
+ \page i18n-source-translation.html
+ \title Writing Source Code for Translation
+ \ingroup i18n
+ \previouspage Internationalization with Qt
+ \contentspage Internationalization with Qt
+ \nextpage Translation Rules for Plurals
+ \brief How to write source code in a way that makes it possible for user-visible text to be translated.
+
+ \tableofcontents
+
+ \section1 The Basics
+
+ Developers use the \l{QObject::}{tr()} function to obtain translated text
+ for their classes, typically for display purposes. This function is also
+ used to indicate which text strings in an application are translatable.
+
+ Qt indexes each translatable string by the \e{translation context} it is
+ associated with; this is generally the name of the QObject subclass it is
+ used in.
+
+ Translation contexts are defined for new QObject-based classes by the use
+ of the Q_OBJECT macro in each new class definition.
+
+ When tr() is called, it looks up the translatable string using a QTranslator
+ object. For translation to work, one or more of these must have been
+ installed on the application object in the way described in the
+ \l{#Enabling Translation}{Enabling Translation} section below.
+
+ \section1 Defining a Translation Context
+
+ The translation context for QObject and each QObject subclass is the
+ class name itself. Developers subclassing QObject must use the
+ Q_OBJECT macro in their class definition to override the translation
+ context. This macro sets the context to the name of the subclass.
+
+ For example, the following class definition includes the Q_OBJECT macro,
+ implementing a new tr() that uses the \c MainWindow context:
+
+ \snippet mainwindows/sdi/mainwindow.h class definition with macro
+ \dots
+
+ If Q_OBJECT is not used in a class definition, the context will be
+ inherited from the base class. For example, since all QObject-based
+ classes in Qt provide a context, a new QWidget subclass defined without
+ a Q_OBJECT macro will use the \c QWidget context if its tr() function
+ is invoked.
+
+ \section1 Using tr() to Obtain a Translation
+
+ The following example shows how a translation is obtained for the
+ class shown in the previous section:
+
+ \snippet mainwindows/sdi/mainwindow.cpp implicit tr context
+ \dots
+
+ Here, the translation context is \c MainWindow because it is the
+ \c MainWindow::tr() function that is invoked. The text returned
+ by the tr() function is a translation of "&File" obtained from
+ the \c MainWindow context.
+
+ When Qt's translation tool, \l lupdate, is used to process a set of source
+ files, the text wrapped in tr() calls is stored in a section of the translation
+ file that corresponds to its translation context.
+
+ In some situations, it is useful to give a translation context explicitly
+ by fully qualifying the call to tr(); for example:
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp explicit tr context
+
+ This call obtains the translated text for "Page up" from the \c QScrollBar
+ context. Developers can also use the QCoreApplication::translate() function
+ to obtain a translation for a particular translation context.
+
+ \section1 Translator Comments
+
+ Developers can include information about each translatable string to
+ help translators with the translation process. These are extracted
+ when \l lupdate is used to process the source files. The recommended
+ way to add comments is to annotate the tr() calls in your code with
+ comments of the form:
+
+ \tt{//: ...}
+
+ or
+
+ \tt{\begincomment: ... \endcomment}
+
+ Examples:
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 40
+
+ In these examples, the comments will be associated with the strings
+ passed to tr() in the context of each call.
+
+ \section1 Adding Meta-Data to Strings
+
+ Additional data can be attached to each translatable message. These are
+ extracted when \l lupdate is used to process the source files. The
+ recommended way to add meta-data is to annotate the tr() calls in your code
+ with comments of the form:
+
+ \tt{//= <id>}
+
+ This can be used to give the message a unique identifier to support tools
+ which need it.
+
+ An alternative way to attach meta-data is to use the following syntax:
+
+ \tt{//~ <field name> <field contents>}
+
+ This can be used to attach meta-data to the message. The field name should
+ consist of a domain prefix (possibly the conventional file extension of the
+ file format the field is inspired by), a hyphen and the actual field name
+ in underscore-delimited notation. For storage in TS files, the field name
+ together with the prefix "extra-" will form an XML element name. The field
+ contents will be XML-escaped, but otherwise appear verbatim as the
+ element's contents. Any number of unique fields can be added to each
+ message.
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp meta data
+
+ Meta-data appearing right in front of a magic TRANSLATOR comment applies to
+ the whole TS file.
+
+ \section1 Disambiguation
+
+ If the same translatable string is used in different roles within the same
+ translation context, an additional identifying string may be passed in
+ the call to \l{QObject::}{tr()}. This optional disambiguation argument
+ is used to distinguish between otherwise identical strings.
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 17
+ \dots
+
+ In Qt 4.4 and earlier, this disambiguation parameter was the preferred
+ way to specify comments to translators.
+
+ \section1 Character Encodings
+
+ You can set the encoding for the source text by calling QTextCodec::setCodecForTr().
+ By default, the source text is assumed to be in Latin-1 encoding.
+
+ \section1 Handling Plurals
+
+ Some translatable strings contain placeholders for integer values and need
+ to be translated differently depending on the values in use.
+
+ To help with this problem, developers pass an additional integer argument
+ to the \l{QObject::}{tr()} function, and typically use a special notation
+ for plurals in each translatable string.
+
+ If this argument is equal or greater than zero, all occurrences of
+ \c %n in the resulting string are replaced with a decimal representation
+ of the value supplied. In addition, the translation used will adapt to the
+ value according to the rules for each language.
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 18
+
+ The table below shows what string is returned depending on the
+ active translation:
+
+ \table
+ \header \o \o{3,1} Active Translation
+ \header \o \a n \o No Translation \o French \o English
+ \row \o 0 \o "0 message(s) saved" \o "0 message sauvegard\unicode{0xE9}" \o "0 message\bold{s} saved"
+ \row \o 1 \o "1 message(s) saved" \o "1 message sauvegard\unicode{0xE9}" \o "1 message saved"
+ \row \o 2 \o "2 message(s) saved" \o "2 message\bold{s} sauvegard\unicode{0xE9}\bold{s}" \o "2 message\bold{s} saved"
+ \row \o 37 \o "37 message(s) saved" \o "37 message\bold{s} sauvegard\unicode{0xE9}\bold{s}" \o "37 message\bold{s} saved"
+ \endtable
+
+ This idiom is more flexible than the traditional approach; e.g.,
+
+ \snippet doc/src/snippets/code/src_corelib_kernel_qobject.cpp 19
+
+ because it also works with target languages that have several
+ plural forms (e.g., Irish has a special "dual" form that should
+ be used when \c n is 2), and it handles the \e n == 0 case
+ correctly for languages such as French that require the singular.
+ See the \l{Qt Linguist Manual} for details.
+
+ Instead of \c %n, you can use \c %Ln to produce a localized
+ representation of \a n. The conversion uses the default locale,
+ set using QLocale::setDefault(). (If no default locale was
+ specified, the "C" locale is used.)
+
+ A summary of the rules used to translate strings containing plurals can be
+ found in the \l{Translation Rules for Plurals} document.
+
+ \section1 Enabling Translation
+
+ Typically, your application's \c main() function will look like
+ this:
+
+ \snippet doc/src/snippets/code/doc_src_i18n.qdoc 8
+
+ Note the use of QLibraryInfo::location() to locate the Qt translations.
+ Developers should request the path to the translations at run-time by
+ passing QLibraryInfo::TranslationsPath to this function instead of
+ using the \c QTDIR environment variable in their applications.
+
+ \section1 Further Reading
+
+ \l{Qt Linguist Manual}, \l{Hello tr Example}, \l{Translation Rules for Plurals}
+*/
+
+/*!
+ \page i18n-plural-rules.html
+ \title Translation Rules for Plurals
+ \ingroup i18n
+ \previouspage Writing Source Code for Translation
+ \contentspage Internationalization with Qt
+ \brief A summary of the translation rules for plurals produced by Qt's i18n tools.
+
+ The table below shows the specific rules that are produced by Qt Linguist
+ and \c lrelease for a selection of languages. Cells marked \e otherwise
+ indicate the form used when none of the other rules are appropriate for a
+ specific language.
+
+ \table 80%
+ \header \o Language \o Rule 1 \o Rule 2 \o Rule 3
+ \row \o English \o \c{n == 1}
+ \o \e{otherwise} \o N/A
+ \row \o French \o \c{n < 2}
+ \o \e{otherwise} \o N/A
+ \row \o Czech \o \c{n % 100 == 1}
+ \o \c{n % 100 >= 2 && n % 100 <= 4}
+ \o \e{otherwise}
+ \row \o Irish \o \c{n == 1}
+ \o \c{n == 2} \o \e{otherwise}
+ \row \o Latvian \o \c{n % 10 == 1&& n % 100 != 11}
+ \o \c{n != 0} \o \e{otherwise}
+ \row \o Lithuanian \o \c{n % 10 == 1&& n % 100 != 11}
+ \o \c{n % 100 != 12 && n % 10 == 2}
+ \o \e{otherwise}
+ \row \o Macedonian \o \c{n % 10 == 1}
+ \o \c{n % 10 == 2} \o \e{otherwise}
+ \row \o Polish \o \c{n == 1}
+ \o \c{n % 10 >= 2 && n % 10 <= 4
+ && (n % 100 < 10 || n % 100 > 20)}
+ \o \e{otherwise}
+ \row \o Romanian \o \c{n == 1}
+ \o \c{n == 0|| (n % 100 >= 1 && n % 100 <= 20)}
+ \o \e{otherwise}
+ \row \o Russian \o \c{n % 10 == 1&& n % 100 != 11}
+ \o \c{n % 10 >= 2 && n % 10 <= 4
+ && (n % 100 < 10 || n % 100 > 20)}
+ \o \e{otherwise}
+ \row \o Slovak \o \c{n == 1} \o \c{n >= 2 && n <= 4}
+ \o \e{otherwise}
+ \row \o Japanese \o \e{otherwise} \o N/A \o N/A
+ \endtable
+
+ The rules themselves are not documented and are internal to Qt Linguist and \c lrelease.
+*/
diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc
index 065fb6b876..3e06a2f650 100644
--- a/doc/src/internationalization/linguist-manual.qdoc
+++ b/doc/src/internationalization/linguist-manual.qdoc
@@ -62,7 +62,7 @@
software engineers and the translator. The chapter describes the
use of two tools. The \l{lupdate} tool is used to synchronize
source code and translations. The \l{lrelease} tool is used to
- create runtime translation files for use by the released
+ create run-time translation files for use by the released
application.
The \l{linguist-translators.html}{Translators} chapter is for
@@ -119,7 +119,7 @@
\o Phrases that contain variables, for example, "The 25 files
selected will take 63 seconds to process", where the two numbers
- are inserted programmatically at runtime may need to be reworded
+ are inserted programmatically at run-time may need to be reworded
because in a different language the word order and therefore the
placement of the variables may have to change.
@@ -147,7 +147,7 @@
\row \o{1,2} \inlineimage wVista-Cert-border-small.png
\o \e{Qt Linguist 4.3 is Certified for Windows Vista}
-
+
\row \o Windows Vista and the Windows Vista Start button are
trademarks or registered trademarks of Microsoft Corporation in
the United States and/or other countries.
@@ -327,7 +327,7 @@
area}. The \l{Context Window} {context list} is normally shown
on the left, and the \l{Sources and Forms Window} {source code},
\l{Strings Window} {string list}, and either the \l{Phrases and
- Guesses Window} {prhrases and guesses}, or the \l{Warnings Window}
+ Guesses Window} {phrases and guesses}, or the \l{Warnings Window}
{warnings} are shown above and below the \l{The Translation Area}
{translations area}.
@@ -355,7 +355,7 @@
translation "guesses" have been read from phrase books
(\menu{Phrases|Open Phrase Book...}). The current string's
current translation is also shown here. To select a guess, double
- click it in the prases and guesses window or use the keyboard
+ click it in the phrases and guesses window or use the keyboard
shortcut shown to the right of the guess.
\QL can automatically check whether your translation strings pass
@@ -508,7 +508,7 @@
translation. The state is reset to \inlineimage linguist-danger.png
, and the number of accepted translations in the \e{Items} column
of the \l{Context Window} {context list} is decremented by 1.
-
+
\row
\o Not Accepted
\o \inlineimage linguist-check-off.png
@@ -764,7 +764,7 @@
and \e{N}.
Each Ctrl key accelerator is shown in the \l{Strings Window}
- {string list} as a separte string, e.g. \key{Ctrl+Enter}. Since
+ {string list} as a separate string, e.g. \key{Ctrl+Enter}. Since
the string doesn't have a context to give it meaning, e.g. like
the context of the phrase in which an Alt key accelerator appears,
the translator must rely on the UI developer to include a
@@ -781,7 +781,7 @@
changed. Whichever character (alpha or digit) is chosen, the
translation must be in the form "Ctrl+" followed by the upper case
character. \e{Qt} will automatically display the correct name at
- runtime. As with Alt key accelerators, if the translator changes
+ run-time. As with Alt key accelerators, if the translator changes
the character, the new character must not conflict with any other
Ctrl key accelerator.
@@ -790,14 +790,14 @@
supported languages, \e {Qt} automatically translates these
strings.
- \section2 Handling Numbered Arguments
+ \section2 Handling Numbered Arguments and Plurals
Some phrases contain numbered arguments. A numbered argument is a
- placeholder that will be replaced with text at runtime. A numbered
+ placeholder that will be replaced with text at run-time. A numbered
argument appears in a source string as a percent sign followed by
a digit. Consider an example: \c{After processing file %1, file %2
is next in line}. In this string to be translated, \c{%1} and
- \c{%2} are numbered arguments. At runtime, \c{%1} and \c{%2} will
+ \c{%2} are numbered arguments. At run-time, \c{%1} and \c{%2} will
be replaced with the first and next file names respectively. The
same numbered arguments must appear in the translation, but not
necessarily in the same order. A German translation of the string
@@ -808,6 +808,15 @@
of where argument \e{i} appears in the argument sequence in the
source string.
+ The use of numbered arguments is often accompanied by the use of
+ plurals in the source text. In many languages, the form of the
+ text will depend on the value shown, and more than one translation
+ is required. If the developers have marked up the source text in
+ correct way, fields for each of the possible plural forms will be
+ available in the translation area. (The
+ \l{Writing Source Code for Translation#Handling Plurals}{Writing Source Code for Translation}
+ document contains details about this feature for developers.)
+
\section2 Reusing Translations
If the translated text is similar to the source text, choose the
@@ -826,7 +835,7 @@
{translation area}, and adapts the number of input fields for
plural forms accordingly. If not explicitly set, \QL guesses the
target language and country by evaluating the translation source
- file name: E.g. \c app_de.ts sets the target language to German,
+ file name. For example, \c app_de.ts sets the target language to German,
and \c app_de_ch.ts sets the target language to German and the
target country to Switzerland (this also helps loading
translations for the current locale automatically; see
@@ -956,7 +965,7 @@
can be used to edit XLIFF files generated by other programs. For standard
Qt projects, however, only the TS file format is used.
\o QM \e {Qt message files} \BR are binary files that contain
- translations used by an application at runtime. These files are
+ translations used by an application at run-time. These files are
generated by \l lrelease, but can also be generated by \QL.
\o \c .qph \e {Qt phrase book files} \BR are human-readable XML
files containing standard phrases and their translations. These files
@@ -1085,7 +1094,7 @@
\endlist
- \o \gui {Tools}
+ \o \gui {Tools}
\list
\o \gui {Batch Translation...} \BR Opens a \l{Batch
@@ -1096,7 +1105,7 @@
Preview}. This window let you instantly see translations for
forms created with \QD. \endlist
- \o \gui {View}
+ \o \gui {View}
\list
\o \gui {Revert Sorting} \BR puts the items in the \l{Context
@@ -1118,7 +1127,7 @@
\endlist
- \o \gui {Help}
+ \o \gui {Help}
\list
\o \gui {Manual F1} \BR opens this manual.
\o \gui {About Qt Linguist} \BR Shows information about \QL.
@@ -1290,7 +1299,7 @@
\code
CODECFORTR = UTF-8
\endcode
-
+
See the \l lupdate and \l lrelease sections.
\section2 Loading Translations
@@ -1352,7 +1361,7 @@
\snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 9
- \section2 Distinguishing Identical Strings That Require Different Translations
+ \section2 Distinguishing Between Identical Translatable Strings
The \l lupdate program automatically provides a \e context for every
source text. This context is the class name of the class that contains
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 9c92a31fe2..ef29990edf 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -226,10 +226,11 @@
The QtOpenGL module is part of the \l{Qt Full Framework Edition} and the
\l{Open Source Versions of Qt}. It is available on Windows, X11, and Mac OS X.
- \l{Qt for Embedded Linux} supports OpenGL ES (OpenGL for Embedded Systems).
- To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
+ \l{Qt for Embedded Linux and OpenGL} supports OpenGL ES (OpenGL for Embedded Systems).
+ \note To be able to use the OpenGL API in \l{Qt for Embedded Linux}, it must be
integrated with the Q Window System (QWS). See the
\l{Qt for Embedded Linux and OpenGL} documentation for details.
+
*/
/*!
@@ -315,6 +316,37 @@
The QtScript module is part of the \l{Qt Full Framework Edition} and the
\l{Open Source Versions of Qt}.
+
+ \section1 License Information
+
+ Qt Commercial Edition licensees that wish to distribute applications that
+ use the QtScript module need to be aware of their obligations under the
+ GNU Library General Public License (LGPL).
+
+ Developers using the Open Source Edition can choose to redistribute
+ the module under the appropriate version of the GNU LGPL.
+
+ \legalese
+ QtScript is licensed under the GNU Library General Public License.
+ Individual contributor names and copyright dates can be found
+ inline in the code.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+ \endlegalese
+
*/
/*!
@@ -367,6 +399,9 @@
The QtSql module is part of the \l{Qt Full Framework Edition} and the
\l{Open Source Versions of Qt}.
+
+ See the \l{SQL Programming} guide for information about using this
+ module in your applications.
*/
/*!
@@ -576,7 +611,7 @@
the module under the appropriate version of the GNU LGPL; version 2.1
for applications and libraries licensed under the GNU GPL version 2,
or version 3 for applications and libraries licensed under the GNU
- GPL version 2.
+ GPL version 3.
\legalese
This file is part of the KDE project
diff --git a/doc/src/network-programming/qtnetwork.qdoc b/doc/src/network-programming/qtnetwork.qdoc
index d9377fbf41..c20adaf50e 100644
--- a/doc/src/network-programming/qtnetwork.qdoc
+++ b/doc/src/network-programming/qtnetwork.qdoc
@@ -101,7 +101,7 @@
Each application or library can create one or more instances of
QNetworkAccessManager to handle network communication.
-
+
\section1 Writing FTP Clients with QFtp
FTP (File Transfer Protocol) is a protocol used almost exclusively
@@ -155,7 +155,7 @@
commands based on the result of a previous command. It also
enables you to provide detailed feedback to the user.
- The \l{network/ftp}{FTP} example
+ The \l{network/qftp}{FTP} example
illustrates how to write an FTP client.
Writing your own FTP (or HTTP) server is possible using the
lower-level classes QTcpSocket and QTcpServer.
diff --git a/doc/src/snippets/gestures/qgesture.h b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
index 3fc89a184d..9c18d873c9 100644
--- a/doc/src/snippets/gestures/qgesture.h
+++ b/doc/src/platforms/emb-HwAcc-LinuxEmbedded.qdoc
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the QtGui module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,63 +39,33 @@
**
****************************************************************************/
-#ifndef QGESTURE_H
-#define QGESTURE_H
+/*!
-#include <QtCore/qobject.h>
-#include <QtCore/qlist.h>
-#include <QtCore/qdatetime.h>
-#include <QtCore/qpoint.h>
-#include <QtCore/qrect.h>
-#include <QtCore/qmetatype.h>
+ \page qt-embeddedLinux-accel.html
-QT_BEGIN_HEADER
+ \target Hardware Acceleration with Qt for Embedded Linux
-QT_BEGIN_NAMESPACE
+ \title Qt for Embedded Linux Hardware Accelerated Graphics
+ \ingroup qt-embedded-linux
-QT_MODULE(Gui)
-class QGraphicsItem;
-class QGesturePrivate;
-class Q_GUI_EXPORT QGesture : public QObject
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QGesture)
+ \input platforms/emb-hardwareacceleration.qdocinc
- Q_PROPERTY(Qt::GestureState state READ state)
+\section1 Supported Hardware Accelerated Graphics APIs
-public:
- explicit QGesture(QObject *parent = 0);
- ~QGesture();
+This list shows which Hardware Accelerated Graphics APIs currently
+supported by Qt.
- virtual bool filterEvent(QEvent *event) = 0;
+ \table
+ \header
+ \o Supported Hardware Accelerated Graphics APIs
+ \row
+ \o \l {Qt for Embedded Linux and OpenGL}{OpenGL ES}
+ \row
+ \o \l {Qt for Embedded Linux and OpenVG}{OpenVG}
+ \row
+ \o \l {Qt for Embedded Linux and DirectFB}{DirectFB}
+ \endtable
- void setGraphicsItem(QGraphicsItem *);
- QGraphicsItem *graphicsItem() const;
- Qt::GestureState state() const;
-
-protected:
- QGesture(QGesturePrivate &dd, QObject *parent);
- bool eventFilter(QObject*, QEvent*);
-
- virtual void reset();
- void updateState(Qt::GestureState state);
-
-//! [qgesture-signals]
-Q_SIGNALS:
- void started();
- void triggered();
- void finished();
- void cancelled();
-//! [qgesture-signals]
-
-private:
- friend class QWidget;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QGESTURE_H
+*/
diff --git a/doc/src/snippets/gestures/imageviewer/tapandholdgesture.h b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
index 682342efc7..66b6948d78 100644
--- a/doc/src/snippets/gestures/imageviewer/tapandholdgesture.h
+++ b/doc/src/platforms/emb-HwAcc-WinCE.qdoc
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the examples of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,36 +39,31 @@
**
****************************************************************************/
-#ifndef TAPANDHOLDGESTURE_H
-#define TAPANDHOLDGESTURE_H
+/*!
+ \page qt-embeddedWinCE-accel.html
-#include <QtCore/QBasicTimer>
-#include <QtGui/QGesture>
-#include <QtGui/QWidget>
+ \target Hardware Acceleration with Qt for Windows CE
-class TapAndHoldGesture : public QGesture
-{
- Q_OBJECT
- Q_PROPERTY(QPoint pos READ pos)
+ \title Qt for Windows CE Hardware Accelerated Graphics
+ \ingroup qtce
-public:
- TapAndHoldGesture(QWidget *parent);
- bool filterEvent(QEvent *event);
- void reset();
+ \input platforms/emb-hardwareacceleration.qdocinc
- QPoint pos() const;
+ \section1 Supported Hardware Accelerated Graphics APIs
-protected:
- void timerEvent(QTimerEvent *event);
+ This list shows which Hardware Accelerated Graphics APIs currently
+supported by Qt.
-private:
- QBasicTimer timer;
- int iteration;
- QPoint position;
- QPoint startPosition;
- static const int iterationCount;
- static const int iterationTimeout;
-};
+ \table
+ \header
+ \o Supported Hardware Accelerated Graphics APIs
+ \row
+ \o \l {Qt for Windows CE and OpenGL ES}{OpenGL ES}
+ \row
+ \o \l {Qt for Windows CE and OpenVG}{OpenVG}
+ \endtable
-#endif // TAPANDHOLDGESTURE_H
+
+
+*/
diff --git a/doc/src/platforms/emb-directfb-EmbLinux.qdoc b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
new file mode 100644
index 0000000000..38782be412
--- /dev/null
+++ b/doc/src/platforms/emb-directfb-EmbLinux.qdoc
@@ -0,0 +1,330 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qt-embeddedLinux-directfb.html
+
+\title Qt for Embedded Linux and DirectFB
+
+\ingroup qt-embedded-linux
+
+\section1 Introduction
+
+DirectFB is an open source LGPL licensed project founded by Denis Oliver Kropp
+and generally chip vendors start out with the official version and
+implement their own plugins to optimize the operations their hardware
+supports.
+
+We recommend using Qt 4.6 with DirectFB. DirectFB support was introduced
+already into Qt for Embedded Linux as a labs project for Qt 4.3 and folded
+into Qt as a screen driver for Qt 4.4, but not supported fully. In Qt 4.5,
+major changes were made to make it work with the optimized raster paint
+engine. And in Qt 4.6 these have been further improved.
+
+\tableofcontents
+
+\section1 Using DirectFB with Qt
+DirectFB is centered around \l{DirectFB - IDirectFBSurface}{Surfaces}
+which is the equivalent of a QPaintDevice. In the Qt/DirectFB plugin,
+DirectFB maps onto either a QPixmap or a QWindowSurface which essentially
+means that drawing onto QPixmap or a QWidget can be accelerated and drawing
+onto any other paint device (e.g. QImage) cannot.
+
+\section2 Configure
+
+When configuring Qt there are two options, from which you can choose:
+
+\code
+ ./configure -plugin-gfx-directfb
+ ./configure -qt-gfx-directfb
+
+\endcode
+
+With either mode, Qt will try the following to look for the DirectFB
+includes/libs.
+
+\list
+ \o Use pkg-config
+ \o Use directfb-config
+ \o Check in your qmake.conf
+\endlist
+
+Often the values returned from pkg-config/directfb-config indicates the
+locations of the libs/headers on the target rootfs, rather than their
+location on your host. The safest option is usually to explicitly populate
+these variables in your qmake.conf like this:
+
+\code
+QT_CFLAGS_DIRECTFB =
+/opt/toolchain/gcc4.3_mipsel_linux/usr/include/directfb -D_REENTRANT
+QT_LIBS_DIRECTFB = -L/opt/toolchain/gcc4.3_mipsel_linux/usr/lib/-ldirect
+-ldirectfb -lfusion
+\endcode
+
+\note While DirectFB supports a multi-process setup through a
+kernel-extension called Fusion this setup is not well tested with Qt.
+
+\section2 Supported graphics operations
+
+IDirectFBSurface supports blitting, filling, drawing lines rects etc, but
+it does not support everything Qt allows you to do. E.g. painter paths,
+polygons, complex transformations, antialiasing, gradients. Some of these
+things are handled in newer versions of DirectFB and could be supported by
+Qt. They are seemingly optional at the driver level, so you need to have
+fall back code paths for older drivers and drivers on which this is not
+implemented.
+
+The QDirectFBPaintEngine is a subclass of the QRasterPaintEngine, thus
+essentially supporting everything QRasterPaintEngine supports. This means
+that it supports all graphical operations that Qt supports, but certain
+operations will have to fall back to software rendering and that should be
+avoided due to performance issues. Instead, these operations should be
+rendered into a QPixmap once, and then reuse the pixmap.
+
+Note: Fallbacks to software rendering should be avoided. If unsupported
+operations are used, the paint engine must fallback to the
+QRasterPaintEngine engine. A good debugging tip is to make Qt warn you when
+such fall backs occur, and to disable the fall back and only return.
+Debugging options are listed below.
+
+\section2 DirectFB driver
+DirectFB also provides an abstraction for keyboard and mouse drivers. This
+simplifies the process of getting the target hardware up and running. It
+also brings us to a feature fragmentation issue between different versions
+of DirectFB.
+
+The Qt DirectFB driver currently supports DirectFB versions >= 0.9. Still,
+there are large differences in what each actual implementation handles
+correctly. It is relatively common not to properly support
+\l{DirectFB - IDirectFBWindow}{DirectFB windows}, so Qt needs to handle
+this case with a different code path. In addition, certain drivers do not
+properly support DirectFB's cursor handling. This means Qt has to have a
+code path for rendering the cursor itself when this is the case.
+Some drivers do not let us create
+\l{DirectFB - DFBSurfaceDescription}{preallocated surfaces} which means we
+have to have a conditional code path for that case.
+
+\section2 Optimize performance using define options
+
+Qt/DirectFB comes with a number of defines that can be either
+uncommented in directfb.pri or added to the QT_DEFINES_DIRECTFB variable in
+your qmake.conf.
+
+\note The defines have been moved from
+\e{src/plugins/gfxdrivers/directfb/directfb.pro} to
+\e{src/gui/embedded/directfb.pri}
+
+\code
+#DIRECTFB_DRAWINGOPERATIONS=DRAW_RECTS|DRAW_LINES|DRAW_IMAGE|DRAW_PIXMAP|
+ DRAW_TILED_PIXMAP|STROKE_PATH|DRAW_PATH|DRAW_POINTS|DRAW_ELLIPSE|DRAW_POLYGON|
+ DRAW_TEXT|FILL_PATH|FILL_RECT|DRAW_COLORSPANS|DRAW_ROUNDED_RECT
+
+ #DEFINES += \"QT_DIRECTFB_WARN_ON_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
+ #DEFINES += \"QT_DIRECTFB_DISABLE_RASTERFALLBACKS=$$DIRECTFB_DRAWINGOPERATIONS\"
+\endcode
+
+As demonstrated above, you need to Qt which drawing operations you want to
+warn/disable. Since there are varying implementations of DirectFB from
+manufacturer to manufacture, different operations will be optimized. This
+require you to define the operations you want to warn about or disable.
+These are listed above in the DIRECTFB_DRAWINGOPERATIONS variable.
+
+Following is a table showing which options you have.
+
+\table
+ \header
+ \o Define option
+ \o Description
+ \row
+ \o QT_DIRECTFB_IMAGECACHE
+ \o Defining this means that Qt will cache an IDirectFBSurface per
+QImage you draw based on its \l{QImage::}{cacheKey()}.
+Use this define if your application draws many QImages that
+remain the same. Note that if you in this situation draw an image and then
+change it, by calling bits() or opening a QPainter on it, the cache will
+not benefit you. You can control the cache size with the imageCacheSize
+connect option.
+
+ \row
+ \o QT_NO_DIRECTFB_WM
+ \o If your DirectFB implementation does not support windows, you
+have to define this to make Qt work properly. You can test this by checking
+if the \l{DirectFB - df_window example}{df_window example} runs well.
+This means that all drawing operations onto a QWidget involves
+an extra blitting step since Qt essentially first has to draw into an
+off-screen buffer and then blit this buffer to the back buffer of the
+primary surface. Finally, Qt must flip the back buffer to the front buffer,
+which usually involves another blit. Still, blits are usually very fast
+with DirectFB.
+
+To work around this you can make your widget paint on screen, \l
+Qt::WA_PaintOnScreen but this comes with other limitations. This should be
+avoided if you want more than one full-screen window in your application.
+In addition, it will not work without proper DirectFB mouse support from the
+layer. Also, see QT_NO_DIRECTFB_LAYER for more.
+
+ \row
+ \o QT_NO_DIRECTFB_LAYER
+ \o If your DirectFB display layer cannot be used for e.g. drawing
+mouse cursor, creating windows you have to define this. Defining this also
+requires defining QT_NO_DIRECTFB_WM and involves making Qt render the
+cursor rather than letting DirectFB do it.
+
+ \row
+ \o QT_NO_DIRECTFB_PALETTE
+ \o Define this if your DirectFB driver does not support surfaces
+with \l{DirectFB - IDirectFBPalette}{color tables}.
+The effect of defining this is that Qt will have to convert
+images with \l QImage::Format_Indexed8 format to another format before
+rendering them.
+
+ \row
+ \o QT_NO_DIRECTFB_PREALLOCATED
+ \o Define this if your DirectFB driver does not support creating a
+surface with preallocated data. This will make a more frequent use of
+\l{C++ Reference - memcpy}{memcpy()}
+when drawing images. If you define this, you might want to consider
+defining QT_DIRECTFB_IMAGECACHE for better image rendering performance.
+
+ \row
+ \o QT_NO_DIRECTFB_MOUSE and QT_NO_DIRECTFB_KEYBOARD
+ \o Define this if your driver does not provide keyboard/mouse
+events through \l{DirectFB - CreateInputEventBuffer}{CreateInputEventBuffer}.
+This means that Qt cannot use DirectFB to receive keyboard/mouse events and
+if you want such events in your application, you will have to provide
+another driver. For more info see \l {Qt for Embedded Linux Pointer
+Handling}{Qt for Embedded Linux Pointer Handling} and \l{Qt for Embedded
+Linux Character Input}{Qt for Embedded Linux Character Input}
+
+ \row
+ \o QT_DIRECTFB_TIMING
+ \o Define this when debugging to get output on stderr about the
+frames per second.
+
+ \row
+ \o QT_NO_DIRECTFB_OPAQUE_DETECTION
+ \o When blitting a surface Qt has to decide whether to set the
+\l{DirectFB - DFBSurfaceBlittingFlags}{DSBLIT_BLEND_ALPHACHANNEL}
+flag. If you load an image from file or network data that has a format that
+includes an alpha channel, the image might still be completely opaque.
+Normally Qt runs through every pixel to check if there really is an alpha
+channel there. This involves some overhead but usually pays off in the end
+because blitting is cheaper than blending. If you define this Qt will
+assume that an image with a format that has alpha channel contains at least
+one pixel with an alpha value != 255.
+
+ \row
+ \o QT_DIRECTFB_SUBSURFACE
+ \o Defining this enables a mode that tries to minimize overhead from
+locking/unlocking surfaces. Note that this currently is experimental.
+
+ \row
+ \o QT_DIRECTFB_WINDOW_AS_CURSOR
+ \o Define this if your DirectFB implementation supports windows but
+can not render the cursor properly. This involves creating a small top level
+window and moving it around when the cursor moves. It does not always
+perform well.
+
+ \row
+ \o QT_NO_DIRECTFB_IMAGEPROVIDER
+ \o By default Qt will use DirectFB to load QPixmaps from disk/memory. If
+your DirectFB implementation does not support this it might make sense to
+define this.
+
+ \row
+ \o QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE
+ \o Define this to make sure Qt always keeps at least one
+\l{DirectFB - IDirectFBImageProvider}{IDirectFBImageProvider}
+object alive. This is to avoid considerable overhead when the first
+IDirectFBImageProvider is created, the last IDirectFBImageProvider is
+removed.
+
+\endtable
+
+\section2 Unsupported graphics operations
+
+There are a number of unsupported operations causing fallbacks. DirectFB
+does not support the following functions.
+
+
+
+\table
+ \header
+ \o Functions
+ \row
+ \o QPainter::strokePath(const QPainterPath & path, const QPen & pen)
+ \row
+ \o QPainter::drawPath(const QPainterPath & path)
+ \row
+ \o QPainter::fillPath(const QPainterPath & path, const QBrush & brush)
+ \row
+ \o QPainter::drawPoints(const QPointF * points, int pointCount)
+ \row
+ \o QPainter::drawEllipse(const QRectF & rectangle)
+ \row
+ \o QPainter::drawPolygon(const QPointF * points, int pointCount,
+ Qt::FillRule fillRule = Qt::OddEvenFill)
+ \row
+ \o QPainter::drawText(const QPointF & position, const QString & text)
+ \row
+ \o QGradient
+ \endtable
+
+\section2 Avoiding fallbacks
+To avoid fallbacks make sure that the following points are true:
+
+\list
+ \o QPen::isSolid() returns true and uses a color with a one pixel
+width. (QPen::width() returns 1.
+ \o QTransform::TransformationType() <= QTransform::TxScale are not
+supported.
+ \o Clipping must be a simple rectangle or a QRegion.
+\endlist
+
+\section2 When painting images
+\note You should use QPixmap instead of QImage. QImages are drawn by
+the QRasterPaintEngine. To get a warning for every fallback to the
+QRasterPaintEngine, use QT_DIRECTFB_WARN_ON_RASTERFALLBACKS. If
+QT_DIRECTFB_DISABLE_RASTERFALLBACKS is defined, DirectFB will only return
+instead of falling back to QRasterPaintEngine. Please note that these
+defines should only be used when optimizing the application.
+
+*/
diff --git a/doc/src/platforms/emb-fonts.qdoc b/doc/src/platforms/emb-fonts.qdoc
index 4df65da424..0425285bc4 100644
--- a/doc/src/platforms/emb-fonts.qdoc
+++ b/doc/src/platforms/emb-fonts.qdoc
@@ -60,9 +60,9 @@
prerendered fonts and TrueType fonts. For compatibility, it will also read the
legacy \c lib/fonts/fontdir file.
- Support for other font formats can be added, contact
- \l{mailto:qt-info@nokia.com}{qt-info@nokia.com} for more
- information.
+ Support for other font formats can be added. To make a suggestion,
+ please create a task in our bug tracker at \l
+ {http://bugreports.qt.nokia.com}{http://bugreports.qt.nokia.com}.
\tableofcontents
diff --git a/doc/src/platforms/emb-hardwareacceleration.qdocinc b/doc/src/platforms/emb-hardwareacceleration.qdocinc
new file mode 100644
index 0000000000..3851628155
--- /dev/null
+++ b/doc/src/platforms/emb-hardwareacceleration.qdocinc
@@ -0,0 +1,129 @@
+
+\section1 Hardware Acceleration
+
+When designing applications for embedded devices the choice often stands
+between graphics effects and performance. On most devices, you cannot have
+both simply because the hardware needed for such operations just is not
+there. Still a growing number of devices use hardware dedicated to graphics
+operations to improve performance.
+
+Using graphics acceleration hardware is more power efficient than using the
+CPU. The reason for this is that the CPU might require a clock speed that
+is up to 20 times higher than the GPU, achieving the same results. E.g. a
+typical hardware accelerated mobile graphics unit can rasterize one or two
+bilinear texture fetches in one cycle, while a software implementation
+takes easily more than 20 cycles. Graphics hardware generally have a much
+lower clock speed and memory bandwidth and different level of acceleration
+than desktop GPUs. One example is that many GPUs leave out transformation
+and lighting from the graphics pipeline and only implements rasterization.
+
+So the key to write good applications for devices is therefore to limit the
+wow factor down to what the target hardware can handle, and to take
+advantage of any graphics dedicated hardware. Qt provides several ways to
+both render advanced effects on the screen and speed up your application
+using hardware accelerated graphics.
+
+\tableofcontents
+
+\section2 Qt for Embedded Graphics pipeline
+
+Qt uses QPainter for all graphics operations. By using the same API
+regardless of platform, the code can be reused on different devices.
+QPainter use different paint engines implemented in the QPaintEngine API to
+do the actual painting.
+
+The QPaintEngine API provides paint engines for each window system and
+painting framework supported by Qt. In regards to Qt for Embedded, this
+also includes implementations for OpenGL ES versions 1.1 and 2.0, as well
+as OpenVG and DirectFB(Embedded Linux only).
+
+By using one of these paint engines, you will be able to improve the
+graphics performance of your Qt application. However, if the graphics
+operations used are not supported, this might as well be a trap, slowing
+down your application significantly. This all depends on what kind of
+graphics operations that are supported by the target devices hardware
+configuration.
+
+\image platformHWAcc.png
+
+The paint engine will direct all graphics operations supported by the
+devices hardware to the GPU, and from there they are sent to the
+framebuffer. Unsupported graphics operations falls back to the
+QRasterPaintEngine and are handled by the CPU before sent to the
+framebuffer. In the end, the operating system sends the paint updates off
+to the screen/display. The fallback operation is quite expensive in regards
+to memory consumption, and should be avoided.
+
+\section2 Hardware configuration requirements
+
+Before implementing any application using hardware acceleration, it is wise
+to get an overview of what kind of hardware accelerated graphics operations
+that are available for the target device.
+
+\note On devices with no hardware acceleration, Qt will use
+QRasterPaintEngine, which handles the acceleration using software. On
+devices supporting OpenGL ES, OpenVG or DirectFB(not supported by Windows
+CE), Qt will use the
+respective paint engines to accelerate painting. However, hardware
+configurations that only support a limited set of hardware acceleration
+features, might slow the application graphics down rather than speeding it
+up when using unsupported operations that must fall back to the raster
+engine.
+
+\section3 Different architectures
+
+Based on the architecture used in a device we can make a recommendation on
+which hardware acceleration techniques to use. There are mainly two
+different architectures on embedded devices. These are devices with a
+Unified Memory Architecture (UMA), and devices with dedicated graphics
+memory. Generally, high-end devices will have dedicated graphics memory.
+Low-end devices will just use system memory, sometimes reserving a memory
+region and sometimes not.
+
+In addition to this, we can categorize the devices into five types based on
+the different graphics operations supported by their hardware.
+
+\list 1
+ \o No support for graphics acceleration.
+ \o Support for blitter and alpha blending.
+ \o Support for path based 2D vector graphics.
+ \o Support for fixed function 3D graphics.
+ \o Support for programmable 3D graphics.
+\endlist
+
+Based on these characteristics the table below recommends which paint
+engines to use with the different types of hardware configurations.
+
+\section3 Recommended use of hardware acceleration based on hardware
+
+ \table
+ \header
+ \o Type
+ \o UMA
+ \o Non-UMA
+ \row
+ \o \bold {None}
+ \o Qt Raster Engine
+ \o Qt Raster Engine
+ \row
+ \o \bold {Blitter}
+ \o DirectFB
+ \o DirectFB
+ \row
+ \o \bold {2D Vector}
+ \o OpenVG
+ \o OpenVG
+ \row
+ \o \bold {Fixed 3D}
+ \o OpenGL (ES) 1.x
+ \o OpenGL (ES) 1.x
+ \row
+ \o \bold {Programmable 3D}
+ \o OpenGL (ES) 2.x
+ \o OpenGL (ES) 2.x
+
+ \endtable
+
+\note Since the DirectFB API is quite primitive, the raster paint engine
+handles most of the operations.
+\note Blitter and Alpha blending is currently not supported on Windows CE.
diff --git a/doc/src/platforms/emb-opengl.qdoc b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
index 2ed5d041e9..bede2ca460 100644
--- a/doc/src/platforms/emb-opengl.qdoc
+++ b/doc/src/platforms/emb-opengl-EmbLinux.qdoc
@@ -40,31 +40,24 @@
****************************************************************************/
/*!
-\page qt-embedded-opengl.html
+\page qt-embeddedLinux-opengl.html
\title Qt for Embedded Linux and OpenGL
-\ingroup qt-embedded-linux
-\section1 Introduction
+\ingroup qt-embedded-linux
-\l {http://www.opengl.org}{OpenGL} is an industry standard API for
-2D/3D graphics. It provides a powerful, low-level interface between
-software and acceleration hardware, and it is operating system and
-window system independent.
+\input platforms/emb-opengl.qdocinc
-\l {http://www.khronos.org/opengles}{OpenGL ES} is a subset
-of the \l {http://www.opengl.org}{OpenGL} standard.
-Because it is meant for use in embedded systems, it has a smaller,
-more constrained API.
+\section1 Using OpenGL with Qt for Embedded Linux
+Qt for Embedded Linux provides support for integrating OpenGL ES for
+drawing into a QGLWidget. The current implementation supports OpenGL and 2D
+painting within a QGLWidget. Using OpenGL to accelerate regular widgets and
+compositing top-level windows with OpenGL are not currently supported.
-For reference, Nokia provides support for integrating \l
-{http://www.khronos.org/opengles}{OpenGL ES} with Qt for Embedded Linux
-for drawing into a QGLWidget.
+\note OpenGL rendering only works with QGLWidget under QWS. Regular
+widgets cannot currently support it.
-The current implementation supports OpenGL and 2D painting within a
-QGLWidget. Using OpenGL to accelerate regular widgets and compositing
-top-level windows with OpenGL are not currently supported. These issues
-will be addressed in future versions of Qt.
+\section2 Configure
It is recommended that Qt for Embedded Linux is configured with the
\c{-DQT_QWS_CLIENTBLIT} and \c{-DQT_NO_QWS_CURSOR} options for optimum
@@ -72,58 +65,11 @@ performance. OpenGL is rendered direct to the screen and these options
prevent Qt for Embedded Linux from trying to do its own non-OpenGL
compositing on the QGLWidget contents.
-\section2 Using OpenGL 3D Graphics in Applications
-
-The \l {QtOpenGL module} offers classes that make it easy to draw 3D
-graphics in GUI applications. The module API is cross-platform, so it
-is also available on Windows, X11, and Mac OS X.
-
-To use OpenGL-enabled widgets in a Qt for Embedded Linux application,
-all that is required is to subclass the QGLWidget and draw into instances of
-the subclass with standard OpenGL functions.
-
-Note that on most embedded hardware, the OpenGL implementation is
-actually \l{http://www.khronos.org/opengles/1_X/}{OpenGL/ES 1.1} or
-\l{http://www.khronos.org/opengles/2_X/}{OpenGL/ES 2.0}. When painting
-within a QGLWidget::paintGL() override, it is necessary to limit the
-application to only the features that are present in the OpenGL/ES
-implementation.
-
-\section2 Using OpenGL to Accelerate Normal 2D Painting
-
-Qt provides a subclass of QPaintEngine that translates QPainter operations
-into OpenGL calls (there are actually two subclasses, one for OpenGL/ES 1.1
-and another for OpenGL/ES 2.0). This specialized paint engine can be used
-to improve 2D rendering performance on appropriate hardware. It can also
-overlay controls and decorations onto 3D scenes drawn using OpenGL.
-
-As mentioned above, the OpenGL paint engine is not currently supported
-in regular widgets. However, any application that uses QGraphicsView
-can set a QGLWidget as the viewport and obtain access to the
-OpenGL paint engine that way:
-
-\code
-QGraphicsView view(&scene);
-view.setViewport(new QGLWidget);
-view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
-view.showFullScreen();
-\endcode
-
-It is recommended that the QGraphicsView::FullViewportUpdate flag
-be set because the default double-buffered behavior of QGLWidget
-does not support partial updates. It is also recommended that the
-window be shown full-screen because that usually has the best
-performance on current OpenGL/ES implementations.
-
-Once a QGraphicsView has been initialized as above, regular widgets
-can be added to the canvas using QGraphicsProxyWidget if the
-application requires them.
-
\section2 Using OpenGL to Implement Window Compositing and Effects
-Compositing effects can be simulated by adjusting the opacity and
-other parameters of the items within a QGraphicsView canvas on a
-QGLWidget viewport.
+Compositing effects can be simulated by adjusting the opacity and other
+parameters of the items within a QGraphicsView canvas on a QGLWidget
+viewport.
While Qt for Embedded Linux does include a complete windowing system,
using OpenGL to composite regular window surfaces can be quite difficult.
@@ -135,23 +81,20 @@ which is why we do not recommend implementing that form of compositing.
We intend to address this problem in future versions of Qt.
\section1 Integrating OpenGL/ES into Qt for Embedded Linux
-
\section2 Reference Integration
-
-The reference integration for OpenGL into Qt for Embedded Linux
-is for the PowerVR chipset from \l{http://www.imgtec.com/}{Imagination
-Technologies}. It consists of two components: \c{pvreglscreen} which
-provides the Qt for Embedded Linux screen driver, and \c{QWSWSEGL}
-which implements a plug-in to the PowerVR EGL implementation to
-implement low-level OpenGL drawing surfaces.
+The reference integration for OpenGL into Qt for Embedded Linux is for the
+PowerVR chipset from \l{http://www.imgtec.com/}{Imagination Technologies}.
+It consists of two components: \c{pvreglscreen}, which provides the Qt for
+Embedded Linux screen driver, and \c{QWSWSEGL}, which implements a plug-in
+to the PowerVR EGL implementation to implement low-level OpenGL drawing
+surfaces.
\section2 Integrating Other Chipsets
-
-In this section we discuss the essential features of the reference
+In this section, we discuss the essential features of the reference
integration that need to be provided for any other chipset integration.
The QtOpenGL module assumes that a QGLWidget can be represented
-by a \c EGLNativeWindowType value in some underlying window system
+by an \c EGLNativeWindowType value in some underlying window system
implementation, and that \c{eglSwapBuffers()} is sufficient to copy
the contents of the native window to the screen when requested.
@@ -159,7 +102,7 @@ However, many EGL implementations do not have a pre-existing window system.
Usually only a single full-screen window is provided, and everything else
must be simulated some other way. This can be a problem because
of QtOpenGL's assumptions. We intend to address these assumptions in a
-future version of Qt, but for now it is the responsibility of the integrator
+future version of Qt, but for now, it is the responsibility of the integrator
to provide a rudimentary window system within the EGL implementation.
This is the purpose of \c{QWSWSEGL} in the reference integration.
@@ -218,13 +161,4 @@ In the case of PowerVR, the rudimentary window system in \c{QWSWSEGL}
provides a \c PvrQwsDrawable object to represent the \c EGLNativeWindowType
value for the widget.
-\section1 OpenVG Support
-
-\l {http://www.khronos.org/openvg} {OpenVG} is a dedicated API for 2D
-graphics on mobile devices. It is therefore more likely to be a better
-alternative for 2D acceleration than OpenGL/ES. Acceleration of
-regular widgets is supported with OpenVG, unlike with OpenGL/ES.
-See \l{OpenVG Rendering in Qt} for more information on the
-OpenVG support in Qt.
-
*/
diff --git a/doc/src/platforms/emb-opengl.qdocinc b/doc/src/platforms/emb-opengl.qdocinc
new file mode 100644
index 0000000000..dac537946e
--- /dev/null
+++ b/doc/src/platforms/emb-opengl.qdocinc
@@ -0,0 +1,85 @@
+\section1 Introduction
+
+\l {http://www.opengl.org}{OpenGL} is an industry standard API for
+2D/3D graphics. It provides a powerful, low-level interface between
+software and acceleration hardware, and it is operating system and
+window system independent. \l {http://www.khronos.org/opengles}{OpenGL ES}
+is a subset of the \l {http://www.opengl.org}{OpenGL} standard. Because it
+is designed for use with embedded systems, it has a smaller, more
+constrained API.
+
+\l {http://www.khronos.org/opengles/1_X}{OpenGL ES version 1.x} is designed for
+fixed function hardware, while its successor \l
+{http://www.khronos.org/opengles/2_X}{OpenGL ES version 2.x} is designed for
+programmable hardware. It is worth noting that there is a significant
+difference between the two, and that they are not compatible with each
+other. OpenGL ES 1.x limits processing to a pre-defined set of fixed
+options for drawing and lighting objects. OpenGL 2.x has a significantly
+shorter graphics pipeline than 1.x. Instead of using function
+transformation and a fragment pipeline, 2.x uses the \l
+{http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf}{OpenGL
+ES Shading Language (GLSL ES)}. Instead of using the pre-defined functions,
+the programmer writes small shader programs telling the hardware in detail
+how to render each object.
+
+The \l {QtOpenGL module} offers classes that make it easy to draw 3D
+graphics in GUI applications using OpenGL ES. Qt provides a plugin that
+integrates both OpenGL ES versions \l
+{http://www.khronos.org/opengles/1_X}{1.x} and \l
+{http://www.khronos.org/opengles/2_X}{2.x} with Qt for Embedded. However,
+Qt for Embedded can be adapted to a wide range of OpenGL versions.
+
+To translate QPainter operations into OpenGL ES calls (there are actually
+two subclasses, one for OpenGL/ES 1.1 and another for OpenGL/ES 2.0), Qt
+uses a subclass of QPaintEngine. This specialized paint engine can be used
+to improve 2D rendering performance on appropriate hardware. It can also
+overlay controls and decorations onto 3D scenes drawn using OpenGL.
+
+\tableofcontents
+
+\section1 Using OpenGL ES with Qt
+To use OpenGL-enabled widgets in a Qt for Embedded application, all that is
+required is to subclass QGLWidget and draw into instances of the subclass
+with standard OpenGL functions. The current implementation only
+supports OpenGL ES and 2D painting within a QGLWidget. Using OpenGL ES to
+accelerate regular widgets as well as compositing top-level windows with
+OpenGL ES are not currently supported. These issues will be addressed in
+future versions of Qt.
+
+\note The OpenGL paint engine is not currently supported in regular
+widgets. However, any application that uses QGraphicsView can set a
+QGLWidget as the viewport and obtain access to the OpenGL paint engine that
+way:
+
+\code
+ QGraphicsView view(&scene);
+ view.setViewport(new QGLWidget());
+ view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+ view.setFrameStyle(0);
+ view.showFullScreen();
+\endcode
+
+It is recommended that the QGraphicsView::FullViewportUpdate flag
+be set because the default double-buffered behavior of QGLWidget
+does not support partial updates. It is also recommended that the
+window be shown full-screen because that usually has the best
+performance on current OpenGL ES implementations.
+
+Once a QGraphicsView has been initialized as above, regular widgets
+can be added to the canvas using QGraphicsProxyWidget if the
+application requires them.
+
+\note OpenGL ES 2.X does not support PBuffers, so QGLPixelBuffer will not
+work. In this case, QGLFramebufferObject should be used instead. However,
+OpenGL ES 1.X does not support Framebuffer objects, with the exception of
+some OpenGL ES 1.X extensions. In this case, please use QGLPixelBuffer.
+
+\note On most embedded hardware, the OpenGL implementation is
+actually \l{http://www.khronos.org/opengles/1_X/}{OpenGL/ES 1.1} or
+\l{http://www.khronos.org/opengles/2_X/}{OpenGL/ES 2.0}. When painting
+within a QGLWidget::paintGL() override, it is necessary to limit the
+application to only the features that are present in the OpenGL/ES
+implementation.
+
diff --git a/doc/src/platforms/emb-openvg-EmbLinux.qdoc b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
new file mode 100644
index 0000000000..abdb6174c1
--- /dev/null
+++ b/doc/src/platforms/emb-openvg-EmbLinux.qdoc
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qt-embeddedLinux-openvg.html
+
+\title Qt for Embedded Linux and OpenVG
+
+\ingroup qt-embedded-linux
+
+\input platforms/emb-openvg.qdocinc
+
+
+
+*/
diff --git a/doc/src/platforms/emb-openvg.qdocinc b/doc/src/platforms/emb-openvg.qdocinc
new file mode 100644
index 0000000000..37ccb9c1de
--- /dev/null
+++ b/doc/src/platforms/emb-openvg.qdocinc
@@ -0,0 +1,288 @@
+\section1 Introduction
+
+\l {http://www.khronos.org/openvg}{OpenVG} is a standard API from the
+\l{http://www.khronos.org/openvg}{Khronos Group} for accelerated 2D vector
+graphics and raster graphics. It is a dedicated API for 2D graphics on
+mobile devices. It is therefore more likely to be a better alternative for
+2D acceleration than OpenGL/ES.
+
+\tableofcontents
+
+\section1 Using OpenVG with Qt
+The QtOpenVG plugin provides support for OpenVG painting. OpenVG is
+optimized for 2D vector operations, and closely matches the functionality
+in QPainter. To translate QPainter operations into OpenVG calls, Qt uses a
+subclass of QPaintEngine. Unlike with OpenGL ES, OpenVG can be used for
+acceleration of regular widgets. It can therefore be an excellent substitute
+for the default raster-based QPaintEngine on hardware that supports the
+OpenVG API.
+
+\section2 Configure
+OpenVG support can be enabled by passing the \c{-openvg} option to
+configure. It is assumed that the following qmake variables are set to
+appropriate values in the qmake.conf file for your platform:
+
+ \list
+ \o QMAKE_INCDIR_OPENVG
+ \o QMAKE_LIBDIR_OPENVG
+ \o QMAKE_LIBS_OPENVG
+ \endlist
+
+Most OpenVG implementations are based on EGL, so the following variables
+may also need to be set:
+
+ \list
+ \o QMAKE_INCDIR_EGL
+ \o QMAKE_LIBDIR_EGL
+ \o QMAKE_LIBS_EGL
+ \endlist
+
+See \l{qmake Variable Reference} for more information on these variables.
+
+\section2 Supported OpenVG Engines
+
+Two kinds of OpenVG engines are currently supported: EGL based, and engines
+built on top of OpenGL such as
+\l{http://sourceforge.net/projects/shivavg}{ShivaVG}. EGL based engines are
+preferred.
+
+It is assumed that the EGL implementation has some way to turn a
+QWidget::winId() into an EGL rendering surface with
+\c{eglCreateWindowSurface()}. If this is not the case, then modifications
+may be needed to the code under \c{src/gui/egl} and
+\c{src/plugins/graphicssystems/openvg} to accomodate the EGL
+implementation.
+
+The ShivaVG graphics system under \c{src/plugins/graphicssystems/shivavg}
+is an example of how to integrate a non-EGL implementation of OpenVG into
+Qt. It is currently only supported with Qt/X11 and being an example only,
+the resulting screen output may not be as good as with other OpenVG
+engines.
+
+\section1 Using the OpenVG graphics system
+
+Once the graphics system plugin has been built and installed, applications
+can be run as follows to use the plugin:
+
+ \code
+ app -graphicssystem OpenVG
+ \endcode
+
+If ShivaVG is being used, then substitute \c ShivaVG instead of \c OpenVG
+in the line above.
+
+If the plugin fails to load, try setting the \c QT_DEBUG_PLUGINS
+environment variable to 1 and try again. Usually the plugin cannot be
+loaded because Qt cannot locate it in the directory
+\c{plugins/graphicssystems} within the Qt installation, or the dynamic
+library path does not include the directory containing the system's \c
+libOpenVG.so library.
+
+\section2 Supported features
+
+\table
+ \header
+ \o Feature
+ \o Description
+
+ \row
+ \o Context modes
+ \o The default configuration is "single-context" mode, where a single
+EGLContext object is used for all drawing, regardless of the surface.
+Multiple EGLSurfaces are created, one for each window surface or pixmap.
+eglMakeCurrent() is called with the same EGLContext every time, but a
+different EGLSurface.
+
+Single-context mode is necessary for QPixmapData to be implemented in terms
+of a VGImage. If single-context mode is not enabled, then QPixmapData will
+use the fallback QRasterPixmapData implementation, which is less efficient
+performance-wise.
+
+Single-context mode can be disabled with the QVG_NO_SINGLE_CONTEXT
+define if the OpenVG engine does not support one context with multiple
+surfaces.
+
+ \row
+ \o Transformation matrices
+ \o All affine and projective transformation matrices are supported.
+
+QVGPaintEngine will use the engine to accelerate affine transformation
+matrices only. When a projective transformation matrix is used,
+QVGPaintEngine will transform the coordinates before passing them to the
+engine. This will probably incur a performance penalty.
+
+Pixmaps and images are always transformed by the engine, because OpenVG
+specifies that projective transformations must work for images.
+
+It is recommended that client applications should avoid using projective
+transformations for non-image elements in performance critical code.
+
+ \row
+ \o Composition modes
+ \o The following composition modes are supported:
+
+\list
+\o QPainter::CompositionMode_SourceOver
+\o QPainter::CompositionMode_DestinationOver
+\o QPainter::CompositionMode_Source
+\o QPainter::CompositionMode_SourceIn
+\o QPainter::CompositionMode_DestinationIn
+\o QPainter::CompositionMode_Plus
+\o QPainter::CompositionMode_Multiply
+\o QPainter::CompositionMode_Screen
+\o QPainter::CompositionMode_Darken
+\o QPainter::CompositionMode_Lighten
+\endlist
+
+The other members of QPainter::CompositionMode are not supported
+because OpenVG 1.1 does not have an equivalent in its \c VGBlendMode
+enumeration. Any attempt to set an unsupported mode will result in
+the actual mode being set to QPainter::CompositionMode_SourceOver.
+Client applications should avoid using unsupported modes.
+
+ \row
+ \o Pens and brushes
+ \o All pen styles are supported, including cosmetic pens.
+
+All brush styles are supported except for conical gradients, which are not
+supported by OpenVG 1.1. Conical gradients will be converted into a solid
+color brush corresponding to the first color in the gradient's color ramp.
+
+Affine matrices are supported for brush transforms, but not projective
+matrices.
+
+
+ \row
+ \o Rectangles, lines, and points
+ \o Rectangles, lines, and rounded rectangles use cached VGPath
+objects to try to accelerate drawing operations. vgModifyPathCoords() is
+used to modify the co-ordinates in the cached VGPath object each time
+fillRect(), drawRects(), drawLines(), or drawRoundedRect() is called.
+
+If the engine does not implement vgModifyPathCoords() properly, then the
+QVG_NO_MODIFY_PATH define can be set to disable path caching. This will
+incur a performance penalty.
+
+Points are implemented as lines from the point to itself. The cached line
+drawing VGPath object is used when drawing points.
+
+ \row
+ \o Polygons and Ellipses
+ \o Polygon and ellipse drawing creates a new VGPath object every
+time drawPolygon() or drawEllipse() is called. If the client application
+is making heavy use of these functions, the constant creation and
+destruction of VGPath objects could have an impact on performance.
+
+If a projective transformation is active, ellipses are converted into cubic
+curves prior to transformation, which may further impact performance.
+
+Client applications should avoid polygon and ellipse drawing in performance
+critical code if possible.
+
+ \row
+ \o Other Objects
+ \o Most other objects (arcs, pies, etc) use drawPath(), which takes
+a QPainterPath argument. The default implementation in QPainterEngineEx
+converts the QPainterPath into a QVectorPath and then calls draw(), which
+in turn converts the QVectorPath into a VGPath for drawing.
+
+To reduce the overhead, we have overridden drawPath() in QVGPaintEngine to
+convert QPainterPath's directly into VGPath's. This should help improve
+performance compared to the default implementation.
+
+Client applications should try to avoid these types of objects in
+performance critical code because of the QPainterPath to VGPath conversion
+cost.
+
+ \row
+ \o Clipping
+ \o Clipping with QRect, QRectF, and QRegion objects is supported on
+all OpenVG engines with vgMask() if the transformation matrix is the
+identity or a simple origin translation.
+
+Clipping with an arbitrary QPainterPath, or setting the clip region when
+the transformation matrix is simple, is supported only if the OpenVG engine
+has the vgRenderToMask() function (OpenVG 1.1 and higher).
+
+The QVG_NO_RENDER_TO_MASK define will disable the use of vgRenderToMask().
+
+The QVG_SCISSOR_CLIP define will disable clipping with vgMask() or
+vgRenderToMask() and instead use the scissor rectangle list to perform
+clipping. Clipping with an arbitrary QPainterPath will not be supported.
+
+The QVG_SCISSOR_CLIP define should only be used if the OpenVG engine does
+not support vgMask() or vgRenderToMask().
+
+ \row
+ \o Opacity
+ \o Opacity is supported for all drawing operations. Solid color
+pens, solid color brushes, gradient brushes, and image drawing with
+drawPixmap() and drawImage() will probably have the best performance
+compared to other kinds of pens and brushes.
+
+ \row
+ \o Text Drawing
+ \o If OpenVG 1.1 is used, the paint engine will use VG fonts to
+cache glyphs while drawing. If the engine does not support VG fonts
+correctly, QVG_NO_DRAW_GLYPHS can be defined to disable this mode. Text
+drawing performance will suffer if VG fonts are not used.
+
+By default, image-based glyphs are used. If QVG_NO_IMAGE_GLYPHS is defined,
+then path-based glyphs will be used instead. QVG_NO_IMAGE_GLYPHS is ignored
+if QVG_NO_DRAW_GLYPHS is defined.
+
+If path-based glyphs are used, then the OpenVG engine will need to support
+hinting to render text with good results. Image-based glyphs avoids the
+need for hinting and will usually give better results than path-based
+glyphs.
+
+ \row
+ \o Pixmaps
+ \o In single-context mode, pixmaps will be implemented using
+VGImage unless QVG_NO_PIXMAP_DATA is defined.
+
+QVGPixmapData will convert QImage's into VGImage's when the application
+calls drawPixmap(), and the pixmap will be kept in VGImage form for the
+lifetime of the QVGPixmapData object. When the application tries to paint
+into a QPixmap with QPainter, the data will be converted back into a QImage
+and the raster paint engine will be used to render into the QImage.
+
+This arrangement optimizes for the case of drawing the same static pixmap
+over and over (e.g. for icons), but does not optimize the case of drawing
+into pixmaps.
+
+Bitmaps must use QRasterPixmapData. They are not accelerated with VGImage
+at present.
+
+ \row
+ \o Pixmap filters
+ \o Convolution, colorize, drop shadow, and blur filters are
+accelerated using OpenVG operations.
+
+\endtable
+
+\section2 Known issues
+
+Performance of copying the contents of an OpenVG-rendered window to the
+screen needs platform-specific work in the QVGWindowSurface class.
+
+Clipping with arbitrary non-rectangular paths only works on engines that
+support vgRenderToMask(). Simple rectangular paths are supported on all
+engines that correctly implement vgMask().
+
+The paint engine is not yet thread-safe, so it is not recommended for use
+in threaded Qt applications that draw from multiple threads. Drawing should
+be limited to the main GUI thread.
+
+Performance of projective matrices for non-image drawing is not as good
+as for affine matrices.
+
+QPixmap's are implemented as VGImage objects so that they can be quickly
+rendered with drawPixmap(). Rendering into a QPixmap using QPainter will
+use the default Qt raster paint engine on a QImage copy of the QPixmap, and
+will not be accelerated. This issue may be addressed in a future version
+of the engine.
+
+ShivaVG support is highly experimental and limited to Qt/X11. It is
+provided as an example of how to integrate a non-EGL engine.
+
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index 9896b081c0..68015a6b2e 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -406,17 +406,102 @@
\page platform-notes-symbian.html
\title Platform Notes - Symbian
\contentspage Platform Notes
+ \ingroup platform-specific
+ \brief Information about the state of support for the Symbian platform.
- This page contains information about the Symbian platforms Qt is currently known
- to run on. More information about the combinations of platforms and compilers
- supported by Qt can be found on the \l{Supported Platforms} page.
+ As with any port, the maturity for Qt for Symbian has not yet reached the
+ same level as other established Qt ports. This page documents the current
+ notes for the Symbian port.
+
+ \section1 Source Compatibility
+
+ Qt for Symbian provides the same level of source compatibility guarantee as
+ given for other platforms.  That is, a program which compiles against a given
+ version of Qt for Symbian will also compile against all future versions of the
+ same major release.
+
+ \section1 Binary Compatibility
+
+ As with every supported platform, we will strive to maintain
+ application behavior and binary compatibility throughout the lifetime of
+ the Qt 4.x series. However, due to the fact that Symbian support is newly
+ added in 4.6.0, there is a slight possibility that minor corrections to the
+ application binary interface (ABI) might be required in 4.6.1, in order to
+ ensure compatibility going forward. Any such change will be clearly
+ documented in the release notes for 4.6.1.
+
+ \section1 Supported Devices
+
+ Qt is designed to work on any device which runs one of the following
+ versions of Symbian:
+
+ \table
+ \header \o Symbian Version
+ \row \o S60 3.1
+ \row \o S60 3.2
+ \row \o S60 5.0 (Symbian ^1)
+ \endtable
+
+ Qt has received \l{Tier 1 Platforms}{Tier 1} testing on the following phone models:
+
+ \table
+ \header \o Phone
+ \row \o Nokia 5800
+ \row \o Nokia E71
+ \row \o Nokia E72
+ \row \o Nokia N78
+ \row \o Nokia N95
+ \row \o Nokia N97
+ \row \o Samsung i8910
+ \endtable
+
+ \section1 Supported Functionality
+
+ The following technologies and classes are not currently supported:
+
+ \table
+ \header \o Technology
+ \o Note
+ \row \o QtConcurrent
+ \o Planned for future release.
+ \row \o QtDBus
+ \o No current plans to support this feature.
+ \row \o QtOpenGL ES
+ \o Planned for future release.
+ \row \o Printing support
+ \o No current plans to support this feature.
+ \row \o Qt3Support
+ \o No current plans to support this feature.
+ \endtable
+
+ The following technologies have limited support:
+
+ \table
+ \header \o Technology
+ \o Note
+ \row \o QtSql
+ \o The only driver supported is SQLite.
+ \row \o QtMultimedia
+ \o Although the module itself is supported, no backend for Symbian
+ is currently available. However, there is a backend available
+ for Phonon.
+ \endtable
+
+ \section1 Known Issues
+
+ Known issues can be found by visiting the
+ \l{http://qt.gitorious.org/qt/pages/Qt460KnownIssues}{wiki page} with an
+ up-to-date list of known issues, and the list of bugs can be found by
+ \l{http://bugreports.qt.nokia.com/browse/QTBUG/component/19171}{browsing} the
+ S60 component in Qt's public task tracker, located at
+ \l{http://bugreports.qt.nokia.com/}{http://bugreports.qt.nokia.com/}.
- For information about mixing exceptions with Symbian leaves,
- see \l{Exception Safety with Symbian}
+ For information about mixing exceptions with Symbian leaves, see
+ \l{Exception Safety with Symbian}.
\section1 Multimedia and Phonon Support
- Qt provides a backend for Qt's multimedia module, Phonon, which supports
+ Qt provides a backend for Qt's Phonon module, which supports
video and sound playback through Symbian's Multimedia Framework, MMF.
In this release the support is experimental. Video playback may have
@@ -429,7 +514,11 @@
In addition, there exists a backend for the Helix framework. However, due
to it not shipping with Qt, its availability depends on the Symbian
- platform in use. If available, it is loaded instead of the MMF plugin.
+ platform in use. If available, it is loaded in preference over the MMF
+ plugin. The Helix plugin requires Symbian signed capabilities. If the
+ application does not have those capabilities, the MMF plugin, if present on
+ the device, will be loaded instead. The capabilities the Helix backend
+ requires are AllFiles, DiskAdmin and MultimediaDD.
*/
diff --git a/doc/src/platforms/qt-embedded-linux.qdoc b/doc/src/platforms/qt-embedded-linux.qdoc
index 21cbf3be5d..a6524d77c6 100644
--- a/doc/src/platforms/qt-embedded-linux.qdoc
+++ b/doc/src/platforms/qt-embedded-linux.qdoc
@@ -96,7 +96,7 @@
\o \l {Qt for Embedded Linux Pointer Handling}{Pointer Handling}
\o \l {Qt for Embedded Linux Character Input}{Character Input}
\o \l {Qt for Embedded Linux Display Management}{Display Management}
- \o \l {Qt for Embedded Linux and OpenGL}{OpenGL}
+ \o \l {Qt for Embedded Linux Hardware Accelerated Graphics}{Hardware Accelerated Graphics}
\o \l {Qt for Embedded Linux Fonts}{Fonts}
\endlist
diff --git a/doc/src/platforms/qt-embedded.qdoc b/doc/src/platforms/qt-embedded.qdoc
index c39a967641..b38c94f5ec 100644
--- a/doc/src/platforms/qt-embedded.qdoc
+++ b/doc/src/platforms/qt-embedded.qdoc
@@ -67,11 +67,10 @@
Applications use the appropriate style for the embedded
environment and use native features, such as menus, to conform
to the native style guidelines.
- \o \l{Symbian platform - Introduction to using Qt}{Qt for the Symbian
-platform} is used to create
- applications running in existing Symbian platform environments.
- Applications use the appropriate style for the embedded
- environment and use native features, such as menus, to conform
+ \o \l{Symbian Platform - Introduction to Qt}{Qt for the Symbian
+ platform} is used to create applications running in existing Symbian
+ platform environments. Applications use the appropriate style for the
+ embedded environment and use native features, such as menus, to conform
to the native style guidelines.
\endtable
*/
diff --git a/doc/src/platforms/s60-introduction.qdoc b/doc/src/platforms/s60-introduction.qdoc
index 5fd0cbe2bd..058198238b 100644
--- a/doc/src/platforms/s60-introduction.qdoc
+++ b/doc/src/platforms/s60-introduction.qdoc
@@ -42,7 +42,7 @@
/*!
\page symbian-with-qt-introduction.html
- \title Symbian platform - Introduction to using Qt
+ \title Symbian Platform - Introduction to Qt
\brief An introduction to Qt for Symbian platform developers.
\ingroup howto
\ingroup qts60
@@ -51,15 +51,15 @@
\section1 Required tools
- See \l{Qt for Symbian platform Requirements} to see what tools are
+ See \l{Qt for Symbian Platform Requirements} to see what tools are
required to use Qt for Symbian platform.
\section1 Installing Qt and running demos
- Follow the instructions found in \l{Installing Qt on the Symbian platform using binary package} to learn how
- to install Qt using binary package and how to build and run Qt demos.
+ Follow the instructions found in \l{Installing Qt on the Symbian platform from a Binary Package}
+ to learn how to install Qt using a binary package and how to build and run Qt demos.
- Follow the instructions found in \l{Installing Qt on the Symbian platform} to learn how to install Qt using
+ Follow the instructions found in \l{Installing Qt on the Symbian Platform} to learn how to install Qt using
using source package and how to build and run the Qt demos.
\section1 Building your own applications
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index 4c3929aaa5..560ddfe061 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -86,7 +86,7 @@
\row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Carbon, Cocoa 32 and 64bit)
\o As provided by Apple
\row \o Embedded Linux QWS (ARM)
- \o gcc (\l{http:\\www.codesourcery.com}{Codesourcery version)}
+ \o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
\row \o Symbian (S60 3.1, 3.2 and 5.0)
@@ -106,10 +106,8 @@
\o Compilers
\row \o Windows XP, Vista
\o gcc 3.4.2 (MinGW)
- \omit
\row \o Windows 7
\o MSVC 2008
- \endomit
\row \o Apple Mac OS X 10.6 "Snow Leopard"
\o As provided by Apple
\row \o Apple Mac OS X 10.4 "Tiger"
@@ -127,7 +125,7 @@
\row \o Linux
\o Intel Compiler
\row \o Embedded Linux QWS (Mips, PowerPC)
- \o gcc (\l{http:\\www.codesourcery.com}{Codesourcery version)}
+ \o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Embedded Linux X11 (ARM)
\o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
\row \o Windows CE 6.0 (ARMv4i, x86, MIPS)
diff --git a/doc/src/platforms/wince-introduction.qdoc b/doc/src/platforms/wince-introduction.qdoc
index 46ecbf666a..886b0840ba 100644
--- a/doc/src/platforms/wince-introduction.qdoc
+++ b/doc/src/platforms/wince-introduction.qdoc
@@ -65,7 +65,7 @@
\endlist
\o
\list
- \o \l {Windows CE OpenGL ES}{OpenGL ES}
+ \o \l {Qt for Windows CE Hardware Accelerated Graphics}{Hardware Accelerated Graphics}
\o \l {Qt Performance Tuning}
\o \l {Fine-Tuning Features in Qt}
\endlist
diff --git a/doc/src/platforms/wince-opengl.qdoc b/doc/src/platforms/wince-opengl.qdoc
index 4fc4d7be64..0ea2ec65e5 100644
--- a/doc/src/platforms/wince-opengl.qdoc
+++ b/doc/src/platforms/wince-opengl.qdoc
@@ -41,58 +41,48 @@
/*!
\page windowsce-opengl.html
- \title Windows CE OpenGL ES
+ \title Qt for Windows CE and OpenGL ES
\ingroup qtce
\brief Information about support for OpenGL ES with Qt for Windows CE.
- \section1 Introduction
+ \input platforms/emb-opengl.qdocinc
- \l {http://www.opengl.org}{OpenGL} is an industry standard API for 2D/3D
- graphics. It provides a powerful, low-level interface between software
- and acceleration hardware, and it is operating system and window system
- independent.
+\section1 Using OpenGL with Qt for Windows CE
+Qt for Windows CE uses EGL 1.1 to embed OpenGL ES windows within the
+Windows CE window manager.
- \l {http://www.khronos.org/opengles}{OpenGL ES} is a subset of the
- \l {http://www.opengl.org}{OpenGL} standard. It is meant for use in
- embedded systems. Hence, it has a smaller, more constrained API.
+\section2 Configure
- Qt for Windows CE uses EGL 1.1 to embed OpenGL ES windows within the
- Windows CE window manager.
+To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
+you can run \c{configure} like this:
- To use OpenGL ES enabled widgets in a Qt for Windows CE application, you
- only need to subclass QGLWidget and draw on instances of the subclass with
- OpenGL ES functions.
-
- OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
- The floating point profile is called OpenGL ES CM (Common) and the
- fixed-point profile is called OpenGL ES CL (Common Lite).
-
- You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
- profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
- ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
- headers and libararies from your SDK. The OpenGL ES lib should be called
- either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib}
- for the Common Lite profile.
+ \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
- To configure Qt for Windows Mobile 5.0 and OpenGL ES Common Lite support
- you can run \c{configure} like this:
+OpenGL ES includes profiles for floating-point and fixed-point arithmetic.
+The floating point profile is called OpenGL ES CM (Common) and the
+fixed-point profile is called OpenGL ES CL (Common Lite).
- \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
+You can run \c{configure} with the \c{-opengl-es-cm} option for the Common
+profile or \c{-opengl-es-cl} for the Common Lite profile. In both cases,
+ensure that the \c{lib} and \c{includes} paths include the OpenGL ES
+headers and libararies from your SDK. The OpenGL ES lib should be called
+either \c{libGLES_CM.lib} for the Common profile or \c{libGLES_CL.lib} for
+the Common Lite profile.
- The distinction between the Common and Common Lite profiles is important,
- because the Common Lite profile has less functionality and only supports a
- fixed-point vertex format.
+The distinction between the Common and Common Lite profiles is important,
+because the Common Lite profile has less functionality and only supports a
+fixed-point vertex format.
- To start programming with Qt and OpenGL ES on Windows CE, you can start
- with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
- and QGLPainter with OpenGL ES. It also provides some hints on how to port
- OpenGL code to OpenGL ES.
+To start programming with Qt and OpenGL ES on Windows CE, you can start
+with the \l{Hello GL ES Example}. This example shows how to use QGLWidget
+and QGLPainter with OpenGL ES. It also provides some hints on how to port
+OpenGL code to OpenGL ES.
- \section2 Using OpenGL to Accelerate Normal 2D Painting
+\section2 Using OpenGL to Accelerate Normal 2D Painting
- Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that translates
- QPainter operations into OpenGL calls. This is especially convenient for
- drawing text or QImage objects in an OpenGL ES context. For further
- details, refer to the \l{Hello GL ES Example}.
+Qt provides QOpenGLPaintEngine, a subclass of QPaintEngine that translates
+QPainter operations into OpenGL calls. This is especially convenient for
+drawing text or QImage objects in an OpenGL ES context. For further
+details, refer to the \l{Hello GL ES Example}.
*/
diff --git a/doc/src/platforms/wince-openvg.qdoc b/doc/src/platforms/wince-openvg.qdoc
new file mode 100644
index 0000000000..047c6553a0
--- /dev/null
+++ b/doc/src/platforms/wince-openvg.qdoc
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page windowsce-openvg.html
+ \title Qt for Windows CE and OpenVG
+ \ingroup qtce
+ \brief Information about support for OpenVG with Qt for Windows CE.
+
+ \input platforms/emb-openvg.qdocinc
+
+\section1 Using OpenVG with Qt for Windows CE
+Qt for Windows CE uses EGL 1.1 to embed OpenVG windows within the Windows
+CE window manager.
+
+\note Make sure that your Windows CE SDK have a working EGL implementation.
+If not, OpenVG will not work.
+
+\note There is currently no support for Blitting and Alpha blending in Qt
+for Windows CE.
+
+\note To configure Qt for Windows Mobile 5.0 and OpenVG support you can run
+\c{configure} like this:
+
+ \snippet doc/src/snippets/code/doc_src_wince-opengl.qdoc 0
+
+*/
diff --git a/doc/src/platforms/wince-signing.qdoc b/doc/src/platforms/wince-signing.qdoc
new file mode 100644
index 0000000000..fa383b34ea
--- /dev/null
+++ b/doc/src/platforms/wince-signing.qdoc
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page windowsce-signing.html
+ \ingroup qtce
+ \title Windows CE - Signing
+ \brief How to sign Qt projects for use with Windows CE.
+
+ \section1 Signing on Windows CE
+
+Windows CE provides a security mechanism to ask the user to confirm
+that they want to use an application/library that is unknown to the
+system. This process gets repeated for each dependency of an
+application, meaning each library the application links to, which is
+not recognized yet.
+
+To simplify this process you can use signatures and certificates. A
+certificate gets installed on the device and each file which is
+signed with the according certificate can be launched without the
+security warning.
+
+If you want to use signatures for your project written in Qt,
+configure provides the \c -signature option. You need to specify the
+location of the .pfx file and qmake adds the signing step to the
+build rules.
+
+If you need to select a separate signature for a specific project,
+or you only want to sign a single project, you can use the
+"SIGNATURE_FILE = foo.pfx" rule inside the project file.
+
+The above described rules apply for command line makefiles as well as
+Visual Studio projects generated by qmake.
+
+Microsoft usually ships development signatures inside the SDK packages.
+You can find them in the Tools subdirectory of the SDK root folder.
+
+Example:
+
+\list
+\o Calling configure with signing enabled:
+\code
+configure.exe -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -signature C:\some\path\SDKSamplePrivDeveloper.pfx
+\endcode
+
+\o Using pro file to specify signature
+\code
+...
+TARGET = foo
+
+wince*: {
+ SIGNATURE_FILE = somepath\customSignature.pfx
+}
+...
+\endcode
+\endlist
+
+*/
diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc
index f427d6e99f..72e7da60b5 100644
--- a/doc/src/platforms/winsystem.qdoc
+++ b/doc/src/platforms/winsystem.qdoc
@@ -43,6 +43,7 @@
\page winsystem.html
\title Window System Specific Notes
\ingroup platform-specific
+ \brief Collections of notes about Qt implementations on different window systems.
Qt is a cross-platform GUI toolkit, so almost the entire API is the
same on all platforms and window systems. If you wish to use
@@ -95,4 +96,15 @@
When compiling for this platform, the macro \c{Q_WS_QWS} is
defined (the window system is literally the Qt Window System). See
the \l{Qt for Embedded Linux} documentation for more information.
+
+ \section1 Qt for Windows CE
+
+ When compiling for this platform, the macro \c{Q_WS_WINCE} is defined.
+ See the \l{Qt for Windows CE} documentation for more information.
+
+ \section1 Qt for Symbian Platform
+
+ When compiling for this platform, the macro \c{Q_WS_S60} is defined.
+ See the \l{Symbian Platform - Introduction to Qt} documentation for
+ more information.
*/
diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc
index 728765604b..41f1350d97 100644
--- a/doc/src/qt-webpages.qdoc
+++ b/doc/src/qt-webpages.qdoc
@@ -50,7 +50,12 @@
*/
/*!
- \externalpage http://qt.nokia.com/bugreport-form
+ \externalpage http://bugreports.qt.nokia.com
+ \title Qt Bug Tracker
+*/
+
+/*!
+ \externalpage http://bugreports.qt.nokia.com
\title Bug Report Form
*/
@@ -165,7 +170,7 @@
*/
/*!
- \externalpage http://qt.nokia.com/products/qtopia/
+ \externalpage http://www.qtextended.org/
\title Qt Extended
*/
@@ -175,7 +180,7 @@
*/
/*!
- \externalpage http://qt.nokia.com/developer/task-tracker
+ \externalpage http://bugreports.qt.nokia.com
\title Task Tracker
*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index cecff0eee1..2a1f8ff698 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -491,6 +491,8 @@
rich end-user applications for devices running S60 3.1 and
later.
+ See the \l{Symbian Platform - Introduction to Qt} for more information.
+
\section1 Animation Framework
The animation framework helps build highly animated,
@@ -581,11 +583,7 @@
DOM, helps reuse CSS selector knowledge, and gives little
maintenance or footprint overhead.
- \code
- QWebElement document = frame->documentElement();
- QList<QWebElement> allSpans = document.findAll("span");
- QList<QWebElement> introSpans = document.findAll("p.intro span");
- \endcode
+ \snippet webkitsnippets/webelement/main.cpp FindAll
See the QWebElement class documentation for more information.
@@ -608,19 +606,19 @@
\section1 Graphics Effects
Effects can be used to alter the appearance of UI elements such as
- \l{QGraphicsItem}s and \l{QWidget}s. A range of standard effects such
- as blurring, colorizing or blooming is provided, and it is possible to
- implement custom effects.
+ \l{QGraphicsItem}s and \l{QWidget}s. A couple of standard effects such
+ as blurring, colorizing and drop shadow are provided, and it is
+ possible to implement custom effects.
\table
\row
- \o
- \o \img graphicseffect-plain.png
- \o
+ \o{2,1} \img graphicseffect-plain.png
\row
\o \img graphicseffect-blur.png
\o \img graphicseffect-colorize.png
- \o \img graphicseffect-bloom.png
+ \row
+ \o \img graphicseffect-opacity.png
+ \o \img graphicseffect-drop-shadow.png
\endtable
See the QGraphicsEffect class documentation for more information.
@@ -664,7 +662,7 @@
See the \l{QtMultimedia Module} documentation for more information.
- \section1 New Classes, Functions, Macros, etc
+ \section1 New Classes, Functions, Macros, etc.
Links to new classes, functions, macros, and other items
introduced in Qt 4.6.
@@ -834,7 +832,7 @@
these settings when you edit forms.
More information about these improvements can be found in the
- \l{What's New in Qt Designer 4.6} overview.
+ \l{What's New in Qt Designer 4.5} overview.
\section1 Qt Linguist Improvements
diff --git a/doc/src/snippets/code/doc_src_i18n.qdoc b/doc/src/snippets/code/doc_src_i18n.qdoc
index eca28685bb..80faabc83e 100644
--- a/doc/src/snippets/code/doc_src_i18n.qdoc
+++ b/doc/src/snippets/code/doc_src_i18n.qdoc
@@ -184,7 +184,7 @@ void Clock::setTime(const QTime &time)
//! [12]
-void QWidget::changeEvent(QEvent *event)
+void MyWidget::changeEvent(QEvent *event)
{
if (e->type() == QEvent::LanguageChange) {
titleLabel->setText(tr("Document Title"));
diff --git a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
index 4c643746f6..88d80252c1 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qobject.cpp
@@ -235,9 +235,8 @@ MyWindow::MyWindow()
{
QLabel *senderLabel = new QLabel(tr("Name:"));
QLabel *recipientLabel = new QLabel(tr("Name:", "recipient"));
- ...
-}
//! [17]
+}
//! [18]
diff --git a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
index e87408a55f..52fbd1a8f8 100644
--- a/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
+++ b/doc/src/snippets/code/src_corelib_tools_qbytearray.cpp
@@ -234,7 +234,7 @@ ba.indexOf("X"); // returns -1
//! [23]
QByteArray x("crazy azimuths");
-QByteArray y("azy");
+QByteArray y("az");
x.lastIndexOf(y); // returns 6
x.lastIndexOf(y, 6); // returns 6
x.lastIndexOf(y, 5); // returns 2
diff --git a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
index 35689f4d29..5ef6609cfb 100644
--- a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
+++ b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp
@@ -40,11 +40,11 @@
****************************************************************************/
//! [0]
-MyGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
+MyGraphicsOpacityEffect::draw(QPainter *painter)
{
// Fully opaque; draw directly without going through a pixmap.
if (qFuzzyCompare(m_opacity, 1)) {
- source->draw(painter);
+ drawSource(painter);
return;
}
...
@@ -52,18 +52,18 @@ MyGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
//! [0]
//! [1]
-MyGraphicsEffect::draw(QPainter *painter, QGraphicsEffectSource *source)
+MyGraphicsEffect::draw(QPainter *painter)
{
...
QPoint offset;
- if (source->isPixmap()) {
+ if (sourceIsPixmap()) {
// No point in drawing in device coordinates (pixmap will be scaled anyways).
- const QPixmap pixmap = source->pixmap(Qt::LogicalCoordinates, &offset);
+ const QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates, &offset);
...
painter->drawPixmap(offset, pixmap);
} else {
// Draw pixmap in device coordinates to avoid pixmap scaling;
- const QPixmap pixmap = source->pixmap(Qt::DeviceCoordinates, &offset);
+ const QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset);
painter->setWorldTransform(QTransform());
...
painter->drawPixmap(offset, pixmap);
diff --git a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
index fb1f36340f..ea42e7004f 100644
--- a/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qregion_unix.cpp
@@ -41,19 +41,15 @@
//! [0]
QRegion r1(10, 10, 20, 20);
-r1.isNull(); // false
r1.isEmpty(); // false
-QRegion r2(40, 40, 20, 20);
QRegion r3;
-r3.isNull(); // true
r3.isEmpty(); // true
+QRegion r2(40, 40, 20, 20);
r3 = r1.intersected(r2); // r3: intersection of r1 and r2
-r3.isNull(); // false
r3.isEmpty(); // true
r3 = r1.united(r2); // r3: union of r1 and r2
-r3.isNull(); // false
r3.isEmpty(); // false
//! [0]
diff --git a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
index 29972974b0..9a15f199b9 100644
--- a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
+++ b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
@@ -40,32 +40,32 @@
****************************************************************************/
//! [0]
-QGLShader shader(QGLShader::VertexShader);
-shader.compile(code);
+QGLShader shader(QGLShader::Vertex);
+shader.compileSourceCode(code);
QGLShaderProgram program(context);
program.addShader(shader);
program.link();
-program.enable();
+program.bind();
//! [0]
//! [1]
-program.addShader(QGLShader::VertexShader,
+program.addShaderFromSourceCode(QGLShader::Vertex,
"attribute highp vec4 vertex;\n"
"attribute mediump mat4 matrix;\n"
"void main(void)\n"
"{\n"
" gl_Position = matrix * vertex;\n"
"}");
-program.addShader(QGLShader::FragmentShader,
+program.addShaderFromSourceCode(QGLShader::Fragment,
"uniform mediump vec4 color;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = color;\n"
"}");
program.link();
-program.enable();
+program.bind();
int vertexLocation = program.attributeLocation("vertex");
int matrixLocation = program.attributeLocation("matrix");
@@ -84,9 +84,12 @@ QColor color(0, 255, 0, 255);
QMatrix4x4 pmvMatrix;
pmvMatrix.ortho(rect());
+program.enableAttributeArray(vertexLocation);
program.setAttributeArray(vertexLocation, triangleVertices, 3);
program.setUniformValue(matrixLocation, pmvMatrix);
program.setUniformValue(colorLocation, color);
glDrawArrays(GL_TRIANGLES, 0, 3);
+
+program.disableAttributeArray(vertexLocation);
//! [2]
diff --git a/doc/src/snippets/gestures/imageviewer/imagewidget.cpp b/doc/src/snippets/gestures/imageviewer/imagewidget.cpp
deleted file mode 100644
index 409db2e5d8..0000000000
--- a/doc/src/snippets/gestures/imageviewer/imagewidget.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-
-#include "imagewidget.h"
-
-#include <QtGui>
-
-ImageWidget::ImageWidget(QWidget *parent)
- : QWidget(parent)
-{
- setAttribute(Qt::WA_AcceptTouchEvents);
- setAttribute(Qt::WA_PaintOnScreen);
- setAttribute(Qt::WA_OpaquePaintEvent);
- setAttribute(Qt::WA_NoSystemBackground);
-
- setObjectName("ImageWidget");
-
- setMinimumSize(QSize(100,100));
-
- position = 0;
- zoomed = rotated = false;
-
- zoomedIn = false;
- horizontalOffset = 0;
- verticalOffset = 0;
-
-//! [imagewidget-connect]
- panGesture = new QPanGesture(this);
- connect(panGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered()));
-
- tapAndHoldGesture = new TapAndHoldGesture(this);
- connect(tapAndHoldGesture, SIGNAL(triggered()), this, SLOT(gestureTriggered()));
- connect(tapAndHoldGesture, SIGNAL(finished()), this, SLOT(gestureFinished()));
-//! [imagewidget-connect]
-}
-
-void ImageWidget::paintEvent(QPaintEvent*)
-{
- QPainter p(this);
- if (currentImage.isNull()) {
- p.fillRect(geometry(), Qt::white);
- return;
- }
- int hoffset = 0;
- int voffset = 0;
- const int w = pixmap.width();
- const int h = pixmap.height();
- p.save();
- if (zoomedIn) {
- hoffset = horizontalOffset;
- voffset = verticalOffset;
- if (horizontalOffset > 0)
- p.fillRect(0, 0, horizontalOffset, height(), Qt::white);
- if (verticalOffset > 0)
- p.fillRect(0, 0, width(), verticalOffset, Qt::white);
- }
- p.drawPixmap(hoffset, voffset, pixmap);
- if (hoffset + w < width())
- p.fillRect(hoffset + w, 0, width() - w - hoffset, height(), Qt::white);
- if (voffset + h < height())
- p.fillRect(0, voffset + h, width(), height() - h - voffset, Qt::white);
-
- // paint touch feedback
- if (touchFeedback.tapped || touchFeedback.doubleTapped) {
- p.setPen(QPen(Qt::gray, 2));
- p.drawEllipse(touchFeedback.position, 5, 5);
- if (touchFeedback.doubleTapped) {
- p.setPen(QPen(Qt::darkGray, 2, Qt::DotLine));
- p.drawEllipse(touchFeedback.position, 15, 15);
- } else if (touchFeedback.tapAndHoldState != 0) {
- QPoint pts[8] = {
- touchFeedback.position + QPoint( 0, -15),
- touchFeedback.position + QPoint( 10, -10),
- touchFeedback.position + QPoint( 15, 0),
- touchFeedback.position + QPoint( 10, 10),
- touchFeedback.position + QPoint( 0, 15),
- touchFeedback.position + QPoint(-10, 10),
- touchFeedback.position + QPoint(-15, 0)
- };
- for (int i = 0; i < touchFeedback.tapAndHoldState/5; ++i)
- p.drawEllipse(pts[i], 3, 3);
- }
- } else if (touchFeedback.sliding) {
- p.setPen(QPen(Qt::red, 3));
- QPoint endPos = QPoint(touchFeedback.position.x(), touchFeedback.slidingStartPosition.y());
- p.drawLine(touchFeedback.slidingStartPosition, endPos);
- int dx = 10;
- if (touchFeedback.slidingStartPosition.x() < endPos.x())
- dx = -1*dx;
- p.drawLine(endPos, endPos + QPoint(dx, 5));
- p.drawLine(endPos, endPos + QPoint(dx, -5));
- }
-
- for (int i = 0; i < TouchFeedback::MaximumNumberOfTouches; ++i) {
- if (touchFeedback.touches[i].isNull())
- break;
- p.drawEllipse(touchFeedback.touches[i], 10, 10);
- }
- p.restore();
-}
-
-void ImageWidget::mousePressEvent(QMouseEvent *event)
-{
- touchFeedback.tapped = true;
- touchFeedback.position = event->pos();
-}
-
-void ImageWidget::mouseDoubleClickEvent(QMouseEvent *event)
-{
- touchFeedback.doubleTapped = true;
- const QPoint p = event->pos();
- touchFeedback.position = p;
- horizontalOffset = p.x() - currentImage.width()*1.0*p.x()/width();
- verticalOffset = p.y() - currentImage.height()*1.0*p.y()/height();
- setZoomedIn(!zoomedIn);
- zoomed = rotated = false;
- updateImage();
-
- feedbackFadeOutTimer.start(500, this);
-}
-
-//! [imagewidget-triggered-1]
-void ImageWidget::gestureTriggered()
-{
- if (sender() == panGesture) {
-//! [imagewidget-triggered-1]
- touchFeedback.tapped = false;
- touchFeedback.doubleTapped = false;
- QPanGesture *pg = qobject_cast<QPanGesture*>(sender());
- if (zoomedIn) {
-#ifndef QT_NO_CURSOR
- switch (pg->state()) {
- case Qt::GestureStarted:
- case Qt::GestureUpdated:
- setCursor(Qt::SizeAllCursor);
- break;
- default:
- setCursor(Qt::ArrowCursor);
- }
-#endif
- horizontalOffset += pg->lastOffset().width();
- verticalOffset += pg->lastOffset().height();
- } else {
- // only slide gesture should be accepted
- if (pg->state() == Qt::GestureFinished) {
- touchFeedback.sliding = false;
- zoomed = rotated = false;
- if (pg->totalOffset().width() > 0)
- goNextImage();
- else
- goPrevImage();
- updateImage();
- }
- }
- update();
- feedbackFadeOutTimer.start(500, this);
- } else if (sender() == tapAndHoldGesture) {
- if (tapAndHoldGesture->state() == Qt::GestureFinished) {
- qDebug() << "tap and hold detected";
- touchFeedback.reset();
- update();
-
- QMenu menu;
- menu.addAction("Action 1");
- menu.addAction("Action 2");
- menu.addAction("Action 3");
- menu.exec(mapToGlobal(tapAndHoldGesture->pos()));
- } else {
- ++touchFeedback.tapAndHoldState;
- update();
- }
- feedbackFadeOutTimer.start(500, this);
- }
-}
-
-void ImageWidget::gestureFinished()
-{
- qDebug() << "gesture finished" << sender();
-}
-
-void ImageWidget::gestureCancelled()
-{
- qDebug() << "gesture cancelled" << sender();
-}
-
-void ImageWidget::resizeEvent(QResizeEvent*)
-{
- updateImage();
-}
-
-void ImageWidget::updateImage()
-{
- // should use qtconcurrent here?
- transformation = QTransform();
- if (zoomedIn) {
- } else {
- if (currentImage.isNull())
- return;
- if (zoomed) {
- transformation = transformation.scale(zoom, zoom);
- } else {
- double xscale = (double)width()/currentImage.width();
- double yscale = (double)height()/currentImage.height();
- if (xscale < yscale)
- yscale = xscale;
- else
- xscale = yscale;
- transformation = transformation.scale(xscale, yscale);
- }
- if (rotated)
- transformation = transformation.rotate(angle);
- }
- pixmap = QPixmap::fromImage(currentImage).transformed(transformation);
- update();
-}
-
-void ImageWidget::openDirectory(const QString &path)
-{
- this->path = path;
- QDir dir(path);
- QStringList nameFilters;
- nameFilters << "*.jpg" << "*.png";
- files = dir.entryList(nameFilters, QDir::Files|QDir::Readable, QDir::Name);
-
- position = 0;
- goToImage(0);
- updateImage();
-}
-
-QImage ImageWidget::loadImage(const QString &fileName)
-{
- QImageReader reader(fileName);
- if (!reader.canRead()) {
- qDebug() << fileName << ": can't load image";
- return QImage();
- }
- QImage image;
- if (!reader.read(&image)) {
- qDebug() << fileName << ": corrupted image";
- return QImage();
- }
- return image;
-}
-
-void ImageWidget::setZoomedIn(bool zoomed)
-{
- zoomedIn = zoomed;
-}
-
-void ImageWidget::goNextImage()
-{
- if (files.isEmpty())
- return;
- if (position < files.size()-1) {
- ++position;
- prevImage = currentImage;
- currentImage = nextImage;
- if (position+1 < files.size())
- nextImage = loadImage(path+QLatin1String("/")+files.at(position+1));
- else
- nextImage = QImage();
- }
- setZoomedIn(false);
- updateImage();
-}
-
-void ImageWidget::goPrevImage()
-{
- if (files.isEmpty())
- return;
- if (position > 0) {
- --position;
- nextImage = currentImage;
- currentImage = prevImage;
- if (position > 0)
- prevImage = loadImage(path+QLatin1String("/")+files.at(position-1));
- else
- prevImage = QImage();
- }
- setZoomedIn(false);
- updateImage();
-}
-
-void ImageWidget::goToImage(int index)
-{
- if (files.isEmpty())
- return;
- if (index < 0 || index >= files.size()) {
- qDebug() << "goToImage: invalid index: " << index;
- return;
- }
- if (index == position+1) {
- goNextImage();
- return;
- }
- if (position > 0 && index == position-1) {
- goPrevImage();
- return;
- }
- position = index;
- pixmap = QPixmap();
- if (index > 0)
- prevImage = loadImage(path+QLatin1String("/")+files.at(position-1));
- else
- prevImage = QImage();
- currentImage = loadImage(path+QLatin1String("/")+files.at(position));
- if (position+1 < files.size())
- nextImage = loadImage(path+QLatin1String("/")+files.at(position+1));
- else
- nextImage = QImage();
- setZoomedIn(false);
- updateImage();
-}
-
-void ImageWidget::timerEvent(QTimerEvent *event)
-{
- if (event->timerId() == touchFeedback.tapTimer.timerId()) {
- touchFeedback.tapTimer.stop();
- } else if (event->timerId() == feedbackFadeOutTimer.timerId()) {
- feedbackFadeOutTimer.stop();
- touchFeedback.reset();
- }
- update();
-}
-
-#include "moc_imagewidget.cpp"
diff --git a/doc/src/snippets/gestures/imageviewer/imagewidget.h b/doc/src/snippets/gestures/imageviewer/imagewidget.h
deleted file mode 100644
index 555309370a..0000000000
--- a/doc/src/snippets/gestures/imageviewer/imagewidget.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-
-#ifndef IMAGEWIDGET_H
-#define IMAGEWIDGET_H
-
-#include <QWidget>
-#include <QImage>
-#include <QPixmap>
-
-#include <QtGui>
-
-#include "tapandholdgesture.h"
-
-class ImageWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- ImageWidget(QWidget *parent = 0);
-
- void openDirectory(const QString &path);
-
-protected:
- void paintEvent(QPaintEvent*);
- void resizeEvent(QResizeEvent*);
- void timerEvent(QTimerEvent*);
- void mousePressEvent(QMouseEvent*);
- void mouseDoubleClickEvent(QMouseEvent*);
-
-//! [imagewidget-slots]
-private slots:
- void gestureTriggered();
- void gestureFinished();
- void gestureCancelled();
-//! [imagewidget-slots]
-
-private:
- void updateImage();
- QImage loadImage(const QString &fileName);
- void loadImage();
- void setZoomedIn(bool zoomed);
- void goNextImage();
- void goPrevImage();
- void goToImage(int index);
-
- QPanGesture *panGesture;
- TapAndHoldGesture *tapAndHoldGesture;
-
- QString path;
- QStringList files;
- int position;
-
- QImage prevImage, nextImage;
- QImage currentImage;
- QPixmap pixmap;
- QTransform transformation;
-
- bool zoomedIn;
- int horizontalOffset;
- int verticalOffset;
-
- bool zoomed;
- qreal zoom;
- bool rotated;
- qreal angle;
-
- struct TouchFeedback
- {
- bool tapped;
- QPoint position;
- bool sliding;
- QPoint slidingStartPosition;
- QBasicTimer tapTimer;
- int tapState;
- bool doubleTapped;
- int tapAndHoldState;
-
- enum { MaximumNumberOfTouches = 5 };
- QPoint touches[MaximumNumberOfTouches];
-
- inline TouchFeedback() { reset(); }
- inline void reset()
- {
- tapped = false;
- sliding = false;
- tapTimer.stop();
- tapState = 0;
- doubleTapped = false;
- tapAndHoldState = 0;
- for (int i = 0; i < MaximumNumberOfTouches; ++i) {
- touches[i] = QPoint();
- }
- }
- } touchFeedback;
- QBasicTimer feedbackFadeOutTimer;
-};
-
-#endif
diff --git a/doc/src/snippets/gestures/imageviewer/tapandholdgesture.cpp b/doc/src/snippets/gestures/imageviewer/tapandholdgesture.cpp
deleted file mode 100644
index 7dd2359587..0000000000
--- a/doc/src/snippets/gestures/imageviewer/tapandholdgesture.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-
-#include "tapandholdgesture.h"
-
-#include <QtGui/qevent.h>
-
-// #define TAPANDHOLD_USING_MOUSE
-
-/*!
- \class TapAndHoldGesture
- \since 4.6
-
- \brief The TapAndHoldGesture class represents a Tap-and-Hold gesture,
- providing additional information.
-*/
-
-const int TapAndHoldGesture::iterationCount = 40;
-const int TapAndHoldGesture::iterationTimeout = 50;
-
-/*!
- Creates a new Tap and Hold gesture handler object and marks it as a child
- of \a parent.
-
- On some platforms like Windows there is a system-wide tap and hold gesture
- that cannot be overriden, hence the gesture might never trigger and default
- context menu will be shown instead.
-*/
-TapAndHoldGesture::TapAndHoldGesture(QWidget *parent)
- : QGesture(parent), iteration(0)
-{
-}
-
-/*! \internal */
-bool TapAndHoldGesture::filterEvent(QEvent *event)
-{
- if (!event->spontaneous())
- return false;
- const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
- switch (event->type()) {
- case QEvent::TouchBegin: {
- if (timer.isActive())
- timer.stop();
- timer.start(TapAndHoldGesture::iterationTimeout, this);
- const QPoint p = ev->touchPoints().at(0).pos().toPoint();
- position = p;
- break;
- }
- case QEvent::TouchUpdate:
- if (ev->touchPoints().size() == 1) {
- const QPoint startPos = ev->touchPoints().at(0).startPos().toPoint();
- const QPoint pos = ev->touchPoints().at(0).pos().toPoint();
- if ((startPos - pos).manhattanLength() > 15)
- reset();
- } else {
- reset();
- }
- break;
- case QEvent::TouchEnd:
- reset();
- break;
-#ifdef TAPANDHOLD_USING_MOUSE
- case QEvent::MouseButtonPress: {
- if (timer.isActive())
- timer.stop();
- timer.start(TapAndHoldGesture::iterationTimeout, this);
- const QPoint p = static_cast<QMouseEvent*>(event)->pos();
- position = startPosition = p;
- break;
- }
- case QEvent::MouseMove: {
- const QPoint startPos = startPosition;
- const QPoint pos = static_cast<QMouseEvent*>(event)->pos();
- if ((startPos - pos).manhattanLength() > 15)
- reset();
- break;
- }
- case QEvent::MouseButtonRelease:
- reset();
- break;
-#endif // TAPANDHOLD_USING_MOUSE
- default:
- break;
- }
- return false;
-}
-
-/*! \internal */
-void TapAndHoldGesture::timerEvent(QTimerEvent *event)
-{
- if (event->timerId() != timer.timerId())
- return;
- if (iteration == TapAndHoldGesture::iterationCount) {
- timer.stop();
- updateState(Qt::GestureFinished);
- } else {
- updateState(Qt::GestureUpdated);
- }
- ++iteration;
-}
-
-/*! \internal */
-//! [tapandhold-reset]
-void TapAndHoldGesture::reset()
-{
- timer.stop();
- iteration = 0;
- position = startPosition = QPoint();
- updateState(Qt::NoGesture);
-}
-//! [tapandhold-reset]
-
-/*!
- \property TapAndHoldGesture::pos
-
- \brief The position of the gesture.
-*/
-QPoint TapAndHoldGesture::pos() const
-{
- return position;
-}
diff --git a/doc/src/snippets/gestures/qgesture.cpp b/doc/src/snippets/gestures/qgesture.cpp
deleted file mode 100644
index 77f5cc2b56..0000000000
--- a/doc/src/snippets/gestures/qgesture.cpp
+++ /dev/null
@@ -1,283 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qgesture.h"
-#include <private/qgesture_p.h>
-#include "qgraphicsitem.h"
-
-QT_BEGIN_NAMESPACE
-
-
-class QEventFilterProxyGraphicsItem : public QGraphicsItem
-{
-public:
- QEventFilterProxyGraphicsItem(QGesture *g)
- : gesture(g)
- {
- }
- bool sceneEventFilter(QGraphicsItem *, QEvent *event)
- {
- return gesture ? gesture->filterEvent(event) : false;
- }
- QRectF boundingRect() const { return QRectF(); }
- void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) { }
-
-private:
- QGesture *gesture;
-};
-
-/*
- \class QGesture
- \since 4.6
-
- \brief The QGesture class is the base class for implementing custom
- gestures.
-
- This class represents both an object that recognizes a gesture out of a set
- of input events (a gesture recognizer), and a gesture object itself that
- can be used to get extended information about the triggered gesture.
-
- The class has a list of properties that can be queried by the user to get
- some gesture-specific parameters (for example, an offset of a Pan gesture).
-
- Usually gesture recognizer implements a state machine, storing its state
- internally in the recognizer object. The recognizer receives input events
- through the \l{QGesture::}{filterEvent()} virtual function and decides
- whether the event should change the state of the recognizer by emitting an
- appropriate signal.
-
- Input events should be either fed to the recognizer one by one with a
- filterEvent() function, or the gesture recognizer should be attached to an
- object it filters events for by specifying it as a parent object. The
- QGesture object installs itself as an event filter to the parent object
- automatically, the unsetObject() function should be used to remove an event
- filter from the parent object. To make a
- gesture that operates on a QGraphicsItem, both the appropriate QGraphicsView
- should be passed as a parent object and setGraphicsItem() functions should
- be used to attach a gesture to a graphics item.
-
- This is a base class, to create a custom gesture type, you should subclass
- it and implement its pure virtual functions.
-
- \sa QPanGesture
-*/
-
-/* \fn bool QGesture::filterEvent(QEvent *event)
-
- Parses input \a event and emits a signal when detects a gesture.
-
- In your reimplementation of this function, if you want to filter the \a
- event out, i.e. stop it being handled further, return true; otherwise
- return false;
-
- This is a pure virtual function that needs to be implemented in subclasses.
-*/
-
-/* \fn void QGesture::started()
-
- The signal is emitted when the gesture is started. Extended information
- about the gesture is contained in the signal sender object.
-
- In addition to started(), a triggered() signal should also be emitted.
-*/
-
-/* \fn void QGesture::triggered()
-
- The signal is emitted when the gesture is detected. Extended information
- about the gesture is contained in the signal sender object.
-*/
-
-/* \fn void QGesture::finished()
-
- The signal is emitted when the gesture is finished. Extended information
- about the gesture is contained in the signal sender object.
-*/
-
-/* \fn void QGesture::cancelled()
-
- The signal is emitted when the gesture is cancelled, for example the reset()
- function is called while the gesture was in the process of emitting a
- triggered() signal. Extended information about the gesture is contained in
- the sender object.
-*/
-
-
-/*
- Creates a new gesture handler object and marks it as a child of \a parent.
-
- The \a parent object is also the default event source for the gesture,
- meaning that the gesture installs itself as an event filter for the \a
- parent.
-
- \sa setGraphicsItem()
-*/
-QGesture::QGesture(QObject *parent)
- : QObject(*new QGesturePrivate, parent)
-{
- if (parent)
- parent->installEventFilter(this);
-}
-
-/* \internal
- */
-QGesture::QGesture(QGesturePrivate &dd, QObject *parent)
- : QObject(dd, parent)
-{
- if (parent)
- parent->installEventFilter(this);
-}
-
-/*
- Destroys the gesture object.
-*/
-QGesture::~QGesture()
-{
-}
-
-/* \internal
- */
-bool QGesture::eventFilter(QObject *receiver, QEvent *event)
-{
- Q_D(QGesture);
- if (d->graphicsItem && receiver == parent())
- return false;
- return filterEvent(event);
-}
-
-/*
- \property QGesture::state
-
- \brief The current state of the gesture.
-*/
-
-/*
- Returns the gesture recognition state.
- */
-Qt::GestureState QGesture::state() const
-{
- return d_func()->state;
-}
-
-/*
- Sets this gesture's recognition state to \a state and emits appropriate
- signals.
-
- This functions emits the signals according to the old state and the new
- \a state, and it should be called after all the internal properties have been
- initialized.
-
- \sa started(), triggered(), finished(), cancelled()
- */
-void QGesture::updateState(Qt::GestureState state)
-{
- Q_D(QGesture);
- if (d->state == state) {
- if (state == Qt::GestureUpdated)
- emit triggered();
- return;
- }
- const Qt::GestureState oldState = d->state;
- d->state = state;
- if (state != Qt::NoGesture && oldState > state) {
- // comparing the state as ints: state should only be changed from
- // started to (optionally) updated and to finished.
- qWarning("QGesture::updateState: incorrect new state");
- return;
- }
- if (oldState == Qt::NoGesture)
- emit started();
- if (state == Qt::GestureUpdated)
- emit triggered();
- else if (state == Qt::GestureFinished)
- emit finished();
- else if (state == Qt::NoGesture)
- emit cancelled();
-
- if (state == Qt::GestureFinished) {
- // gesture is finished, so we reset the internal state.
- d->state = Qt::NoGesture;
- }
-}
-
-/*
- Sets the \a graphicsItem the gesture is filtering events for.
-
- The gesture will install an event filter to the \a graphicsItem and
- redirect them to the filterEvent() function.
-
- \sa graphicsItem()
-*/
-void QGesture::setGraphicsItem(QGraphicsItem *graphicsItem)
-{
- Q_D(QGesture);
- if (d->graphicsItem && d->eventFilterProxyGraphicsItem)
- d->graphicsItem->removeSceneEventFilter(d->eventFilterProxyGraphicsItem);
- d->graphicsItem = graphicsItem;
- if (!d->eventFilterProxyGraphicsItem)
- d->eventFilterProxyGraphicsItem = new QEventFilterProxyGraphicsItem(this);
- if (graphicsItem)
- graphicsItem->installSceneEventFilter(d->eventFilterProxyGraphicsItem);
-}
-
-/*
- Returns the graphics item the gesture is filtering events for.
-
- \sa setGraphicsItem()
-*/
-QGraphicsItem* QGesture::graphicsItem() const
-{
- return d_func()->graphicsItem;
-}
-
-/* \fn void QGesture::reset()
-
- Resets the internal state of the gesture. This function might be called by
- the filterEvent() implementation in a derived class, or by the user to
- cancel a gesture. The base class implementation calls
- updateState(Qt::NoGesture) which emits the cancelled()
- signal if the state() of the gesture indicated it was active.
-*/
-void QGesture::reset()
-{
- updateState(Qt::NoGesture);
-}
-
-QT_END_NAMESPACE
diff --git a/doc/src/snippets/gestures/qstandardgestures.cpp b/doc/src/snippets/gestures/qstandardgestures.cpp
deleted file mode 100644
index b22f6ae87a..0000000000
--- a/doc/src/snippets/gestures/qstandardgestures.cpp
+++ /dev/null
@@ -1,483 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qstandardgestures.h"
-#include "qstandardgestures_p.h"
-
-#include <qabstractscrollarea.h>
-#include <qscrollbar.h>
-#include <private/qapplication_p.h>
-#include <private/qevent_p.h>
-#include <private/qwidget_p.h>
-
-QT_BEGIN_NAMESPACE
-
-#ifdef Q_WS_WIN
-QWidgetPrivate *qt_widget_private(QWidget *widget);
-#endif
-
-/*!
- \class QPanGesture
- \since 4.6
-
- \brief The QPanGesture class represents a Pan gesture,
- providing additional information related to panning.
-*/
-
-/*!
- Creates a new Pan gesture handler object and marks it as a child of \a
- parent.
-
- On some platform like Windows it's necessary to provide a non-null widget
- as \a parent to get native gesture support.
-*/
-QPanGesture::QPanGesture(QWidget *parent)
- : QGesture(*new QPanGesturePrivate, parent)
-{
- if (parent) {
- QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
- qAppPriv->widgetGestures[parent].pan = this;
-#ifdef Q_WS_WIN
- qt_widget_private(parent)->winSetupGestures();
-#endif
- }
-}
-
-/*! \internal */
-bool QPanGesture::event(QEvent *event)
-{
- switch (event->type()) {
- case QEvent::ParentAboutToChange:
- if (QWidget *w = qobject_cast<QWidget*>(parent())) {
- QApplicationPrivate::instance()->widgetGestures[w].pan = 0;
-#ifdef Q_WS_WIN
- qt_widget_private(w)->winSetupGestures();
-#endif
- }
- break;
- case QEvent::ParentChange:
- if (QWidget *w = qobject_cast<QWidget*>(parent())) {
- QApplicationPrivate::instance()->widgetGestures[w].pan = this;
-#ifdef Q_WS_WIN
- qt_widget_private(w)->winSetupGestures();
-#endif
- }
- break;
- default:
- break;
- }
-
-#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)
- Q_D(QPanGesture);
- if (event->type() == QEvent::Timer) {
- const QTimerEvent *te = static_cast<QTimerEvent *>(event);
- if (te->timerId() == d->panFinishedTimer) {
- killTimer(d->panFinishedTimer);
- d->panFinishedTimer = 0;
- d->lastOffset = QSize(0, 0);
- updateState(Qt::GestureFinished);
- }
- }
-#endif
-
- return QObject::event(event);
-}
-
-bool QPanGesture::eventFilter(QObject *receiver, QEvent *event)
-{
-#ifdef Q_WS_WIN
- Q_D(QPanGesture);
- if (receiver->isWidgetType() && event->type() == QEvent::NativeGesture) {
- QNativeGestureEvent *ev = static_cast<QNativeGestureEvent*>(event);
- QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
- QApplicationPrivate::WidgetStandardGesturesMap::iterator it;
- it = qAppPriv->widgetGestures.find(static_cast<QWidget*>(receiver));
- if (it == qAppPriv->widgetGestures.end())
- return false;
- if (this != it.value().pan)
- return false;
- Qt::GestureState nextState = Qt::NoGesture;
- switch(ev->gestureType) {
- case QNativeGestureEvent::GestureBegin:
- // next we might receive the first gesture update event, so we
- // prepare for it.
- d->state = Qt::NoGesture;
- return false;
- case QNativeGestureEvent::Pan:
- nextState = Qt::GestureUpdated;
- event->accept();
- break;
- case QNativeGestureEvent::GestureEnd:
- if (state() == Qt::NoGesture)
- return false; // some other gesture has ended
- nextState = Qt::GestureFinished;
- break;
- default:
- return false;
- }
- if (state() == Qt::NoGesture) {
- d->lastOffset = d->totalOffset = QSize();
- } else {
- d->lastOffset = QSize(ev->position.x() - d->lastPosition.x(),
- ev->position.y() - d->lastPosition.y());
- d->totalOffset += d->lastOffset;
- }
- d->lastPosition = ev->position;
- updateState(nextState);
- return true;
- }
-#endif
- return QGesture::eventFilter(receiver, event);
-}
-
-/*! \internal */
-bool QPanGesture::filterEvent(QEvent *event)
-{
- Q_D(QPanGesture);
- if (!event->spontaneous())
- return false;
- const QTouchEvent *ev = static_cast<const QTouchEvent*>(event);
- if (event->type() == QEvent::TouchBegin) {
- QTouchEvent::TouchPoint p = ev->touchPoints().at(0);
- d->lastPosition = p.pos().toPoint();
- d->lastOffset = d->totalOffset = QSize();
- } else if (event->type() == QEvent::TouchEnd) {
- if (state() != Qt::NoGesture) {
- if (!ev->touchPoints().isEmpty()) {
- QTouchEvent::TouchPoint p = ev->touchPoints().at(0);
- const QPoint pos = p.pos().toPoint();
- const QPoint lastPos = p.lastPos().toPoint();
- const QPoint startPos = p.startPos().toPoint();
- d->lastOffset = QSize(pos.x() - lastPos.x(), pos.y() - lastPos.y());
- d->totalOffset = QSize(pos.x() - startPos.x(), pos.y() - startPos.y());
- }
- updateState(Qt::GestureFinished);
- }
- reset();
- } else if (event->type() == QEvent::TouchUpdate) {
- QTouchEvent::TouchPoint p = ev->touchPoints().at(0);
- const QPoint pos = p.pos().toPoint();
- const QPoint lastPos = p.lastPos().toPoint();
- const QPoint startPos = p.startPos().toPoint();
- d->lastOffset = QSize(pos.x() - lastPos.x(), pos.y() - lastPos.y());
- d->totalOffset = QSize(pos.x() - startPos.x(), pos.y() - startPos.y());
- if (d->totalOffset.width() > 10 || d->totalOffset.height() > 10 ||
- d->totalOffset.width() < -10 || d->totalOffset.height() < -10) {
- updateState(Qt::GestureUpdated);
- }
- }
-#ifdef Q_OS_MAC
- else if (event->type() == QEvent::Wheel) {
- // On Mac, there is really no native panning gesture. Instead, a two
- // finger pan is delivered as mouse wheel events. Otoh, on Windows, you
- // either get mouse wheel events or pan events. We have decided to make this
- // the Qt behaviour as well, meaning that on Mac, wheel
- // events will be masked away when listening for pan events.
-#ifndef QT_MAC_USE_COCOA
- // In Carbon we receive neither touch-, nor pan gesture events.
- // So we create pan gestures by converting wheel events. After all, this
- // is how things are supposed to work on mac in the first place.
- const QWheelEvent *wev = static_cast<const QWheelEvent*>(event);
- int offset = wev->delta() / -120;
- d->lastOffset = wev->orientation() == Qt::Horizontal ? QSize(offset, 0) : QSize(0, offset);
-
- if (state() == Qt::NoGesture) {
- d->totalOffset = d->lastOffset;
- } else {
- d->totalOffset += d->lastOffset;
- }
-
- killTimer(d->panFinishedTimer);
- d->panFinishedTimer = startTimer(200);
- updateState(Qt::GestureUpdated);
-#endif
- return true;
- }
-#endif
- return false;
-}
-
-/*! \internal */
-void QPanGesture::reset()
-{
- Q_D(QPanGesture);
- d->lastOffset = d->totalOffset = QSize();
- d->lastPosition = QPoint();
-#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)
- if (d->panFinishedTimer) {
- killTimer(d->panFinishedTimer);
- d->panFinishedTimer = 0;
- }
-#endif
- QGesture::reset();
-}
-
-/*!
- \property QPanGesture::totalOffset
-
- Specifies a total pan offset since the start of the gesture.
-*/
-QSize QPanGesture::totalOffset() const
-{
- Q_D(const QPanGesture);
- return d->totalOffset;
-}
-
-/*!
- \property QPanGesture::lastOffset
-
- Specifies a pan offset since the last time the gesture was
- triggered.
-*/
-QSize QPanGesture::lastOffset() const
-{
- Q_D(const QPanGesture);
- return d->lastOffset;
-}
-
-
-/*!
- \class QPinchGesture
- \since 4.6
-
- \brief The QPinchGesture class represents a Pinch gesture,
- providing additional information related to zooming and/or rotation.
-*/
-
-/*!
- Creates a new Pinch gesture handler object and marks it as a child of \a
- parent.
-
- On some platform like Windows it's necessary to provide a non-null widget
- as \a parent to get native gesture support.
-*/
-QPinchGesture::QPinchGesture(QWidget *parent)
- : QGesture(*new QPinchGesturePrivate, parent)
-{
- if (parent) {
- QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
- qAppPriv->widgetGestures[parent].pinch = this;
-#ifdef Q_WS_WIN
- qt_widget_private(parent)->winSetupGestures();
-#endif
- }
-}
-
-/*! \internal */
-bool QPinchGesture::event(QEvent *event)
-{
- switch (event->type()) {
- case QEvent::ParentAboutToChange:
- if (QWidget *w = qobject_cast<QWidget*>(parent())) {
- QApplicationPrivate::instance()->widgetGestures[w].pinch = 0;
-#ifdef Q_WS_WIN
- qt_widget_private(w)->winSetupGestures();
-#endif
- }
- break;
- case QEvent::ParentChange:
- if (QWidget *w = qobject_cast<QWidget*>(parent())) {
- QApplicationPrivate::instance()->widgetGestures[w].pinch = this;
-#ifdef Q_WS_WIN
- qt_widget_private(w)->winSetupGestures();
-#endif
- }
- break;
- default:
- break;
- }
- return QObject::event(event);
-}
-
-bool QPinchGesture::eventFilter(QObject *receiver, QEvent *event)
-{
-#ifdef Q_WS_WIN
- Q_D(QPinchGesture);
- if (receiver->isWidgetType() && event->type() == QEvent::NativeGesture) {
- QNativeGestureEvent *ev = static_cast<QNativeGestureEvent*>(event);
- QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
- QApplicationPrivate::WidgetStandardGesturesMap::iterator it;
- it = qAppPriv->widgetGestures.find(static_cast<QWidget*>(receiver));
- if (it == qAppPriv->widgetGestures.end())
- return false;
- if (this != it.value().pinch)
- return false;
- Qt::GestureState nextState = Qt::NoGesture;
- switch(ev->gestureType) {
- case QNativeGestureEvent::GestureBegin:
- // next we might receive the first gesture update event, so we
- // prepare for it.
- d->state = Qt::NoGesture;
- d->scaleFactor = d->lastScaleFactor = 1;
- d->rotationAngle = d->lastRotationAngle = 0;
- d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint();
- d->initialDistance = 0;
- return false;
- case QNativeGestureEvent::Rotate:
- d->lastRotationAngle = d->rotationAngle;
- d->rotationAngle = -1 * GID_ROTATE_ANGLE_FROM_ARGUMENT(ev->argument);
- nextState = Qt::GestureUpdated;
- event->accept();
- break;
- case QNativeGestureEvent::Zoom:
- if (d->initialDistance != 0) {
- d->lastScaleFactor = d->scaleFactor;
- int distance = int(qint64(ev->argument));
- d->scaleFactor = (qreal) distance / d->initialDistance;
- } else {
- d->initialDistance = int(qint64(ev->argument));
- }
- nextState = Qt::GestureUpdated;
- event->accept();
- break;
- case QNativeGestureEvent::GestureEnd:
- if (state() == Qt::NoGesture)
- return false; // some other gesture has ended
- nextState = Qt::GestureFinished;
- break;
- default:
- return false;
- }
- if (d->startCenterPoint.isNull())
- d->startCenterPoint = d->centerPoint;
- d->lastCenterPoint = d->centerPoint;
- d->centerPoint = static_cast<QWidget*>(receiver)->mapFromGlobal(ev->position);
- updateState(nextState);
- return true;
- }
-#endif
- return QGesture::eventFilter(receiver, event);
-}
-
-/*! \internal */
-bool QPinchGesture::filterEvent(QEvent *event)
-{
- Q_UNUSED(event);
- return false;
-}
-
-/*! \internal */
-void QPinchGesture::reset()
-{
- Q_D(QPinchGesture);
- d->scaleFactor = d->lastScaleFactor = 0;
- d->rotationAngle = d->lastRotationAngle = 0;
- d->startCenterPoint = d->centerPoint = d->lastCenterPoint = QPoint();
- QGesture::reset();
-}
-
-/*!
- \property QPinchGesture::scaleFactor
-
- Specifies a scale factor of the pinch gesture.
-*/
-qreal QPinchGesture::scaleFactor() const
-{
- return d_func()->scaleFactor;
-}
-
-/*!
- \property QPinchGesture::lastScaleFactor
-
- Specifies a previous scale factor of the pinch gesture.
-*/
-qreal QPinchGesture::lastScaleFactor() const
-{
- return d_func()->lastScaleFactor;
-}
-
-/*!
- \property QPinchGesture::rotationAngle
-
- Specifies a rotation angle of the gesture.
-*/
-qreal QPinchGesture::rotationAngle() const
-{
- return d_func()->rotationAngle;
-}
-
-/*!
- \property QPinchGesture::lastRotationAngle
-
- Specifies a previous rotation angle of the gesture.
-*/
-qreal QPinchGesture::lastRotationAngle() const
-{
- return d_func()->lastRotationAngle;
-}
-
-/*!
- \property QPinchGesture::centerPoint
-
- Specifies a center point of the gesture. The point can be used as a center
- point that the object is rotated around.
-*/
-QPoint QPinchGesture::centerPoint() const
-{
- return d_func()->centerPoint;
-}
-
-/*!
- \property QPinchGesture::lastCenterPoint
-
- Specifies a previous center point of the gesture.
-*/
-QPoint QPinchGesture::lastCenterPoint() const
-{
- return d_func()->lastCenterPoint;
-}
-
-/*!
- \property QPinchGesture::startCenterPoint
-
- Specifies an initial center point of the gesture. Difference between the
- startCenterPoint and the centerPoint is the distance at which pinching
- fingers has shifted.
-*/
-QPoint QPinchGesture::startCenterPoint() const
-{
- return d_func()->startCenterPoint;
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qstandardgestures.cpp"
-
diff --git a/doc/src/snippets/gestures/qstandardgestures.h b/doc/src/snippets/gestures/qstandardgestures.h
deleted file mode 100644
index efd6c6eeb7..0000000000
--- a/doc/src/snippets/gestures/qstandardgestures.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QSTANDARDGESTURES_H
-#define QSTANDARDGESTURES_H
-
-#include <QtGui/qevent.h>
-#include <QtCore/qbasictimer.h>
-
-#include <QtGui/qgesture.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-QT_MODULE(Gui)
-
-class QPanGesturePrivate;
-class Q_GUI_EXPORT QPanGesture : public QGesture
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QPanGesture)
-
- Q_PROPERTY(QSize totalOffset READ totalOffset)
- Q_PROPERTY(QSize lastOffset READ lastOffset)
-
-public:
- QPanGesture(QWidget *parent);
-
- bool filterEvent(QEvent *event);
-
- QSize totalOffset() const;
- QSize lastOffset() const;
-
-protected:
- void reset();
-
-private:
- bool event(QEvent *event);
- bool eventFilter(QObject *receiver, QEvent *event);
-
- friend class QWidget;
-};
-
-class QPinchGesturePrivate;
-class Q_GUI_EXPORT QPinchGesture : public QGesture
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(QPinchGesture)
-
- Q_PROPERTY(qreal scaleFactor READ scaleFactor)
- Q_PROPERTY(qreal lastScaleFactor READ lastScaleFactor)
-
- Q_PROPERTY(qreal rotationAngle READ rotationAngle)
- Q_PROPERTY(qreal lastRotationAngle READ lastRotationAngle)
-
- Q_PROPERTY(QPoint startCenterPoint READ startCenterPoint)
- Q_PROPERTY(QPoint lastCenterPoint READ lastCenterPoint)
- Q_PROPERTY(QPoint centerPoint READ centerPoint)
-
-public:
- QPinchGesture(QWidget *parent);
-
- bool filterEvent(QEvent *event);
- void reset();
-
- QPoint startCenterPoint() const;
- QPoint lastCenterPoint() const;
- QPoint centerPoint() const;
-
- qreal scaleFactor() const;
- qreal lastScaleFactor() const;
-
- qreal rotationAngle() const;
- qreal lastRotationAngle() const;
-
-private:
- bool event(QEvent *event);
- bool eventFilter(QObject *receiver, QEvent *event);
-
- friend class QWidget;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif // QSTANDARDGESTURES_H
diff --git a/doc/src/snippets/statemachine/main2.cpp b/doc/src/snippets/statemachine/main2.cpp
index 2419dc2e56..9a2890f586 100644
--- a/doc/src/snippets/statemachine/main2.cpp
+++ b/doc/src/snippets/statemachine/main2.cpp
@@ -69,17 +69,18 @@ int main(int argv, char **args)
//![1]
QButton *interruptButton = new QPushButton("Interrupt Button");
+ QWidget *mainWindow = new QWidget();
//![3]
QHistoryState *s1h = new QHistoryState(s1);
QState *s3 = new QState();
s3->assignProperty(label, "text", "In s3");
- QMessageBox mbox;
- mbox.addButton(QMessageBox::Ok);
- mbox.setText("Interrupted!");
- mbox.setIcon(QMessageBox::Information);
- QObject::connect(s3, SIGNAL(entered()), &mbox, SLOT(exec()));
+ QMessageBox *mbox = new QMessageBox(mainWindow);
+ mbox->addButton(QMessageBox::Ok);
+ mbox->setText("Interrupted!");
+ mbox->setIcon(QMessageBox::Information);
+ QObject::connect(s3, SIGNAL(entered()), mbox, SLOT(exec()));
s3->addTransition(s1h);
machine.addState(s3);
diff --git a/doc/src/snippets/statemachine/main5.cpp b/doc/src/snippets/statemachine/main5.cpp
index a9d4091255..ff25b7b999 100644
--- a/doc/src/snippets/statemachine/main5.cpp
+++ b/doc/src/snippets/statemachine/main5.cpp
@@ -44,14 +44,13 @@
int main(int argv, char **args)
{
QApplication app(argv, args);
+ QWidget *button;
{
//![0]
QStateMachine machine;
machine.setGlobalRestorePolicy(QStateMachine::RestoreProperties);
-//![0]
-//![1]
QState *s1 = new QState();
s1->assignProperty(object, "fooBar", 1.0);
machine.addState(s1);
@@ -59,7 +58,7 @@ int main(int argv, char **args)
QState *s2 = new QState();
machine.addState(s2);
-//![1]
+//![0]
}
{
@@ -110,21 +109,50 @@ int main(int argv, char **args)
}
{
+ QMainWindow *mainWindow = 0;
//![5]
+ QMessageBox *messageBox = new QMessageBox(mainWindow);
+ messageBox->addButton(QMessageBox::Ok);
+ messageBox->setText("Button geometry has been set!");
+ messageBox->setIcon(QMessageBox::Information);
+
QState *s1 = new QState();
- s1->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
QState *s2 = new QState();
+ s2->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
+ connect(s2, SIGNAL(entered()), messageBox, SLOT(exec()));
- s1->addTransition(s1, SIGNAL(polished()), s2);
+ s1->addTransition(button, SIGNAL(clicked()), s2);
//![5]
-
}
{
+ QMainWindow *mainWindow = 0;
+
+//![6]
+ QMessageBox *messageBox = new QMessageBox(mainWindow);
+ messageBox->addButton(QMessageBox::Ok);
+ messageBox->setText("Button geometry has been set!");
+ messageBox->setIcon(QMessageBox::Information);
+
+ QState *s1 = new QState();
+
+ QState *s2 = new QState();
+ s2->assignProperty(button, "geometry", QRectF(0, 0, 50, 50));
+
+ QState *s3 = new QState();
+ connect(s3, SIGNAL(entered()), messageBox, SLOT(exec()));
+ s1->addTransition(button, SIGNAL(clicked()), s2);
+ s2->addTransition(s2, SIGNAL(propertiesAssigned()), s3);
//![6]
+
+ }
+
+ {
+
+//![7]
QState *s1 = new QState();
QState *s2 = new QState();
@@ -134,10 +162,12 @@ int main(int argv, char **args)
QStateMachine machine;
machine.setInitialState(s1);
machine.addDefaultAnimation(new QPropertyAnimation(object, "fooBar"));
-//![6]
+//![7]
}
+
+
return app.exec();
}
diff --git a/doc/src/sql-programming/sql-programming.qdoc b/doc/src/sql-programming/sql-programming.qdoc
index d0b67764a8..3aceb17bcb 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
+ \nextpage Connecting to Databases
\brief Database integration for Qt applications.
@@ -95,7 +96,7 @@
and the SQL API layer. See \l{SQL Database Drivers} for more information.
\section2 SQL API Layer
-
+
These classes provide access to databases. Connections
are made using the QSqlDatabase class. Database
interaction is achieved by using the QSqlQuery class.
@@ -119,6 +120,7 @@
\title Connecting to Databases
\contentspage SQL Programming
+ \previouspage SQL Programming
\nextpage Executing SQL Statements
To access a database with QSqlQuery or QSqlQueryModel, create and