diff options
author | Cristian Maureira-Fredes <[email protected]> | 2021-03-16 23:39:14 +0100 |
---|---|---|
committer | Cristian Maureira-Fredes <[email protected]> | 2021-03-17 19:58:09 +0000 |
commit | d97aedf37809c479ab409c4247b60c0cfcef35d6 (patch) | |
tree | bfa7b0a808aa1dda73135eea348b852f997e0419 /examples | |
parent | 4750fbcb8e5d1f0137a8660ffa77f595dac46504 (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
Pick-to: 6.0
Change-Id: I239a24fa4e4f970540857ba8b33b9b13c18142b1
Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png | bin | 0 -> 37147 bytes | |||
-rw-r--r-- | examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst | 58 | ||||
-rw-r--r-- | examples/widgets/dialogs/classwizard/doc/classwizard.png | bin | 0 -> 57931 bytes | |||
-rw-r--r-- | examples/widgets/dialogs/classwizard/doc/classwizard.rst | 11 | ||||
-rw-r--r-- | examples/widgets/itemviews/stardelegate/doc/stardelegate.png | bin | 0 -> 22482 bytes | |||
-rw-r--r-- | examples/widgets/itemviews/stardelegate/doc/stardelegate.rst | 10 |
6 files changed, 79 insertions, 0 deletions
diff --git a/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png Binary files differnew file mode 100644 index 000000000..27c3daa09 --- /dev/null +++ b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.png diff --git a/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst new file mode 100644 index 000000000..d8f5deb8d --- /dev/null +++ b/examples/webenginewidgets/tabbedbrowser/doc/tabbedbrowser.rst @@ -0,0 +1,58 @@ +********************** +Web Browser Example +********************** + +The example demonstrates the power and simplicity offered by |project| to developers. +It uses several |pymodname| submodules to offer a fluid and modern-looking UI that +is apt for a web browser. The application offers the following features: + + * Tab-based browsing experience using QTabWidget. + * Download manager using a QProgressBar and QWebEngineDownloadItem. + * Bookmark manager using QTreeView. + +.. 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 +sections, these different parts are discussed briefly to help you understand the Python code behind +them a little better. + +BookmarkWidget or :code:`bookmarkwidget.py` +=========================================== + +This widget docks to the left of the main window by default. It inherits QTreeView and +loads a default set of bookmarks using a QStandardItemModel. The model is populated at startup +from a JSON file, which is updated when you add or remove bookmarks from the tree view. + +.. automodule:: bookmarkwidget + :members: + +DownloadWidget or :code:`downloadwidget.py` +============================================= + +The widget tracks progress of the download item. It inherits QProgressBar to display +progress of the QWebEngineDownloadItem instance, and offers a context-menu with actions such as Launch, +Show in folder, Cancel, and Remove. + +.. automodule:: downloadwidget + :members: + +BrowserTabWidget or :code:`browsertabwidget.py` +=============================================== + +The widget includes a QWebEngineView to enable viewing web content. It docks to the right +of BookmarkWidget in the main window. + +.. automodule:: browsertabwidget + :members: + +MainWindow or :code:`main.py` +============================= + +This is the parent window that collates all the other widgets together to offer the complete package. + +.. automodule:: main + :members: + + +Try running the example to explore it further. diff --git a/examples/widgets/dialogs/classwizard/doc/classwizard.png b/examples/widgets/dialogs/classwizard/doc/classwizard.png Binary files differnew file mode 100644 index 000000000..1706772d8 --- /dev/null +++ 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/examples/widgets/itemviews/stardelegate/doc/stardelegate.png b/examples/widgets/itemviews/stardelegate/doc/stardelegate.png Binary files differnew file mode 100644 index 000000000..343416397 --- /dev/null +++ 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 |