diff options
author | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-03-16 23:39:14 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-03-17 21:51:46 +0000 |
commit | dc3e4a064ee7e88e0950b860f8d0aa7557fb6f5c (patch) | |
tree | 65b2c51d5e3d03f7771efc3ee83672b058162e6c | |
parent | 5810a773a1e7ebcba77de76dcd701d45032be8b9 (diff) |
doc: migrate qdoc approach to document examples
There were two previous documented examples using the approach
based on qdoc: stardelegate, and classwizard.
This patch moves them into the 'doc/' directory for each example,
and partially revert the changes from
308157f01260c640e21f6972619d3b380c007acb
Additionally, an unrelated screenshot was moved to a new general
'images/' directory.
Task-number: PYSIDE-1112
Change-Id: I239a24fa4e4f970540857ba8b33b9b13c18142b1
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit d97aedf37809c479ab409c4247b60c0cfcef35d6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
15 files changed, 23 insertions, 154 deletions
diff --git a/sources/pyside6/doc/examples/images/tabbedbrowser.png b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png Binary files differindex 27c3daa09..27c3daa09 100644 --- a/sources/pyside6/doc/examples/images/tabbedbrowser.png +++ b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png diff --git a/sources/pyside6/doc/examples/tabbedbrowser.rst b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst index c34c50647..d8f5deb8d 100644 --- a/sources/pyside6/doc/examples/tabbedbrowser.rst +++ b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst @@ -10,7 +10,7 @@ is apt for a web browser. The application offers the following features: * Download manager using a QProgressBar and QWebEngineDownloadItem. * Bookmark manager using QTreeView. -.. image:: images/tabbedbrowser.png +.. image:: tabbedbrowser.png The application's code is organized in several parts for ease of maintenance. For example, :code:`DownloadWidget` provides a widget to track progress of a download item. In the following diff --git a/sources/pyside6/doc/pyside-examples/images/pysideexample-classwizard.png b/examples/widgets/dialogs/classwizard/doc/classwizard.png Binary files differindex 1706772d8..1706772d8 100644 --- a/sources/pyside6/doc/pyside-examples/images/pysideexample-classwizard.png +++ b/examples/widgets/dialogs/classwizard/doc/classwizard.png diff --git a/examples/widgets/dialogs/classwizard/doc/classwizard.rst b/examples/widgets/dialogs/classwizard/doc/classwizard.rst new file mode 100644 index 000000000..a6959c6e2 --- /dev/null +++ b/examples/widgets/dialogs/classwizard/doc/classwizard.rst @@ -0,0 +1,11 @@ +Classwizard Example +=================== + +Demonstrates the use of QDialog in a wizard application + +This example demonstrates the use a custom QDialog in a wizard, +which generates necessary C++ class template code. + +.. image:: classwizard.png + :width: 400 + :alt: classwizard screenshot diff --git a/sources/pyside6/doc/pyside-examples/images/pysideexample-stardelegate.png b/examples/widgets/itemviews/stardelegate/doc/stardelegate.png Binary files differindex 343416397..343416397 100644 --- a/sources/pyside6/doc/pyside-examples/images/pysideexample-stardelegate.png +++ b/examples/widgets/itemviews/stardelegate/doc/stardelegate.png diff --git a/examples/widgets/itemviews/stardelegate/doc/stardelegate.rst b/examples/widgets/itemviews/stardelegate/doc/stardelegate.rst new file mode 100644 index 000000000..fe8a2732a --- /dev/null +++ b/examples/widgets/itemviews/stardelegate/doc/stardelegate.rst @@ -0,0 +1,10 @@ +Star Delegate Example +===================== + +Demonstrates Qt's itemview architecture + +This example demonstrates the Qt model view architecture. + +.. image:: stardelegate.png + :width: 400 + :alt: Star Delegate Screenshot diff --git a/sources/pyside6/doc/CMakeLists.txt b/sources/pyside6/doc/CMakeLists.txt index 634ebb252..a8d81a772 100644 --- a/sources/pyside6/doc/CMakeLists.txt +++ b/sources/pyside6/doc/CMakeLists.txt @@ -97,11 +97,6 @@ if (FULLDOCSBUILD) endif() endforeach() - #Appending the additional qdocconf that describes the pyside-examples - #doc project. - configure_file("qtmodules/pyside-examples.qdocconf.in" "${CMAKE_CURRENT_LIST_DIR}/qtmodules/pyside-examples.qdocconf" @ONLY) - file(APPEND "pyside.qdocconf.in" "\@CMAKE_CURRENT_LIST_DIR\@/qtmodules/pyside-examples.qdocconf\n") - set(typeSystemDocXmlContents "${typeSystemDocXmlContents}\n</typesystem>\n") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml" "${typeSystemDocXmlContents}") diff --git a/sources/pyside6/doc/additionaldocs.lst b/sources/pyside6/doc/additionaldocs.lst index e6ffe7e5d..037cb60f7 100644 --- a/sources/pyside6/doc/additionaldocs.lst +++ b/sources/pyside6/doc/additionaldocs.lst @@ -51,18 +51,6 @@ # fi # done # A line enclosed in [] denotes a (relative) target directory -[pyside-examples] -all-pyside-examples.webxml -pysideexamples-widgets-dialogs-classwizard-classwizard-pyproject.webxml -pysideexamples-widgets-dialogs-classwizard-classwizard-py.webxml -pysideexamples-widgets-dialogs-classwizard-classwizard-qrc.webxml -pysideexamples-widgets-dialogs-classwizard-classwizard-rc-py.webxml -pysideexamples-widgets-dialogs-classwizard-example.webxml -pysideexamples-widgets-itemviews-stardelegate-example.webxml -pysideexamples-widgets-itemviews-stardelegate-stardelegate-pyproject.webxml -pysideexamples-widgets-itemviews-stardelegate-stardelegate-py.webxml -pysideexamples-widgets-itemviews-stardelegate-stareditor-py.webxml -pysideexamples-widgets-itemviews-stardelegate-starrating-py.webxml [overviews] animation-overview.webxml diff --git a/sources/pyside6/doc/pyside-examples/images/screenshot_hello.png b/sources/pyside6/doc/images/screenshot_hello.png Binary files differindex 41ebbf01b..41ebbf01b 100644 --- a/sources/pyside6/doc/pyside-examples/images/screenshot_hello.png +++ b/sources/pyside6/doc/images/screenshot_hello.png diff --git a/sources/pyside6/doc/pyside-examples/examples.qdoc b/sources/pyside6/doc/pyside-examples/examples.qdoc deleted file mode 100644 index 116ed65bb..000000000 --- a/sources/pyside6/doc/pyside-examples/examples.qdoc +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \group all-pyside-examples - \title All Qt for Python Examples - \brief A varied selection of examples can be found in the 'examples' directory of the - pyside-setup repository. This can be accessed after installing - PySide6 via pip, checking the 'site-packages/PySide6/examples' directory. - - This page aims to document the most important use cases of the module - and it will be extended with each release. -*/ diff --git a/sources/pyside6/doc/pyside-examples/pyside-classwizard.qdoc b/sources/pyside6/doc/pyside-examples/pyside-classwizard.qdoc deleted file mode 100644 index edfd68fd5..000000000 --- a/sources/pyside6/doc/pyside-examples/pyside-classwizard.qdoc +++ /dev/null @@ -1,39 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example widgets/dialogs/classwizard - \title PySide6.QtWidgets - Classwizard Example - \ingroup all-pyside-examples - \brief Demonstrates the use of QDialog in a wizard application - - This example demonstrates the use a custom QDialog in a wizard, - which generates necessary C++ class template code. - - \image pysideexample-classwizard.png - -*/ diff --git a/sources/pyside6/doc/pyside-examples/pyside-stardelegate.qdoc b/sources/pyside6/doc/pyside-examples/pyside-stardelegate.qdoc deleted file mode 100644 index 6251ff3e1..000000000 --- a/sources/pyside6/doc/pyside-examples/pyside-stardelegate.qdoc +++ /dev/null @@ -1,39 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** 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 The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/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: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example widgets/itemviews/stardelegate - \title PySide6.QtWidgets - Star Delegate Example - \ingroup all-pyside-examples - \brief Demonstrates Qt's itemview architecture - - This example demonstrates the itemview architecture, which - is unique to Qt. - - \image pysideexample-stardelegate.png -*/ - diff --git a/sources/pyside6/doc/qtmodules/pyside-examples.qdocconf.in b/sources/pyside6/doc/qtmodules/pyside-examples.qdocconf.in deleted file mode 100644 index 349c7f0f7..000000000 --- a/sources/pyside6/doc/qtmodules/pyside-examples.qdocconf.in +++ /dev/null @@ -1,12 +0,0 @@ -include(@QT_SRC_DIR@/doc/global/qt-module-defaults.qdocconf) - -project = PysideExamples -description = Qt for Python Examples -version = $QT_VERSION - -sourcedirs += @CMAKE_CURRENT_SOURCE_DIR@/pyside-examples -exampledirs = @CMAKE_CURRENT_SOURCE_DIR@/../../../examples -examples.fileextensions += *.py *.pyproject -imagedirs += @CMAKE_CURRENT_SOURCE_DIR@/pyside-examples/images -url.examples = "https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/\1?h=$QT_VER" -include(../pyside-config.qdocconf) diff --git a/sources/pyside6/doc/quickstart.rst b/sources/pyside6/doc/quickstart.rst index 14d1c03a0..8cdd46053 100644 --- a/sources/pyside6/doc/quickstart.rst +++ b/sources/pyside6/doc/quickstart.rst @@ -116,5 +116,5 @@ guide you through the development process: Try clicking the button at the bottom to see which greeting you get. - .. image:: pyside-examples/images/screenshot_hello.png + .. image:: images/screenshot_hello.png :alt: Hello World application diff --git a/tools/example_gallery/main.py b/tools/example_gallery/main.py index 0ec5f9f66..a55e0f27b 100644 --- a/tools/example_gallery/main.py +++ b/tools/example_gallery/main.py @@ -267,14 +267,6 @@ if __name__ == "__main__": A collection of examples are provided with |project| to help new users to understand different use cases of the module. - .. toctree:: - :maxdepth: 1 - - tabbedbrowser.rst - - Gallery - ------- - You can find all these examples inside the ``pyside-setup`` on the ``examples`` directory, or you can access them after installing |pymodname| from ``pip`` inside the ``site-packages/PySide6/examples`` directory. |