Making trivial snippets inline
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Mon, 20 Aug 2012 13:17:13 +0000 (15:17 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 21 Aug 2012 11:41:01 +0000 (13:41 +0200)
Change-Id: I8d8b5586579d3ee460b234b5a09462586ac1cfd0
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 files changed:
doc/src/snippets/code/doc_src_examples_application.qdoc [deleted file]
doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp [deleted file]
doc/src/snippets/code/doc_src_examples_icons.cpp [deleted file]
doc/src/snippets/code/doc_src_examples_icons.qdoc [deleted file]
doc/src/snippets/code/doc_src_examples_imageviewer.cpp [deleted file]
doc/src/snippets/code/doc_src_examples_imageviewer.qdoc [deleted file]
doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc [deleted file]
examples/widgets/doc/application.qdoc
examples/widgets/doc/editabletreemodel.qdoc
examples/widgets/doc/icons.qdoc
examples/widgets/doc/imageviewer.qdoc
examples/widgets/doc/simpletreemodel.qdoc

diff --git a/doc/src/snippets/code/doc_src_examples_application.qdoc b/doc/src/snippets/code/doc_src_examples_application.qdoc
deleted file mode 100644 (file)
index 920a096..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-application -style=windows
-application -style=motif
-application -style=cde
-//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp b/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
deleted file mode 100644 (file)
index 9a92be2..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-QVariant a = model->index(0, 0, QModelIndex()).data();
-//! [0]
-
-
-//! [1]
-QVariant b = model->index(1, 0, QModelIndex()).data();
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_icons.cpp b/doc/src/snippets/code/doc_src_examples_icons.cpp
deleted file mode 100644 (file)
index 4532e12..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-if (!condition)
-     qFatal("ASSERT: "condition" in file ...");
-//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_icons.qdoc b/doc/src/snippets/code/doc_src_examples_icons.qdoc
deleted file mode 100644 (file)
index added6c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [1]
-qmake "CONFIG += debug" icons.pro
-//! [1]
-
-
-//! [2]
-qmake "CONFIG += release" icons.pro
-//! [2]
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.cpp b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
deleted file mode 100644 (file)
index 6ff3673..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-imageLabel->resize(imageLabel->pixmap()->size());
-//! [0]
-
-
-//! [1]
-if (!imageLabel->pixmap())
-     qFatal("ASSERT: "imageLabel->pixmap()" in file ...");
-//! [1]
-
-
-//! [4]
-scrollBar->setValue(int(factor * scrollBar->value()));
-//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
deleted file mode 100644 (file)
index aae7055..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [2]
-qmake "CONFIG += debug" foo.pro
-//! [2]
-
-
-//! [3]
-qmake "CONFIG += release" foo.pro
-//! [3]
diff --git a/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc
deleted file mode 100644 (file)
index 4f8865b..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [0]
-Getting Started                         How to familiarize yourself with Qt Designer
-    Launching Designer                  Running the Qt Designer application
-    The User Interface                  How to interact with Qt Designer
-//! [0]
-
-
-//! [1]
-Connection Editing Mode                 Connecting widgets together with signals and slots
-    Connecting Objects                  Making connections in Qt Designer
-    Editing Connections                 Changing existing connections
-//! [1]
index d99581f..4c537e2 100644 (file)
     side of the menu bar. Try running the application with various
     styles and see the results:
 
-    \snippet doc/src/snippets/code/doc_src_examples_application.qdoc 0
+    \code
+    application -style=windows
+    application -style=motif
+    application -style=cde
+    \endcode
 
     Let's now review the toolbars:
 
index 423b9ce..24745b7 100644 (file)
     In the case shown in the diagram, the piece of information represented
     by \b{a} can be obtained using the standard model/view API:
 
-    \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 0
+    \code
+    QVariant a = model->index(0, 0, QModelIndex()).data();
+    \endcode
 
     Since each items holds pieces of data for each column in a given row,
     there can be many model indexes that map to the same \c TreeItem object.
     For example, the information represented by \b{b} can be obtained
     using the following code:
 
-    \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 1
+    \code
+    QVariant b = model->index(1, 0, QModelIndex()).data();
+    \endcode
 
     The same underlying \c TreeItem would be accessed to obtain information
     for the other model indexes in the same row as \b{b}.
index 2ccf8ca..b6625db 100644 (file)
     If the application is built in debug mode, the \c Q_ASSERT()
     macro will expand to
 
-    \snippet doc/src/snippets/code/doc_src_examples_icons.cpp 0
+    \code
+    if (!condition)
+       qFatal("ASSERT: "condition" in file ...");
+    \endcode
 
     In release mode, the macro simply disappear. The mode can be set
     in the application's \c .pro file. One way to do so is to add an
     option to \c qmake when building the application:
 
-    \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 1
+    \code
+    qmake "CONFIG += debug" icons.pro
+    \endcode
 
     or
 
-    \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 2
+    \code
+    qmake "CONFIG += release" icons.pro
+    \endcode
 
     Another approach is to add this line directly to the \c .pro
     file.
index 8f8e238..3556d52 100644 (file)
     \{QWidget::adjustSize()}{adjustSize()} to achieve this, which is
     essentially the same as
 
-    \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 0
+    \code
+    imageLabel->resize(imageLabel->pixmap()->size());
+    \endcode
 
     In the \c print() slot, we first make sure that an image has been
     loaded into the application:
     If the application is built in debug mode, the \c Q_ASSERT() macro
     will expand to
 
-    \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 1
+    \code
+    if (!imageLabel->pixmap())
+        qFatal("ASSERT: "imageLabel->pixmap()" in file ...");
+    \endcode
 
     In release mode, the macro simply disappear. The mode can be set
     in the application's \c .pro file. One way to do so is to add an
     option to \uicontrol qmake when building the application:
 
-    \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 2
+    \code
+    qmake "CONFIG += debug" foo.pro
+    \endcode
 
     or
 
-    \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 3
+    \code
+    qmake "CONFIG += release" foo.pro
+    \endcode
 
     Another approach is to add this line directly to the \c .pro
     file.
     Whenever we zoom in or out, we need to adjust the scroll bars in
     consequence. It would have been tempting to simply call
 
-    \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 4
+    \code
+    scrollBar->setValue(int(factor * scrollBar->value()));
+    \endcode
 
     but this would make the top-left corner the focal point, not the
     center. Therefore we need to take into account the scroll bar
index a2b6010..c054352 100644 (file)
 
     We begin with a text file in the following format:
 
-    \snippet doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc 0
+    \code
+    Getting Started                         How to familiarize yourself with Qt Designer
+        Launching Designer                  Running the Qt Designer application
+        The User Interface                  How to interact with Qt Designer
+    \endcode
     \dots
-    \snippet doc/src/snippets/code/doc_src_examples_simpletreemodel.qdoc 1
+    \code
+    Connection Editing Mode                 Connecting widgets together with signals and slots
+        Connecting Objects                  Making connections in Qt Designer
+        Editing Connections                 Changing existing connections
+    \endcode
 
     We process the text file with the following two rules: