summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/network/doc/src/blockingfortuneclient.qdoc4
-rw-r--r--examples/network/doc/src/broadcastreceiver.qdoc5
-rw-r--r--examples/network/doc/src/broadcastsender.qdoc5
-rw-r--r--examples/network/doc/src/fortuneclient.qdoc4
-rw-r--r--examples/network/doc/src/fortuneserver.qdoc6
-rw-r--r--examples/network/doc/src/googlesuggest.qdoc6
-rw-r--r--examples/network/doc/src/http.qdoc5
-rw-r--r--examples/network/doc/src/loopback.qdoc5
-rw-r--r--examples/network/doc/src/multicastreceiver.qdoc5
-rw-r--r--examples/network/doc/src/multicastsender.qdoc5
-rw-r--r--examples/network/doc/src/network-chat.qdoc6
-rw-r--r--examples/network/doc/src/network-download.qdoc41
-rw-r--r--examples/network/doc/src/network-downloadmanager.qdoc41
-rw-r--r--examples/network/doc/src/securesocketclient.qdoc8
-rw-r--r--examples/network/doc/src/torrent.qdoc5
-rw-r--r--examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.pngbin0 -> 23710 bytes
-rw-r--r--examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc38
-rw-r--r--examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc38
-rw-r--r--examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.pngbin0 -> 4608 bytes
-rw-r--r--examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc38
-rw-r--r--examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc39
-rw-r--r--examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc39
-rw-r--r--examples/threads/doc/src/mandelbrot.qdoc2
-rw-r--r--examples/threads/doc/src/queuedcustomtype.qdoc2
-rw-r--r--examples/threads/doc/src/semaphores.qdoc2
-rw-r--r--examples/threads/doc/src/waitconditions.qdoc2
-rw-r--r--examples/widgets/doc/images/graphicsanchorlayout-example.pngbin0 -> 11592 bytes
-rw-r--r--examples/widgets/doc/images/graphicsflowlayout-example.pngbin0 -> 15345 bytes
-rw-r--r--examples/widgets/doc/images/graphicssimpleanchorlayout-example.pngbin0 -> 13715 bytes
-rw-r--r--examples/widgets/doc/images/weatheranchorlayout-example.pngbin0 -> 88805 bytes
-rw-r--r--examples/widgets/doc/src/basicgraphicslayouts.qdoc4
-rw-r--r--examples/widgets/doc/src/blurpicker.qdoc2
-rw-r--r--examples/widgets/doc/src/boxes.qdoc3
-rw-r--r--examples/widgets/doc/src/chip.qdoc5
-rw-r--r--examples/widgets/doc/src/collidingmice-example.qdoc2
-rw-r--r--examples/widgets/doc/src/diagramscene.qdoc2
-rw-r--r--examples/widgets/doc/src/dragdroprobot.qdoc4
-rw-r--r--examples/widgets/doc/src/elasticnodes.qdoc6
-rw-r--r--examples/widgets/doc/src/embeddeddialogs.qdoc6
-rw-r--r--examples/widgets/doc/src/fademessage.qdoc4
-rw-r--r--examples/widgets/doc/src/graphicsview-anchorlayout.qdoc4
-rw-r--r--examples/widgets/doc/src/graphicsview-flowlayout.qdoc4
-rw-r--r--examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc4
-rw-r--r--examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc4
-rw-r--r--examples/widgets/doc/src/lighting.qdoc2
-rw-r--r--examples/widgets/doc/src/padnavigator.qdoc4
-rw-r--r--examples/xml/doc/images/xmlstreamexample-filemenu.pngbin0 -> 9380 bytes
-rw-r--r--examples/xml/doc/images/xmlstreamexample-helpmenu.pngbin0 -> 10856 bytes
-rw-r--r--examples/xml/doc/images/xmlstreamexample-screenshot.pngbin0 -> 22323 bytes
-rw-r--r--examples/xml/doc/src/qxmlstreambookmarks.qdoc194
-rw-r--r--examples/xml/doc/src/saxbookmarks.qdoc7
51 files changed, 552 insertions, 60 deletions
diff --git a/examples/network/doc/src/blockingfortuneclient.qdoc b/examples/network/doc/src/blockingfortuneclient.qdoc
index 4e105b50a7..c16fd60248 100644
--- a/examples/network/doc/src/blockingfortuneclient.qdoc
+++ b/examples/network/doc/src/blockingfortuneclient.qdoc
@@ -29,9 +29,7 @@
\example blockingfortuneclient
\title Blocking Fortune Client Example
\ingroup examples-network
-
- \brief The Blocking Fortune Client example shows how to create a client for a
- network service using QTcpSocket's synchronous API in a non-GUI thread.
+ \brief Demonstrates how to create a client for a network service
\image blockingfortuneclient-example.png
diff --git a/examples/network/doc/src/broadcastreceiver.qdoc b/examples/network/doc/src/broadcastreceiver.qdoc
index 374bc29244..2ab3c6be67 100644
--- a/examples/network/doc/src/broadcastreceiver.qdoc
+++ b/examples/network/doc/src/broadcastreceiver.qdoc
@@ -29,9 +29,10 @@
\example broadcastreceiver
\title Broadcast Receiver Example
\ingroup examples-network
+ \brief Demonstrates how to receive information broadcasted over a local network.
- \brief The Broadcast Receiver example shows how to receive information that is broadcasted
- over a local network.
+ This example uses the Qt Network APIs to demonstrate how to receive
+ messages broadcasted over a local network.
\image broadcastreceiver-example.png
*/
diff --git a/examples/network/doc/src/broadcastsender.qdoc b/examples/network/doc/src/broadcastsender.qdoc
index a587c5fddd..a9aa1f96d8 100644
--- a/examples/network/doc/src/broadcastsender.qdoc
+++ b/examples/network/doc/src/broadcastsender.qdoc
@@ -29,9 +29,10 @@
\example broadcastsender
\title Broadcast Sender Example
\ingroup examples-network
+ \brief Demonstrates how to broadcast information to multiple clients on a local network.
- \brief The Broadcast Sender example shows how to broadcast information to multiple clients
- on a local network.
+ This example uses Qt Network APIs to demonstrate how to broadcast messages
+ to multiple clients over a local network.
\image broadcastsender-example.png
*/
diff --git a/examples/network/doc/src/fortuneclient.qdoc b/examples/network/doc/src/fortuneclient.qdoc
index f7a4c56020..1d69415f3c 100644
--- a/examples/network/doc/src/fortuneclient.qdoc
+++ b/examples/network/doc/src/fortuneclient.qdoc
@@ -29,9 +29,9 @@
\example fortuneclient
\title Fortune Client Example
\ingroup examples-network
+ \brief Demonstrates how to create a client for a network service
- \brief The Fortune Client example shows how to create a client for a simple
- network service using QTcpSocket. It is intended to be run alongside the
+ This example uses QTcpSocket, and is intended to be run alongside the
\l{fortuneserver}{Fortune Server} example or
the \l{threadedfortuneserver}{Threaded Fortune Server} example.
diff --git a/examples/network/doc/src/fortuneserver.qdoc b/examples/network/doc/src/fortuneserver.qdoc
index d702bc6bb1..7422120975 100644
--- a/examples/network/doc/src/fortuneserver.qdoc
+++ b/examples/network/doc/src/fortuneserver.qdoc
@@ -29,15 +29,15 @@
\example fortuneserver
\title Fortune Server Example
\ingroup examples-network
+ \brief Demonstrates how to create a server for a network service.
- \brief The Fortune Server example shows how to create a server for a simple
- network service. It is intended to be run alongside the
+ This example is intended to be run alongside the
\l{fortuneclient}{Fortune Client} example or the
\l{blockingfortuneclient}{Blocking Fortune Client} example.
\image fortuneserver-example.png Screenshot of the Fortune Server example
- This example uses QTcpServer to accept incoming TCP connections, and a
+ It uses QTcpServer to accept incoming TCP connections, and a
simple QDataStream based data transfer protocol to write a fortune to the
connecting client (from the \l{fortuneclient}{Fortune Client}
example), before closing the connection.
diff --git a/examples/network/doc/src/googlesuggest.qdoc b/examples/network/doc/src/googlesuggest.qdoc
index c04e65c3f9..b53c394d76 100644
--- a/examples/network/doc/src/googlesuggest.qdoc
+++ b/examples/network/doc/src/googlesuggest.qdoc
@@ -29,10 +29,10 @@
\example googlesuggest
\title Google Suggest Example
\ingroup examples-network
+ \brief Obtains the list of search recommendations by the Google search engine
- \brief 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.
+ The example uses the QNetworkAccessManager to obtain the list of search
+ recommendations by Google as the user types into a QLineEdit.
\image googlesuggest-example.png
diff --git a/examples/network/doc/src/http.qdoc b/examples/network/doc/src/http.qdoc
index 89223b7894..62cfffd603 100644
--- a/examples/network/doc/src/http.qdoc
+++ b/examples/network/doc/src/http.qdoc
@@ -29,9 +29,10 @@
\example http
\title HTTP Example
\ingroup examples-network
+ \brief Demonstrates a simple HTTP client
- \brief The HTTP example demonstrates a simple HTTP client that shows how to fetch files
- specified by URLs from remote hosts.
+ This example demonstrates how a simple HTTP client can fetch files
+ from remote hosts.
\image http-example.png
*/
diff --git a/examples/network/doc/src/loopback.qdoc b/examples/network/doc/src/loopback.qdoc
index e278a9e9bd..6d74a187fd 100644
--- a/examples/network/doc/src/loopback.qdoc
+++ b/examples/network/doc/src/loopback.qdoc
@@ -29,9 +29,10 @@
\example loopback
\title Loopback Example
\ingroup examples-network
+ \brief Demonstrates the client-server communication on a local host
- \brief The Loopback example shows how to communicate between simple clients and servers on a local
- host.
+ The example demonstrates how the clients and servers on a local host
+ communicate with each other.
\image loopback-example.png
*/
diff --git a/examples/network/doc/src/multicastreceiver.qdoc b/examples/network/doc/src/multicastreceiver.qdoc
index 88ed6020d4..62174f5d4d 100644
--- a/examples/network/doc/src/multicastreceiver.qdoc
+++ b/examples/network/doc/src/multicastreceiver.qdoc
@@ -29,9 +29,8 @@
\example multicastreceiver
\title Multicast Receiver Example
\ingroup examples-network
+ \brief Demonstrates how to receive information sent to a multicast group
- \brief The Multicast Receiever example shows how to receive information that is
- sent to a multicast group.
-
+ This example demonstrates how to receive messages sent to a multicast group
\image multicastreceiver-example.png
*/
diff --git a/examples/network/doc/src/multicastsender.qdoc b/examples/network/doc/src/multicastsender.qdoc
index 4ec9defb53..c4b93ea0a6 100644
--- a/examples/network/doc/src/multicastsender.qdoc
+++ b/examples/network/doc/src/multicastsender.qdoc
@@ -29,9 +29,10 @@
\example multicastsender
\title Multicast Sender Example
\ingroup examples-network
+ \brief Demonstrates how to send messages to a multicast group
- \brief The Multicast Sender example shows how to send information to multiple
- clients in a multicast group.
+ This example demonstrates how to send messages to the clients of a
+ multicast group.
\image multicastsender-example.png
*/
diff --git a/examples/network/doc/src/network-chat.qdoc b/examples/network/doc/src/network-chat.qdoc
index cd5ec4b348..b95a13098f 100644
--- a/examples/network/doc/src/network-chat.qdoc
+++ b/examples/network/doc/src/network-chat.qdoc
@@ -29,10 +29,10 @@
\example network-chat
\title Network Chat Example
\ingroup examples-network
+ \brief Demonstrates a stateful peer-to-peer Chat client
- \brief The Network Chat example demonstrates a stateful peer-to-peer Chat client
- that uses broadcasting with QUdpSocket and QNetworkInterface to discover
- its peers.
+ This example uses broadcasting with QUdpSocket and QNetworkInterface to
+ discover its peers.
\image network-chat-example.png
*/
diff --git a/examples/network/doc/src/network-download.qdoc b/examples/network/doc/src/network-download.qdoc
new file mode 100644
index 0000000000..1144361fb5
--- /dev/null
+++ b/examples/network/doc/src/network-download.qdoc
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/download
+ \title Network Download Example
+ \brief Demonstrates how to use networking APIs for multiple downloads
+ \ingroup examples-network
+
+ The Network Download example shows how to perform multiple downloads in
+ parallel using the QNetworkAccessManager class.
+
+ This example is designed to be run from the command-line.
+
+ The \l{Network Download Manager Example} implements a more complex system
+ that places files in a queue for sequential downloading.
+*/
diff --git a/examples/network/doc/src/network-downloadmanager.qdoc b/examples/network/doc/src/network-downloadmanager.qdoc
new file mode 100644
index 0000000000..9722996d30
--- /dev/null
+++ b/examples/network/doc/src/network-downloadmanager.qdoc
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example network/downloadmanager
+ \title Network Download Manager Example
+ \brief Demonstrates how to use the networking APIs for multiple downloads
+ \ingroup examples-network
+
+ The Network Download example shows how to implement a queue for multiple
+ downloads using the QNetworkAccessManager class.
+
+ This example is designed to be run from the command-line.
+
+ See the \l{Network Download Example} for a simpler version of this example
+ that obtains multiple files in parallel.
+*/
diff --git a/examples/network/doc/src/securesocketclient.qdoc b/examples/network/doc/src/securesocketclient.qdoc
index a61a00e833..e025b51931 100644
--- a/examples/network/doc/src/securesocketclient.qdoc
+++ b/examples/network/doc/src/securesocketclient.qdoc
@@ -29,11 +29,11 @@
\example securesocketclient
\title Secure Socket Client Example
\ingroup examples-network
+ \brief Demonstrates how to communicate over an encrypted (SSL) connection
- \brief The Secure Socket Client example shows how to use QSslSocket to
- communicate over an encrypted (SSL) connection. It also demonstrates how
- to deal with authenticity problems, and how to display security and
- certificate information.
+ This example uses QSslSocket to demonstrate how to communicate over an
+ encrypted connection, deal with authenticity problems, and display security
+ and certificate information.
\image securesocketclient.png
\image securesocketclient2.png
diff --git a/examples/network/doc/src/torrent.qdoc b/examples/network/doc/src/torrent.qdoc
index 791464c9a4..939ebcbc6b 100644
--- a/examples/network/doc/src/torrent.qdoc
+++ b/examples/network/doc/src/torrent.qdoc
@@ -29,9 +29,10 @@
\example torrent
\title Torrent Example
\ingroup examples-network
+ \brief Demonstrates complex TCP/IP operations
- \brief The Torrent example is a functional BitTorrent client that
- illustrates how to write a complex TCP/IP application using Qt.
+ This example demonstrates some of the complex TCP/IP operations
+ supported by the Qt Network APIs.
\image torrent-example.png
diff --git a/examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.png b/examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.png
new file mode 100644
index 0000000000..7c6794132a
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/doc/images/imagescaling_example.png
Binary files differ
diff --git a/examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc b/examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc
new file mode 100644
index 0000000000..4cf07e8edb
--- /dev/null
+++ b/examples/qtconcurrent/imagescaling/doc/src/qtconcurrent-imagescaling.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/imagescaling
+ \title Image Scaling Example
+ \bried Demonstrates how to asynchronously scale images.
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Map example shows how to use the asynchronous
+ QtConcurrent API to load and scale a collection of images.
+
+ \image imagescaling_example.png
+*/
diff --git a/examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc b/examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc
new file mode 100644
index 0000000000..7522baf2c4
--- /dev/null
+++ b/examples/qtconcurrent/map/doc/src/qtconcurrent-map.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/map
+ \title Map Example
+ \brief Demonstrates how to scale images synchronously.
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Map example shows how to use the synchronous (blocking)
+ QtConcurrent API to scale a collection of images.
+
+ This is a command-line application.
+*/
diff --git a/examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.png b/examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.png
new file mode 100644
index 0000000000..2e8b7735ad
--- /dev/null
+++ b/examples/qtconcurrent/progressdialog/doc/images/qtconcurrent-progressdialog.png
Binary files differ
diff --git a/examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc b/examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc
new file mode 100644
index 0000000000..aa5cd517a5
--- /dev/null
+++ b/examples/qtconcurrent/progressdialog/doc/src/qtconcurrent-progressdialog.qdoc
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/progressdialog
+ \title QtConcurrent Progress Dialog Example
+ \brief Demonstrates how to monitor the progress of the active processes.
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Progress Dialog example shows how to use the
+ QFutureWatcher class to monitor the progress of a long-running operation.
+
+ \image qtconcurrent-progressdialog.png
+*/
diff --git a/examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc b/examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc
new file mode 100644
index 0000000000..1c4e367240
--- /dev/null
+++ b/examples/qtconcurrent/runfunction/doc/src/qtconcurrent-runfunction.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/runfunction
+ \title Run Function Example
+ \brief Demonstrates how to run standard functions concurrently.
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Run Function example shows how to apply concurrency to
+ a standard function, using QFuture instances to retrieve return values
+ at a later time.
+
+ This is a command-line application.
+*/
diff --git a/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc b/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc
new file mode 100644
index 0000000000..b8d04fa553
--- /dev/null
+++ b/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example qtconcurrent/wordcount
+ \title QtConcurrent Word Count Example
+ \brief Demonstrates how to use the map-reduce algorithm
+ \ingroup qtconcurrentexamples
+
+ The QtConcurrent Word Count example demonstrates the use of the map-reduce
+ algorithm when applied to the problem of counting words in a collection
+ of files.
+
+ This is a command-line application.
+*/
diff --git a/examples/threads/doc/src/mandelbrot.qdoc b/examples/threads/doc/src/mandelbrot.qdoc
index a76b856616..8ef8d0b01a 100644
--- a/examples/threads/doc/src/mandelbrot.qdoc
+++ b/examples/threads/doc/src/mandelbrot.qdoc
@@ -28,6 +28,8 @@
/*!
\example mandelbrot
\title Mandelbrot Example
+ \brief Demonstrates multi-thread programming using Qt
+ \ingroup qtconcurrent-mtexamples
\brief The Mandelbrot example shows how to use a worker thread to
perform heavy computations without blocking the main thread's
diff --git a/examples/threads/doc/src/queuedcustomtype.qdoc b/examples/threads/doc/src/queuedcustomtype.qdoc
index 43d47d42cc..df825b2db3 100644
--- a/examples/threads/doc/src/queuedcustomtype.qdoc
+++ b/examples/threads/doc/src/queuedcustomtype.qdoc
@@ -28,6 +28,8 @@
/*!
\example queuedcustomtype
\title Queued Custom Type Example
+ \brief Demonstrates multi-thread programming using Qt
+ \ingroup qtconcurrent-mtexamples
\brief The Queued Custom Type example shows how to send custom types between
threads with queued signals and slots.
diff --git a/examples/threads/doc/src/semaphores.qdoc b/examples/threads/doc/src/semaphores.qdoc
index 0b811f9466..4cfccf00f8 100644
--- a/examples/threads/doc/src/semaphores.qdoc
+++ b/examples/threads/doc/src/semaphores.qdoc
@@ -28,6 +28,8 @@
/*!
\example semaphores
\title Semaphores Example
+ \brief Demonstrates multi-thread programming using Qt
+ \ingroup qtconcurrent-mtexamples
\brief The Semaphores example shows how to use QSemaphore to control
access to a circular buffer shared by a producer thread and a
diff --git a/examples/threads/doc/src/waitconditions.qdoc b/examples/threads/doc/src/waitconditions.qdoc
index ea49a93d60..6969e46491 100644
--- a/examples/threads/doc/src/waitconditions.qdoc
+++ b/examples/threads/doc/src/waitconditions.qdoc
@@ -28,6 +28,8 @@
/*!
\example waitconditions
\title Wait Conditions Example
+ \brief Demonstrates multi-thread programming using Qt
+ \ingroup qtconcurrent-mtexamples
\brief The Wait Conditions example shows how to use QWaitCondition and
QMutex to control access to a circular buffer shared by a
diff --git a/examples/widgets/doc/images/graphicsanchorlayout-example.png b/examples/widgets/doc/images/graphicsanchorlayout-example.png
new file mode 100644
index 0000000000..d30d6839d9
--- /dev/null
+++ b/examples/widgets/doc/images/graphicsanchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicsflowlayout-example.png b/examples/widgets/doc/images/graphicsflowlayout-example.png
new file mode 100644
index 0000000000..a5f9b3dc40
--- /dev/null
+++ b/examples/widgets/doc/images/graphicsflowlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png b/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png
new file mode 100644
index 0000000000..d073b12c0c
--- /dev/null
+++ b/examples/widgets/doc/images/graphicssimpleanchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/images/weatheranchorlayout-example.png b/examples/widgets/doc/images/weatheranchorlayout-example.png
new file mode 100644
index 0000000000..59d3b55b7a
--- /dev/null
+++ b/examples/widgets/doc/images/weatheranchorlayout-example.png
Binary files differ
diff --git a/examples/widgets/doc/src/basicgraphicslayouts.qdoc b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
index 2ff9a90680..70f92a838a 100644
--- a/examples/widgets/doc/src/basicgraphicslayouts.qdoc
+++ b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
@@ -29,9 +29,9 @@
\example graphicsview/basicgraphicslayouts
\title Basic Graphics Layouts Example
\ingroup examples-graphicsview-layout
- \brief This example shows how to use some basic layouts.
+ \brief Demonstrates how to create basic graphics layout
- \brief The Basic Graphics Layouts example shows how to use the layout classes
+ The Basic Graphics Layouts example shows how to use the layout classes
in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout.
In addition to that it shows how to write your own custom layout item.
diff --git a/examples/widgets/doc/src/blurpicker.qdoc b/examples/widgets/doc/src/blurpicker.qdoc
index bacd7474e3..06426c2ab3 100644
--- a/examples/widgets/doc/src/blurpicker.qdoc
+++ b/examples/widgets/doc/src/blurpicker.qdoc
@@ -29,7 +29,7 @@
\example effects/blurpicker
\title Blur Picker Effect Example
\ingroup examples-graphicsview-graphicseffects
- \brief This example shows the use of QGraphicsBlurEffect.
+ \brief Demonstrates how to apply graphical effects on items in the view
\image blurpickereffect-example.png
*/
diff --git a/examples/widgets/doc/src/boxes.qdoc b/examples/widgets/doc/src/boxes.qdoc
index b3ed1f68c8..6ad50fff9f 100644
--- a/examples/widgets/doc/src/boxes.qdoc
+++ b/examples/widgets/doc/src/boxes.qdoc
@@ -29,8 +29,7 @@
\example graphicsview/boxes
\title Boxes
\ingroup examples-graphicsview
- \brief This demo shows Qt's ability to combine advanced OpenGL rendering with the
- the \l{Graphics View Framework}.
+ \brief Combines advanced OpenGL rendering with the Graphics View framework
\image boxes-demo.png
diff --git a/examples/widgets/doc/src/chip.qdoc b/examples/widgets/doc/src/chip.qdoc
index e3adb26ced..6fd15ac09c 100644
--- a/examples/widgets/doc/src/chip.qdoc
+++ b/examples/widgets/doc/src/chip.qdoc
@@ -29,10 +29,9 @@
\example graphicsview/chip
\title 40000 Chips
\ingroup examples-graphicsview
- \brief This demo shows how to visualize a huge scene with 40000 chip items
- using Graphics View.
+ \brief Visualizes a huge graphic view scene with 40000 chip items
- It also shows Graphics View's powerful navigation
+ This examples demonstrates Graphics View's powerful navigation
and interaction features, allowing you to zoom and rotate each of four
views independently, and you can select and move items around the scene.
diff --git a/examples/widgets/doc/src/collidingmice-example.qdoc b/examples/widgets/doc/src/collidingmice-example.qdoc
index 3994d75c2b..b6187677b8 100644
--- a/examples/widgets/doc/src/collidingmice-example.qdoc
+++ b/examples/widgets/doc/src/collidingmice-example.qdoc
@@ -28,6 +28,8 @@
/*!
\example graphicsview/collidingmice
\title Colliding Mice Example
+ \brief Demonstrates how to animate items on a graphics view
+ \ingroup examples-graphicsview
The Colliding Mice example shows how to use the Graphics View
framework to implement animated items and detect collision between
diff --git a/examples/widgets/doc/src/diagramscene.qdoc b/examples/widgets/doc/src/diagramscene.qdoc
index 55043df475..4ad74cfee9 100644
--- a/examples/widgets/doc/src/diagramscene.qdoc
+++ b/examples/widgets/doc/src/diagramscene.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/diagramscene
\title Diagram Scene Example
\ingroup examples-graphicsview
- \brief This example shows use of Qt's graphics framework.
+ \brief Demonstrate how to use the Graphics View framework
\image diagramscene.png
diff --git a/examples/widgets/doc/src/dragdroprobot.qdoc b/examples/widgets/doc/src/dragdroprobot.qdoc
index 8187cbfd46..f58f3cfdf2 100644
--- a/examples/widgets/doc/src/dragdroprobot.qdoc
+++ b/examples/widgets/doc/src/dragdroprobot.qdoc
@@ -29,7 +29,9 @@
\example graphicsview/dragdroprobot
\title Drag and Drop Robot Example
\ingroup examples-graphicsview
- \brief The Drag and Drop Robot example shows how to implement Drag and Drop in a
+ \brief Demonstrates how to drag and drop items in a graphics view
+
+ The Drag and Drop Robot example shows how to implement Drag and Drop in a
QGraphicsItem subclass, as well as how to animate items using Qt's
\l{Animation Framework}.
diff --git a/examples/widgets/doc/src/elasticnodes.qdoc b/examples/widgets/doc/src/elasticnodes.qdoc
index 75ad496592..bfca70d2f1 100644
--- a/examples/widgets/doc/src/elasticnodes.qdoc
+++ b/examples/widgets/doc/src/elasticnodes.qdoc
@@ -29,10 +29,10 @@
\example graphicsview/elasticnodes
\title Elastic Nodes Example
\ingroup examples-graphicsview
- \brief The Elastic Nodes example shows how to implement edges between nodes in a
- graph, with basic interaction.
+ \brief Demonstrates how to interact with graphical items in a scene
- You can click to drag a node around, and
+ The Elastic Nodes example shows how to implement edges between nodes in a
+ graph, with basic interaction. You can click to drag a node around, and
zoom in and out using the mouse wheel or the keyboard. Hitting the space
bar will randomize the nodes. The example is also resolution independent;
as you zoom in, the graphics remain crisp.
diff --git a/examples/widgets/doc/src/embeddeddialogs.qdoc b/examples/widgets/doc/src/embeddeddialogs.qdoc
index 1dbb7dc83a..34e800d75a 100644
--- a/examples/widgets/doc/src/embeddeddialogs.qdoc
+++ b/examples/widgets/doc/src/embeddeddialogs.qdoc
@@ -29,10 +29,10 @@
\example graphicsview/embeddeddialogs
\title Embedded Dialogs
\ingroup examples-graphicsview-layout
- \brief This example shows how to embed standard dialogs into
- Graphics View.
+ \brief Demonstrates how to embed dialogs into a graphics view
- It also shows how you can customize the
+ This example shows how to embed standard dialogs into
+ Graphics View. It also shows how you can customize the
proxy class and add window shadows.
\image embeddeddialogs-demo.png
diff --git a/examples/widgets/doc/src/fademessage.qdoc b/examples/widgets/doc/src/fademessage.qdoc
index 335384d5bd..dcd429521d 100644
--- a/examples/widgets/doc/src/fademessage.qdoc
+++ b/examples/widgets/doc/src/fademessage.qdoc
@@ -29,9 +29,9 @@
\example effects/fademessage
\title Fade Message Effect Example
\ingroup examples-graphicsview-graphicseffects
- \brief This example shows the use of QGraphicsColorizeEffect.
+ \brief Demonstrates how to appliy effects on items in the view
- \div { style="text-align: center"}
+ \div { style="text-align: left"}
\inlineimage fademessageeffect-example.png
\inlineimage fademessageeffect-example-faded.png
\enddiv
diff --git a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
index 78aa1feb95..98c0958918 100644
--- a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
@@ -29,8 +29,10 @@
\example graphicsview/anchorlayout
\title Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief This example shows how to use QGraphicsAnchorLayout.
+ \brief Demonstrates anchor layout in a graphics view scene
The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout
class.
+
+ \image graphicsanchorlayout-example.png
*/
diff --git a/examples/widgets/doc/src/graphicsview-flowlayout.qdoc b/examples/widgets/doc/src/graphicsview-flowlayout.qdoc
index c754fa2d53..52d97164c3 100644
--- a/examples/widgets/doc/src/graphicsview-flowlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-flowlayout.qdoc
@@ -29,10 +29,12 @@
\example graphicsview/flowlayout
\title Graphics View Flow Layout Example
\ingroup examples-graphicsview-layout
- \brief This example shows how to make a flow layout in Graphics View.
+ \brief Demonstrates flow layout on a graphics view scene.
The Graphics View Flow Layout example shows the use of a flow layout
in a Graphics View widget.
+ \image graphicsflowlayout-example.png
+
See the \l{Flow Layout Example} for a corresponding widget-based example.
*/
diff --git a/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
index 2ff804ab46..480c7c4e0c 100644
--- a/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
@@ -29,8 +29,10 @@
\example graphicsview/simpleanchorlayout
\title Simple Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief This example shows how basic use of QGraphicsAnchorLayout.
+ \brief Demonstrates anchor layout on a graphics view scene
The Simple Anchor Layout example shows the basic use of the
QGraphicsAnchorLayout class.
+
+ \image graphicssimpleanchorlayout-example.png
*/
diff --git a/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
index 8b7b9c498d..88a5c60fb5 100644
--- a/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
@@ -29,8 +29,10 @@
\example graphicsview/weatheranchorlayout
\title Weather Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief This example shows advanced use of QGraphicsAnchorLayout.
+ \brief Demonstrates anchor layout on a graphics view scene
The Weather Anchor Layout example shows more complex use of the
QGraphicsAnchorLayout class to create a real-world window layout.
+
+ \image weatheranchorlayout-example.png
*/
diff --git a/examples/widgets/doc/src/lighting.qdoc b/examples/widgets/doc/src/lighting.qdoc
index 8277f0e5b8..e519bacb91 100644
--- a/examples/widgets/doc/src/lighting.qdoc
+++ b/examples/widgets/doc/src/lighting.qdoc
@@ -29,7 +29,7 @@
\example effects/lighting
\title Lighting Effect Example
\ingroup examples-graphicsview-graphicseffects
- \brief This example shows the use of QGraphicsDropShadowEffect.
+ \brief Demonstrates how to apply effects on items in the view
\image lightingeffect-example.png
*/
diff --git a/examples/widgets/doc/src/padnavigator.qdoc b/examples/widgets/doc/src/padnavigator.qdoc
index 90c7c00952..7b5e54e5ff 100644
--- a/examples/widgets/doc/src/padnavigator.qdoc
+++ b/examples/widgets/doc/src/padnavigator.qdoc
@@ -29,7 +29,9 @@
\example graphicsview/padnavigator
\title Pad Navigator Example
\ingroup examples-graphicsview
- \brief The Pad Navigator Example shows how you can use Graphics View together with
+ \brief Demonstrates how to create animated user interface
+
+ The Pad Navigator Example shows how you can use Graphics View together with
embedded widgets and Qt's \l{State Machine Framework} to create a simple
but useful, dynamic, animated user interface.
diff --git a/examples/xml/doc/images/xmlstreamexample-filemenu.png b/examples/xml/doc/images/xmlstreamexample-filemenu.png
new file mode 100644
index 0000000000..e074fb7c41
--- /dev/null
+++ b/examples/xml/doc/images/xmlstreamexample-filemenu.png
Binary files differ
diff --git a/examples/xml/doc/images/xmlstreamexample-helpmenu.png b/examples/xml/doc/images/xmlstreamexample-helpmenu.png
new file mode 100644
index 0000000000..0dc4392b94
--- /dev/null
+++ b/examples/xml/doc/images/xmlstreamexample-helpmenu.png
Binary files differ
diff --git a/examples/xml/doc/images/xmlstreamexample-screenshot.png b/examples/xml/doc/images/xmlstreamexample-screenshot.png
new file mode 100644
index 0000000000..bbaa423061
--- /dev/null
+++ b/examples/xml/doc/images/xmlstreamexample-screenshot.png
Binary files differ
diff --git a/examples/xml/doc/src/qxmlstreambookmarks.qdoc b/examples/xml/doc/src/qxmlstreambookmarks.qdoc
new file mode 100644
index 0000000000..dd7708a290
--- /dev/null
+++ b/examples/xml/doc/src/qxmlstreambookmarks.qdoc
@@ -0,0 +1,194 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example xml/streambookmarks
+ \title QXmlStream Bookmarks Example
+ \brief Demonstrates how to read and write to XBEL files
+ \ingroup xml-examples
+
+ The QXmlStream Bookmarks example provides a reader for XML Bookmark
+ Exchange Language (XBEL) files using Qt's QXmlStreamReader class
+ for reading, and QXmlStreamWriter class for writing the files.
+
+ \image xmlstreamexample-screenshot.png
+
+ \section1 XbelWriter Class Definition
+
+ The \c XbelWriter class contains a private instance of QXmlStreamWriter,
+ which provides an XML writer with a streaming API. \c XbelWriter also
+ has a reference to the QTreeWidget instance where the bookmark hierarchy
+ is stored.
+
+ \snippet streambookmarks/xbelwriter.h 0
+
+ \section1 XbelWriter Class Implementation
+
+ The \c XbelWriter constructor accepts a \a treeWidget to initialize within
+ its definition. We enable \l{QXmlStreamWriter}'s auto-formatting property
+ to ensure line-breaks and indentations are added automatically to empty
+ sections between elements, increasing readability as the data is split into
+ several lines.
+
+ \snippet streambookmarks/xbelwriter.cpp 0
+
+ The \c writeFile() function accepts a QIODevice object and sets it using
+ \c setDevice(). This function then writes the document type
+ definition(DTD), the start element, the version, and \c{treeWidget}'s
+ top-level items.
+
+ \snippet streambookmarks/xbelwriter.cpp 1
+
+ The \c writeItem() function accepts a QTreeWidgetItem object and writes it
+ to the stream, depending on its \c tagName, which can either be a "folder",
+ "bookmark", or "separator".
+
+ \snippet streambookmarks/xbelwriter.cpp 2
+
+ \section1 XbelReader Class Definition
+
+ The \c XbelReader contains a private instance of QXmlStreamReader, the
+ companion class to QXmlStreamWriter. \c XbelReader also contains a
+ reference to the QTreeWidget that is used to group the bookmarks according
+ to their hierarchy.
+
+ \snippet streambookmarks/xbelreader.h 0
+
+ \section1 XbelReader Class Implementation
+
+ The \c XbelReader constructor accepts a QTreeWidget to initialize the
+ \c treeWidget within its definition. A QStyle object is used to set
+ \c{treeWidget}'s style property. The \c folderIcon is set to QIcon::Normal
+ mode where the pixmap is only displayed when the user is not interacting
+ with the icon. The QStyle::SP_DirClosedIcon, QStyle::SP_DirOpenIcon, and
+ QStyle::SP_FileIcon correspond to standard pixmaps that follow the style
+ of your GUI.
+
+ \snippet streambookmarks/xbelreader.cpp 0
+
+ The \c read() function accepts a QIODevice and sets it using
+ \l{QXmlStreamReader::}{setDevice()}. The actual process of reading only
+ takes place if the file is a valid XBEL 1.0 file. Note that the XML input
+ needs to be well-formed to be accepted by QXmlStreamReader. Otherwise, the
+ \l{QXmlStreamReader::}{raiseError()} function is used to display an error
+ message. Since the XBEL reader is only concerned with reading XML elements,
+ it makes extensive use of the \l{QXmlStreamReader::}{readNextStartElement()}
+ convenience function.
+
+ \snippet streambookmarks/xbelreader.cpp 1
+
+ The \c errorString() function is used if an error occurred, in order to
+ obtain a description of the error complete with line and column number
+ information.
+
+ \snippet streambookmarks/xbelreader.cpp 2
+
+ The \c readXBEL() function reads the name of a startElement and calls
+ the appropriate function to read it, depending on whether if its a
+ "folder", "bookmark" or "separator". Otherwise, it calls
+ \l{QXmlStreamReader::}{skipCurrentElement()}. The Q_ASSERT() macro is used
+ to provide a pre-condition for the function.
+
+ \snippet streambookmarks/xbelreader.cpp 3
+
+ The \c readTitle() function reads the bookmark's title.
+
+ \snippet streambookmarks/xbelreader.cpp 4
+
+ The \c readSeparator() function creates a separator and sets its flags.
+ The text is set to 30 "0xB7", the HEX equivalent for period. The element
+ is then skipped using \l{QXmlStreamReader::}{skipCurrentElement()}.
+
+ \snippet streambookmarks/xbelreader.cpp 5
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class is a subclass of QMainWindow, with a
+ \c File menu and a \c Help menu.
+
+ \snippet streambookmarks/mainwindow.h 0
+
+ \section1 MainWindow Class Implementation
+
+ The \c MainWindow constructor instantiates the QTreeWidget object, \c
+ treeWidget and sets its header with a QStringList object, \c labels.
+ The constructor also invokes \c createActions() and \c createMenus()
+ to set up the menus and their corresponding actions. The \c statusBar()
+ is used to display the message "Ready" and the window's size is fixed
+ to 480x320 pixels.
+
+ \snippet streambookmarks/mainwindow.cpp 0
+
+ The \c open() function enables the user to open an XBEL file using
+ QFileDialog::getOpenFileName(). A warning message is displayed along
+ with the \c fileName and \c errorString if the file cannot be read or
+ if there is a parse error.
+
+ \snippet streambookmarks/mainwindow.cpp 1
+
+ The \c saveAs() function displays a QFileDialog, prompting the user for
+ a \c fileName using QFileDialog::getSaveFileName(). Similar to the
+ \c open() function, this function also displays a warning message if
+ the file cannot be written to.
+
+ \snippet streambookmarks/mainwindow.cpp 2
+
+ The \c about() function displays a QMessageBox with a brief description
+ of the example.
+
+ \snippet streambookmarks/mainwindow.cpp 3
+
+ In order to implement the \c open(), \c saveAs(), \c exit(), \c about()
+ and \c aboutQt() functions, we connect them to QAction objects and
+ add them to the \c fileMenu and \c helpMenu. The connections are as shown
+ below:
+
+ \snippet streambookmarks/mainwindow.cpp 4
+
+ The \c createMenus() function creates the \c fileMenu and \c helpMenu
+ and adds the QAction objects to them in order to create the menu shown
+ in the screenshot below:
+
+ \table
+ \row
+ \li \inlineimage xmlstreamexample-filemenu.png
+ \li \inlineimage xmlstreamexample-helpmenu.png
+ \endtable
+
+ \snippet streambookmarks/mainwindow.cpp 5
+
+ \section1 \c{main()} Function
+
+ The \c main() function instantiates \c MainWindow and invokes the \c show()
+ function.
+
+ \snippet streambookmarks/main.cpp 0
+
+ See the \l{http://pyxml.sourceforge.net/topics/xbel/}
+ {XML Bookmark Exchange Language Resource Page} for more information
+ about XBEL files.
+*/
diff --git a/examples/xml/doc/src/saxbookmarks.qdoc b/examples/xml/doc/src/saxbookmarks.qdoc
index 9ed7611184..d45549bc1e 100644
--- a/examples/xml/doc/src/saxbookmarks.qdoc
+++ b/examples/xml/doc/src/saxbookmarks.qdoc
@@ -28,13 +28,14 @@
/*!
\example saxbookmarks
\title SAX Bookmarks Example
+ \brief Demonstrates how to read XBEL files
+ \ingroup xml-examples
- \brief The SAX Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL)
- files that uses Qt's SAX-based API to read and parse the files. The DOM Bookmarks
+ This example uses Qt's SAX API to read and parse the files. The DOM Bookmarks
example provides an alternative way to read this type of file.
\image saxbookmarks-example.png
See the \l{XML Bookmark Exchange Language Resource Page} for more
- information about XBEL files.
+ information about XBEL files.
*/