From 688176a3c35f49c7c087ca2f0e8c841e72133176 Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Thu, 7 Nov 2019 09:54:13 +0100 Subject: Doc: Drop PySide prefix from the RST filenames Shiboken appends the content in these RSTs to the module index pages that it generates. In addition, - updated the snippets, extras, and additional docs passed to the Shiboken call. - moved the copy_directory command right before the shiboken call. Change-Id: I45222ba7d0798105a764d7692d466f7a2a105d77 Reviewed-by: Cristian Maureira-Fredes Reviewed-by: Friedemann Kleint --- sources/pyside2/doc/CMakeLists.txt | 8 +- .../pyside2/doc/extras/PySide.QtCore.ClassInfo.rst | 23 ------ .../pyside2/doc/extras/PySide.QtCore.Signal.rst | 39 --------- sources/pyside2/doc/extras/PySide.QtCore.Slot.rst | 39 --------- sources/pyside2/doc/extras/PySide.QtCore.rst | 5 -- sources/pyside2/doc/extras/PySide.QtGui.rst | 7 -- sources/pyside2/doc/extras/PySide.QtHelp.rst | 5 -- sources/pyside2/doc/extras/PySide.QtMultimedia.rst | 7 -- sources/pyside2/doc/extras/PySide.QtNetwork.rst | 5 -- sources/pyside2/doc/extras/PySide.QtOpenGL.rst | 14 ---- sources/pyside2/doc/extras/PySide.QtScript.rst | 21 ----- .../pyside2/doc/extras/PySide.QtScriptTools.rst | 5 -- sources/pyside2/doc/extras/PySide.QtSql.rst | 5 -- sources/pyside2/doc/extras/PySide.QtSvg.rst | 5 -- sources/pyside2/doc/extras/PySide.QtTest.rst | 7 -- sources/pyside2/doc/extras/PySide.QtUiTools.rst | 9 --- sources/pyside2/doc/extras/PySide.QtWebKit.rst | 94 ---------------------- sources/pyside2/doc/extras/PySide.QtXml.rst | 5 -- .../pyside2/doc/extras/PySide.QtXmlPatterns.rst | 12 --- sources/pyside2/doc/extras/QtCore.ClassInfo.rst | 23 ++++++ sources/pyside2/doc/extras/QtCore.Signal.rst | 39 +++++++++ sources/pyside2/doc/extras/QtCore.Slot.rst | 39 +++++++++ sources/pyside2/doc/extras/QtCore.rst | 5 ++ sources/pyside2/doc/extras/QtGui.rst | 7 ++ sources/pyside2/doc/extras/QtHelp.rst | 5 ++ sources/pyside2/doc/extras/QtMultimedia.rst | 7 ++ sources/pyside2/doc/extras/QtNetwork.rst | 5 ++ sources/pyside2/doc/extras/QtOpenGL.rst | 14 ++++ sources/pyside2/doc/extras/QtScript.rst | 21 +++++ sources/pyside2/doc/extras/QtScriptTools.rst | 5 ++ sources/pyside2/doc/extras/QtSql.rst | 5 ++ sources/pyside2/doc/extras/QtSvg.rst | 5 ++ sources/pyside2/doc/extras/QtTest.rst | 7 ++ sources/pyside2/doc/extras/QtUiTools.rst | 9 +++ sources/pyside2/doc/extras/QtWebKit.rst | 94 ++++++++++++++++++++++ sources/pyside2/doc/extras/QtXml.rst | 5 ++ sources/pyside2/doc/extras/QtXmlPatterns.rst | 12 +++ .../shiboken2/generator/qtdoc/qtdocgenerator.cpp | 12 ++- 38 files changed, 321 insertions(+), 313 deletions(-) delete mode 100644 sources/pyside2/doc/extras/PySide.QtCore.ClassInfo.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtCore.Signal.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtCore.Slot.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtCore.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtGui.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtHelp.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtMultimedia.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtNetwork.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtOpenGL.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtScript.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtScriptTools.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtSql.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtSvg.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtTest.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtUiTools.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtWebKit.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtXml.rst delete mode 100644 sources/pyside2/doc/extras/PySide.QtXmlPatterns.rst create mode 100644 sources/pyside2/doc/extras/QtCore.ClassInfo.rst create mode 100644 sources/pyside2/doc/extras/QtCore.Signal.rst create mode 100644 sources/pyside2/doc/extras/QtCore.Slot.rst create mode 100644 sources/pyside2/doc/extras/QtCore.rst create mode 100644 sources/pyside2/doc/extras/QtGui.rst create mode 100644 sources/pyside2/doc/extras/QtHelp.rst create mode 100644 sources/pyside2/doc/extras/QtMultimedia.rst create mode 100644 sources/pyside2/doc/extras/QtNetwork.rst create mode 100644 sources/pyside2/doc/extras/QtOpenGL.rst create mode 100644 sources/pyside2/doc/extras/QtScript.rst create mode 100644 sources/pyside2/doc/extras/QtScriptTools.rst create mode 100644 sources/pyside2/doc/extras/QtSql.rst create mode 100644 sources/pyside2/doc/extras/QtSvg.rst create mode 100644 sources/pyside2/doc/extras/QtTest.rst create mode 100644 sources/pyside2/doc/extras/QtUiTools.rst create mode 100644 sources/pyside2/doc/extras/QtWebKit.rst create mode 100644 sources/pyside2/doc/extras/QtXml.rst create mode 100644 sources/pyside2/doc/extras/QtXmlPatterns.rst diff --git a/sources/pyside2/doc/CMakeLists.txt b/sources/pyside2/doc/CMakeLists.txt index 9d5a5a0a8..ee0fc0c51 100644 --- a/sources/pyside2/doc/CMakeLists.txt +++ b/sources/pyside2/doc/CMakeLists.txt @@ -96,7 +96,6 @@ add_custom_target(qdoc SOURCE "pyside.qdocconf") add_custom_target(apidoc - COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b html ${CMAKE_CURRENT_BINARY_DIR}/rst html #copying shiboken2 (including ApiExtractor) doc htmls COMMENT "Copying over the Shiboken2 doc HTMLs..." @@ -110,6 +109,7 @@ add_custom_target(apidoc configure_file("conf.py.in" "rst/conf.py" @ONLY) add_custom_target("docrsts" + COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst COMMAND Shiboken2::shiboken2 --generator-set=qtdoc ${docHeader} --include-paths="${QT_INCLUDE_DIR}${PATH_SEP}${pyside2_SOURCE_DIR}${PATH_SEP}${TS_ROOT}" --api-version=${SUPPORTED_QT_VERSION} @@ -117,9 +117,9 @@ add_custom_target("docrsts" --library-source-dir=${QT_SRC_DIR} --documentation-data-dir=${DOC_DATA_DIR}/webxml --output-directory=${CMAKE_CURRENT_BINARY_DIR}/rst - --documentation-code-snippets-dir=${CMAKE_CURRENT_SOURCE_DIR}/codesnippets/doc/src/snippets${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}/codesnippets/examples - --documentation-extra-sections-dir=${CMAKE_CURRENT_SOURCE_DIR}/extras - --additional-documentation=${CMAKE_CURRENT_LIST_DIR}/additionaldocs.lst + --documentation-code-snippets-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/doc/src/snippets${PATH_SEP}${CMAKE_CURRENT_BINARY_DIR}/rst/codesnippets/examples + --documentation-extra-sections-dir=${CMAKE_CURRENT_BINARY_DIR}/rst/extras + --additional-documentation=${CMAKE_CURRENT_BINARY_DIR}/rst/additionaldocs.lst ${CMAKE_CURRENT_BINARY_DIR}/typesystem_doc.xml WORKING_DIRECTORY ${${module}_SOURCE_DIR} COMMENT "Running generator to generate documentation..." diff --git a/sources/pyside2/doc/extras/PySide.QtCore.ClassInfo.rst b/sources/pyside2/doc/extras/PySide.QtCore.ClassInfo.rst deleted file mode 100644 index d2267be9c..000000000 --- a/sources/pyside2/doc/extras/PySide.QtCore.ClassInfo.rst +++ /dev/null @@ -1,23 +0,0 @@ -.. module:: PySide2.QtCore -.. _ClassInfo: - -ClassInfo -********* - -This class is used to associates extra information to the class, which is available -using QObject.metaObject(). Qt and PySide doesn't use this information. - -The extra information takes the form of a dictionary with key and value in a literal string. - -.. note:: This Class is a implementation of Q_CLASSINFO macro. - - -Example -------- - -:: - - @ClassInfo(Author='PySide Team', URL='http://www.pyside.org') - class MyObject(QObject): - ... - diff --git a/sources/pyside2/doc/extras/PySide.QtCore.Signal.rst b/sources/pyside2/doc/extras/PySide.QtCore.Signal.rst deleted file mode 100644 index 16c640831..000000000 --- a/sources/pyside2/doc/extras/PySide.QtCore.Signal.rst +++ /dev/null @@ -1,39 +0,0 @@ -.. module:: PySide2.QtCore -.. _Signal: - -Signal -****** - -Synopsis --------- - -Functions -^^^^^^^^^ - -+---------------------------------------------------------------------------------------------+ -|def :meth:`connect` (receiver) | -+---------------------------------------------------------------------------------------------+ -|def :meth:`disconnect` (receiver) | -+---------------------------------------------------------------------------------------------+ -|def :meth:`emit` (\*args) | -+---------------------------------------------------------------------------------------------+ - -Detailed Description --------------------- - - The :class:`~.Signal` class provides a way to declare and connect Qt signals in a pythonic way. - - PySide adopt PyQt's new signal and slot syntax as-is. The PySide implementation is functionally compatible with the PyQt 4.5 one, with the exceptions listed bellow. - -.. method:: Signal.connect(receiver[, type=Qt.AutoConnection]) - - Create a connection between this signal and a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`. - -.. method:: Signal.disconnect(receiver) - - Disconnect this signal from a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`. - -.. method:: Signal.emit(*args) - - `args` is the arguments to pass to any connected slots, if any. - diff --git a/sources/pyside2/doc/extras/PySide.QtCore.Slot.rst b/sources/pyside2/doc/extras/PySide.QtCore.Slot.rst deleted file mode 100644 index 3bc64c03a..000000000 --- a/sources/pyside2/doc/extras/PySide.QtCore.Slot.rst +++ /dev/null @@ -1,39 +0,0 @@ -.. module:: PySide2.QtCore -.. _Slot: - -Slot -**** - -Detailed Description --------------------- - - PySide2 adopt PyQt5's new signal and slot syntax as-is. The PySide2 - implementation is functionally compatible with the PyQt5 one, with the - exceptions listed below. - - PyQt5's new signal and slot style utilizes method and decorator names - specific to their implementation. These will be generalized according to - the table below: - - ======= ======================= ============= - Module PyQt5 factory function PySide2 class - ======= ======================= ============= - QtCore pyqtSignal Signal - QtCore pyqtSlot Slot - ======= ======================= ============= - -Q_INVOKABLE ------------ - - There is no equivalent of the Q_INVOKABLE macro of Qt - since PySide2 slots can actually have return values. - If you need to create a invokable method that returns some value, - declare it as a slot, e.g.: - - :: - - class Foo(QObject): - - @Slot(float, result=int) - def getFloatReturnInt(self, f): - return int(f) diff --git a/sources/pyside2/doc/extras/PySide.QtCore.rst b/sources/pyside2/doc/extras/PySide.QtCore.rst deleted file mode 100644 index d3277a418..000000000 --- a/sources/pyside2/doc/extras/PySide.QtCore.rst +++ /dev/null @@ -1,5 +0,0 @@ -All other Qt modules rely on this module. To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtCore diff --git a/sources/pyside2/doc/extras/PySide.QtGui.rst b/sources/pyside2/doc/extras/PySide.QtGui.rst deleted file mode 100644 index e16329c38..000000000 --- a/sources/pyside2/doc/extras/PySide.QtGui.rst +++ /dev/null @@ -1,7 +0,0 @@ -To include the definitions of modules classes, use the following directive: - -:: - - import PySide2.QtGui - -.. seealso:: :mod:`PySide2.QtCore` diff --git a/sources/pyside2/doc/extras/PySide.QtHelp.rst b/sources/pyside2/doc/extras/PySide.QtHelp.rst deleted file mode 100644 index 239f4faa6..000000000 --- a/sources/pyside2/doc/extras/PySide.QtHelp.rst +++ /dev/null @@ -1,5 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtHelp diff --git a/sources/pyside2/doc/extras/PySide.QtMultimedia.rst b/sources/pyside2/doc/extras/PySide.QtMultimedia.rst deleted file mode 100644 index 5088db4d0..000000000 --- a/sources/pyside2/doc/extras/PySide.QtMultimedia.rst +++ /dev/null @@ -1,7 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtMultimedia - - diff --git a/sources/pyside2/doc/extras/PySide.QtNetwork.rst b/sources/pyside2/doc/extras/PySide.QtNetwork.rst deleted file mode 100644 index 07303b157..000000000 --- a/sources/pyside2/doc/extras/PySide.QtNetwork.rst +++ /dev/null @@ -1,5 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtNetwork diff --git a/sources/pyside2/doc/extras/PySide.QtOpenGL.rst b/sources/pyside2/doc/extras/PySide.QtOpenGL.rst deleted file mode 100644 index 38783d9fd..000000000 --- a/sources/pyside2/doc/extras/PySide.QtOpenGL.rst +++ /dev/null @@ -1,14 +0,0 @@ -OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application must be created with another toolkit, such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms. - -.. note:: OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries. - -The Qt OpenGL module makes it easy to use OpenGL in Qt applications. It provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where you can use the OpenGL API to render the contents. -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtOpenGL - -The Qt OpenGL module is implemented as a platform-independent wrapper around the platform-dependent GLX (version 1.3 or later), WGL, or AGL C APIs. Although the basic functionality provided is very similar to Mark Kilgard's GLUT library, applications using the Qt OpenGL module can take advantage of the whole Qt API for non-OpenGL-specific GUI functionality. - -The QtOpenGL module is available on Windows, X11 and Mac OS X. Qt for Embedded Linux and OpenGL supports OpenGL ES (OpenGL for Embedded Systems). \ No newline at end of file diff --git a/sources/pyside2/doc/extras/PySide.QtScript.rst b/sources/pyside2/doc/extras/PySide.QtScript.rst deleted file mode 100644 index 8ce7681ec..000000000 --- a/sources/pyside2/doc/extras/PySide.QtScript.rst +++ /dev/null @@ -1,21 +0,0 @@ -The QtScript module only provides core scripting facilities; the QtScriptTools module provides additional Qt Script-related components that application developers may find useful. - -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtScript - -License Information -------------------- - -Qt Commercial Edition licensees that wish to distribute applications that use the QtScript module need to be aware of their obligations under the GNU Library General Public License (LGPL). - -Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL. -QtScript is licensed under the GNU Library General Public License. Individual contributor names and copyright dates can be found inline in the code. - -This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. - -You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/sources/pyside2/doc/extras/PySide.QtScriptTools.rst b/sources/pyside2/doc/extras/PySide.QtScriptTools.rst deleted file mode 100644 index a54ed914b..000000000 --- a/sources/pyside2/doc/extras/PySide.QtScriptTools.rst +++ /dev/null @@ -1,5 +0,0 @@ -Applications that use the Qt Script Tools classes need to be configured to be built against the QtScriptTools module. To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtScriptTools diff --git a/sources/pyside2/doc/extras/PySide.QtSql.rst b/sources/pyside2/doc/extras/PySide.QtSql.rst deleted file mode 100644 index fcdd6ba02..000000000 --- a/sources/pyside2/doc/extras/PySide.QtSql.rst +++ /dev/null @@ -1,5 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtSql diff --git a/sources/pyside2/doc/extras/PySide.QtSvg.rst b/sources/pyside2/doc/extras/PySide.QtSvg.rst deleted file mode 100644 index 7817e532f..000000000 --- a/sources/pyside2/doc/extras/PySide.QtSvg.rst +++ /dev/null @@ -1,5 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtSvg diff --git a/sources/pyside2/doc/extras/PySide.QtTest.rst b/sources/pyside2/doc/extras/PySide.QtTest.rst deleted file mode 100644 index 0b89a22d4..000000000 --- a/sources/pyside2/doc/extras/PySide.QtTest.rst +++ /dev/null @@ -1,7 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtTest - -.. note:: All macros in the C++ version of QtTest were not binded in PySide, this module is useful only for GUI testing and benchmarking, for ordinary unit testing you should use the ``unittest`` Python module. diff --git a/sources/pyside2/doc/extras/PySide.QtUiTools.rst b/sources/pyside2/doc/extras/PySide.QtUiTools.rst deleted file mode 100644 index 553224527..000000000 --- a/sources/pyside2/doc/extras/PySide.QtUiTools.rst +++ /dev/null @@ -1,9 +0,0 @@ -These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource file containing a UI file is needed. - -A form loader object, provided by the QUiLoader class, is used to construct the user interface. This user interface can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form stored in a project's resources. The :meth:`PySide2.QtUiTools.QUiLoader.load` function takes the user interface description contained in the file and constructs the form widget. - -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide..QtUiTools diff --git a/sources/pyside2/doc/extras/PySide.QtWebKit.rst b/sources/pyside2/doc/extras/PySide.QtWebKit.rst deleted file mode 100644 index 58f9230a7..000000000 --- a/sources/pyside2/doc/extras/PySide.QtWebKit.rst +++ /dev/null @@ -1,94 +0,0 @@ -QtWebKit provides a Web browser engine that makes it easy to embed content from the World Wide Web into your Qt application. At the same time Web content can be enhanced with native controls. - -QtWebKit provides facilities for rendering of HyperText Markup Language (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and scripted with JavaScript. - -A bridge between the JavaScript execution environment and the Qt object model makes it possible for custom QObjects to be scripted. Integration with the Qt networking module enables Web pages to be transparently loaded from Web servers, the local file system or even the Qt resource system. - -In addition to providing pure rendering features, HTML documents can be made fully editable to the user through the use of the contenteditable attribute on HTML elements. - -QtWebKit is based on the Open Source WebKit engine. More information about WebKit itself can be found on the _`WebKit Open Source Project ` Web site. - -Including In Your Project -------------------------- - -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtWebKit - - -.. note:: Web site icons, also known as "FavIcons", are currently not supported on Windows. We plan to address this in a future release. - -Architecture ------------- - -The easiest way to render content is through the QWebView class. As a widget it can be embedded into your forms or a graphics view, and it provides convenience functions for downloading and rendering web sites. - -:: - - view = QWebView(parent) - view.load(QUrl("http://qt.nokia.com/")) - view.show() - -QWebView is used to view Web pages. An instance of QWebView has one QWebPage. QWebPage provides access to the document structure in a page, describing features such as frames, the navigation history, and the undo/redo stack for editable content. - -HTML documents can be nested using frames in a frameset. An individual frame in HTML is represented using the QWebFrame class. This class includes the bridge to the JavaScript window object and can be painted using QPainter. Each QWebPage has one QWebFrame object as its main frame, and the main frame may contain many child frames. - -Individual elements of an HTML document can be accessed via DOM JavaScript interfaces from within a web page. The equivalent of this API in QtWebKit is represented by QWebElement. QWebElement objects are obtained using QWebFrame's findAllElements() and findFirstElement() functions with CSS selector queries. - -Common web browser features, defaults and other settings can be configured through the QWebSettings class. It is possible to provide defaults for all QWebPage instances through the default settings. Individual attributes can be overidden by the page specific settings object. - -Netscape Plugin Support ------------------------ - -.. note:: Netscape plugin support is only available on desktop platforms. - -Since WebKit supports the Netscape Plugin API, Qt applications can display Web pages that embed common plugins on platforms for which those plugins are available. To enable plugin support, the user must have the appropriate binary files for those plugins installed and the ``QWebSettings.PluginsEnabled`` attribute must be enabled for the application. - -The following locations are searched for plugins: - -* Linux/Unix (X11) - * .mozilla/plugins in the user's home directory - * .netscape/plugins in the user's home directory - * System locations, such as - * /usr/lib/browser/plugins - * /usr/local/lib/mozilla/plugins - * /usr/lib/firefox/plugins - * /usr/lib64/browser-plugins - * /usr/lib/browser-plugins - * /usr/lib/mozilla/plugins - * /usr/local/netscape/plugins - * /opt/mozilla/plugins - * /opt/mozilla/lib/plugins - * /opt/netscape/plugins - * /opt/netscape/communicator/plugins - * /usr/lib/netscape/plugins - * /usr/lib/netscape/plugins-libc5 - * /usr/lib/netscape/plugins-libc6 - * /usr/lib64/netscape/plugins - * /usr/lib64/mozilla/plugins - * Locations specified by environment variables: - * $MOZILLA_HOME/plugins - * $MOZ_PLUGIN_PATH - * $QTWEBKIT_PLUGIN_PATH -* Windows - * The user's Application Data\Mozilla\plugins directory - * Standard system locations of plugins for Quicktime, Flash, etc. -* Mac OS X - * Library/Internet Plug-Ins in the user's home directory - * The system /Library/Internet Plug-Ins directory - -License Information -------------------- - -Qt Commercial Edition licensees that wish to distribute applications that use the QtWebKit module need to be aware of their obligations under the GNU Library General Public License (LGPL). - -Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL. -WebKit is licensed under the GNU Library General Public License. Individual contributor names and copyright dates can be found inline in the code. - -This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. - -You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. \ No newline at end of file diff --git a/sources/pyside2/doc/extras/PySide.QtXml.rst b/sources/pyside2/doc/extras/PySide.QtXml.rst deleted file mode 100644 index 4b48ef21e..000000000 --- a/sources/pyside2/doc/extras/PySide.QtXml.rst +++ /dev/null @@ -1,5 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtXml diff --git a/sources/pyside2/doc/extras/PySide.QtXmlPatterns.rst b/sources/pyside2/doc/extras/PySide.QtXmlPatterns.rst deleted file mode 100644 index 99254ad62..000000000 --- a/sources/pyside2/doc/extras/PySide.QtXmlPatterns.rst +++ /dev/null @@ -1,12 +0,0 @@ -To include the definitions of the module's classes, use the following directive: - -:: - - import PySide2.QtXmlPatterns - -Further Reading ---------------- - -General overviews of XQuery and XSchema can be found in the XQuery document. - -An introduction to the XQuery language can be found in A Short Path to XQuery. diff --git a/sources/pyside2/doc/extras/QtCore.ClassInfo.rst b/sources/pyside2/doc/extras/QtCore.ClassInfo.rst new file mode 100644 index 000000000..d2267be9c --- /dev/null +++ b/sources/pyside2/doc/extras/QtCore.ClassInfo.rst @@ -0,0 +1,23 @@ +.. module:: PySide2.QtCore +.. _ClassInfo: + +ClassInfo +********* + +This class is used to associates extra information to the class, which is available +using QObject.metaObject(). Qt and PySide doesn't use this information. + +The extra information takes the form of a dictionary with key and value in a literal string. + +.. note:: This Class is a implementation of Q_CLASSINFO macro. + + +Example +------- + +:: + + @ClassInfo(Author='PySide Team', URL='http://www.pyside.org') + class MyObject(QObject): + ... + diff --git a/sources/pyside2/doc/extras/QtCore.Signal.rst b/sources/pyside2/doc/extras/QtCore.Signal.rst new file mode 100644 index 000000000..16c640831 --- /dev/null +++ b/sources/pyside2/doc/extras/QtCore.Signal.rst @@ -0,0 +1,39 @@ +.. module:: PySide2.QtCore +.. _Signal: + +Signal +****** + +Synopsis +-------- + +Functions +^^^^^^^^^ + ++---------------------------------------------------------------------------------------------+ +|def :meth:`connect` (receiver) | ++---------------------------------------------------------------------------------------------+ +|def :meth:`disconnect` (receiver) | ++---------------------------------------------------------------------------------------------+ +|def :meth:`emit` (\*args) | ++---------------------------------------------------------------------------------------------+ + +Detailed Description +-------------------- + + The :class:`~.Signal` class provides a way to declare and connect Qt signals in a pythonic way. + + PySide adopt PyQt's new signal and slot syntax as-is. The PySide implementation is functionally compatible with the PyQt 4.5 one, with the exceptions listed bellow. + +.. method:: Signal.connect(receiver[, type=Qt.AutoConnection]) + + Create a connection between this signal and a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`. + +.. method:: Signal.disconnect(receiver) + + Disconnect this signal from a `receiver`, the `receiver` can be a Python callable, a :class:`Slot` or a :class:`Signal`. + +.. method:: Signal.emit(*args) + + `args` is the arguments to pass to any connected slots, if any. + diff --git a/sources/pyside2/doc/extras/QtCore.Slot.rst b/sources/pyside2/doc/extras/QtCore.Slot.rst new file mode 100644 index 000000000..3bc64c03a --- /dev/null +++ b/sources/pyside2/doc/extras/QtCore.Slot.rst @@ -0,0 +1,39 @@ +.. module:: PySide2.QtCore +.. _Slot: + +Slot +**** + +Detailed Description +-------------------- + + PySide2 adopt PyQt5's new signal and slot syntax as-is. The PySide2 + implementation is functionally compatible with the PyQt5 one, with the + exceptions listed below. + + PyQt5's new signal and slot style utilizes method and decorator names + specific to their implementation. These will be generalized according to + the table below: + + ======= ======================= ============= + Module PyQt5 factory function PySide2 class + ======= ======================= ============= + QtCore pyqtSignal Signal + QtCore pyqtSlot Slot + ======= ======================= ============= + +Q_INVOKABLE +----------- + + There is no equivalent of the Q_INVOKABLE macro of Qt + since PySide2 slots can actually have return values. + If you need to create a invokable method that returns some value, + declare it as a slot, e.g.: + + :: + + class Foo(QObject): + + @Slot(float, result=int) + def getFloatReturnInt(self, f): + return int(f) diff --git a/sources/pyside2/doc/extras/QtCore.rst b/sources/pyside2/doc/extras/QtCore.rst new file mode 100644 index 000000000..d3277a418 --- /dev/null +++ b/sources/pyside2/doc/extras/QtCore.rst @@ -0,0 +1,5 @@ +All other Qt modules rely on this module. To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtCore diff --git a/sources/pyside2/doc/extras/QtGui.rst b/sources/pyside2/doc/extras/QtGui.rst new file mode 100644 index 000000000..e16329c38 --- /dev/null +++ b/sources/pyside2/doc/extras/QtGui.rst @@ -0,0 +1,7 @@ +To include the definitions of modules classes, use the following directive: + +:: + + import PySide2.QtGui + +.. seealso:: :mod:`PySide2.QtCore` diff --git a/sources/pyside2/doc/extras/QtHelp.rst b/sources/pyside2/doc/extras/QtHelp.rst new file mode 100644 index 000000000..239f4faa6 --- /dev/null +++ b/sources/pyside2/doc/extras/QtHelp.rst @@ -0,0 +1,5 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtHelp diff --git a/sources/pyside2/doc/extras/QtMultimedia.rst b/sources/pyside2/doc/extras/QtMultimedia.rst new file mode 100644 index 000000000..5088db4d0 --- /dev/null +++ b/sources/pyside2/doc/extras/QtMultimedia.rst @@ -0,0 +1,7 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtMultimedia + + diff --git a/sources/pyside2/doc/extras/QtNetwork.rst b/sources/pyside2/doc/extras/QtNetwork.rst new file mode 100644 index 000000000..07303b157 --- /dev/null +++ b/sources/pyside2/doc/extras/QtNetwork.rst @@ -0,0 +1,5 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtNetwork diff --git a/sources/pyside2/doc/extras/QtOpenGL.rst b/sources/pyside2/doc/extras/QtOpenGL.rst new file mode 100644 index 000000000..38783d9fd --- /dev/null +++ b/sources/pyside2/doc/extras/QtOpenGL.rst @@ -0,0 +1,14 @@ +OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application must be created with another toolkit, such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms. + +.. note:: OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries. + +The Qt OpenGL module makes it easy to use OpenGL in Qt applications. It provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where you can use the OpenGL API to render the contents. +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtOpenGL + +The Qt OpenGL module is implemented as a platform-independent wrapper around the platform-dependent GLX (version 1.3 or later), WGL, or AGL C APIs. Although the basic functionality provided is very similar to Mark Kilgard's GLUT library, applications using the Qt OpenGL module can take advantage of the whole Qt API for non-OpenGL-specific GUI functionality. + +The QtOpenGL module is available on Windows, X11 and Mac OS X. Qt for Embedded Linux and OpenGL supports OpenGL ES (OpenGL for Embedded Systems). \ No newline at end of file diff --git a/sources/pyside2/doc/extras/QtScript.rst b/sources/pyside2/doc/extras/QtScript.rst new file mode 100644 index 000000000..8ce7681ec --- /dev/null +++ b/sources/pyside2/doc/extras/QtScript.rst @@ -0,0 +1,21 @@ +The QtScript module only provides core scripting facilities; the QtScriptTools module provides additional Qt Script-related components that application developers may find useful. + +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtScript + +License Information +------------------- + +Qt Commercial Edition licensees that wish to distribute applications that use the QtScript module need to be aware of their obligations under the GNU Library General Public License (LGPL). + +Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL. +QtScript is licensed under the GNU Library General Public License. Individual contributor names and copyright dates can be found inline in the code. + +This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. + +You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/sources/pyside2/doc/extras/QtScriptTools.rst b/sources/pyside2/doc/extras/QtScriptTools.rst new file mode 100644 index 000000000..a54ed914b --- /dev/null +++ b/sources/pyside2/doc/extras/QtScriptTools.rst @@ -0,0 +1,5 @@ +Applications that use the Qt Script Tools classes need to be configured to be built against the QtScriptTools module. To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtScriptTools diff --git a/sources/pyside2/doc/extras/QtSql.rst b/sources/pyside2/doc/extras/QtSql.rst new file mode 100644 index 000000000..fcdd6ba02 --- /dev/null +++ b/sources/pyside2/doc/extras/QtSql.rst @@ -0,0 +1,5 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtSql diff --git a/sources/pyside2/doc/extras/QtSvg.rst b/sources/pyside2/doc/extras/QtSvg.rst new file mode 100644 index 000000000..7817e532f --- /dev/null +++ b/sources/pyside2/doc/extras/QtSvg.rst @@ -0,0 +1,5 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtSvg diff --git a/sources/pyside2/doc/extras/QtTest.rst b/sources/pyside2/doc/extras/QtTest.rst new file mode 100644 index 000000000..0b89a22d4 --- /dev/null +++ b/sources/pyside2/doc/extras/QtTest.rst @@ -0,0 +1,7 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtTest + +.. note:: All macros in the C++ version of QtTest were not binded in PySide, this module is useful only for GUI testing and benchmarking, for ordinary unit testing you should use the ``unittest`` Python module. diff --git a/sources/pyside2/doc/extras/QtUiTools.rst b/sources/pyside2/doc/extras/QtUiTools.rst new file mode 100644 index 000000000..553224527 --- /dev/null +++ b/sources/pyside2/doc/extras/QtUiTools.rst @@ -0,0 +1,9 @@ +These forms are processed at run-time to produce dynamically-generated user interfaces. In order to generate a form at run-time, a resource file containing a UI file is needed. + +A form loader object, provided by the QUiLoader class, is used to construct the user interface. This user interface can be retrieved from any QIODevice; for example, a QFile object can be used to obtain a form stored in a project's resources. The :meth:`PySide2.QtUiTools.QUiLoader.load` function takes the user interface description contained in the file and constructs the form widget. + +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide..QtUiTools diff --git a/sources/pyside2/doc/extras/QtWebKit.rst b/sources/pyside2/doc/extras/QtWebKit.rst new file mode 100644 index 000000000..58f9230a7 --- /dev/null +++ b/sources/pyside2/doc/extras/QtWebKit.rst @@ -0,0 +1,94 @@ +QtWebKit provides a Web browser engine that makes it easy to embed content from the World Wide Web into your Qt application. At the same time Web content can be enhanced with native controls. + +QtWebKit provides facilities for rendering of HyperText Markup Language (HTML), Extensible HyperText Markup Language (XHTML) and Scalable Vector Graphics (SVG) documents, styled using Cascading Style Sheets (CSS) and scripted with JavaScript. + +A bridge between the JavaScript execution environment and the Qt object model makes it possible for custom QObjects to be scripted. Integration with the Qt networking module enables Web pages to be transparently loaded from Web servers, the local file system or even the Qt resource system. + +In addition to providing pure rendering features, HTML documents can be made fully editable to the user through the use of the contenteditable attribute on HTML elements. + +QtWebKit is based on the Open Source WebKit engine. More information about WebKit itself can be found on the _`WebKit Open Source Project ` Web site. + +Including In Your Project +------------------------- + +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtWebKit + + +.. note:: Web site icons, also known as "FavIcons", are currently not supported on Windows. We plan to address this in a future release. + +Architecture +------------ + +The easiest way to render content is through the QWebView class. As a widget it can be embedded into your forms or a graphics view, and it provides convenience functions for downloading and rendering web sites. + +:: + + view = QWebView(parent) + view.load(QUrl("http://qt.nokia.com/")) + view.show() + +QWebView is used to view Web pages. An instance of QWebView has one QWebPage. QWebPage provides access to the document structure in a page, describing features such as frames, the navigation history, and the undo/redo stack for editable content. + +HTML documents can be nested using frames in a frameset. An individual frame in HTML is represented using the QWebFrame class. This class includes the bridge to the JavaScript window object and can be painted using QPainter. Each QWebPage has one QWebFrame object as its main frame, and the main frame may contain many child frames. + +Individual elements of an HTML document can be accessed via DOM JavaScript interfaces from within a web page. The equivalent of this API in QtWebKit is represented by QWebElement. QWebElement objects are obtained using QWebFrame's findAllElements() and findFirstElement() functions with CSS selector queries. + +Common web browser features, defaults and other settings can be configured through the QWebSettings class. It is possible to provide defaults for all QWebPage instances through the default settings. Individual attributes can be overidden by the page specific settings object. + +Netscape Plugin Support +----------------------- + +.. note:: Netscape plugin support is only available on desktop platforms. + +Since WebKit supports the Netscape Plugin API, Qt applications can display Web pages that embed common plugins on platforms for which those plugins are available. To enable plugin support, the user must have the appropriate binary files for those plugins installed and the ``QWebSettings.PluginsEnabled`` attribute must be enabled for the application. + +The following locations are searched for plugins: + +* Linux/Unix (X11) + * .mozilla/plugins in the user's home directory + * .netscape/plugins in the user's home directory + * System locations, such as + * /usr/lib/browser/plugins + * /usr/local/lib/mozilla/plugins + * /usr/lib/firefox/plugins + * /usr/lib64/browser-plugins + * /usr/lib/browser-plugins + * /usr/lib/mozilla/plugins + * /usr/local/netscape/plugins + * /opt/mozilla/plugins + * /opt/mozilla/lib/plugins + * /opt/netscape/plugins + * /opt/netscape/communicator/plugins + * /usr/lib/netscape/plugins + * /usr/lib/netscape/plugins-libc5 + * /usr/lib/netscape/plugins-libc6 + * /usr/lib64/netscape/plugins + * /usr/lib64/mozilla/plugins + * Locations specified by environment variables: + * $MOZILLA_HOME/plugins + * $MOZ_PLUGIN_PATH + * $QTWEBKIT_PLUGIN_PATH +* Windows + * The user's Application Data\Mozilla\plugins directory + * Standard system locations of plugins for Quicktime, Flash, etc. +* Mac OS X + * Library/Internet Plug-Ins in the user's home directory + * The system /Library/Internet Plug-Ins directory + +License Information +------------------- + +Qt Commercial Edition licensees that wish to distribute applications that use the QtWebKit module need to be aware of their obligations under the GNU Library General Public License (LGPL). + +Developers using the Open Source Edition can choose to redistribute the module under the appropriate version of the GNU LGPL. +WebKit is licensed under the GNU Library General Public License. Individual contributor names and copyright dates can be found inline in the code. + +This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. + +You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. \ No newline at end of file diff --git a/sources/pyside2/doc/extras/QtXml.rst b/sources/pyside2/doc/extras/QtXml.rst new file mode 100644 index 000000000..4b48ef21e --- /dev/null +++ b/sources/pyside2/doc/extras/QtXml.rst @@ -0,0 +1,5 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtXml diff --git a/sources/pyside2/doc/extras/QtXmlPatterns.rst b/sources/pyside2/doc/extras/QtXmlPatterns.rst new file mode 100644 index 000000000..99254ad62 --- /dev/null +++ b/sources/pyside2/doc/extras/QtXmlPatterns.rst @@ -0,0 +1,12 @@ +To include the definitions of the module's classes, use the following directive: + +:: + + import PySide2.QtXmlPatterns + +Further Reading +--------------- + +General overviews of XQuery and XSchema can be found in the XQuery document. + +An introduction to the XQuery language can be found in A Short Path to XQuery. diff --git a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp index 339669758..de023f079 100644 --- a/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp +++ b/sources/shiboken2/generator/qtdoc/qtdocgenerator.cpp @@ -2193,11 +2193,19 @@ void QtDocGenerator::writeModuleDocumentation() /* Avoid showing "Detailed Description for *every* class in toc tree */ Indentation indentation(INDENT); + // Store the it.key() in a QString so that it can be stripped off unwanted + // information when neeeded. For example, the RST files in the extras directory + // doesn't include the PySide# prefix in their names. + const QString moduleName = it.key(); + const int lastIndex = moduleName.lastIndexOf(QLatin1Char('.')); // Search for extra-sections if (!m_extraSectionDir.isEmpty()) { QDir extraSectionDir(m_extraSectionDir); - QStringList fileList = extraSectionDir.entryList(QStringList() << (it.key() + QLatin1String("?*.rst")), QDir::Files); + if (!extraSectionDir.exists()) + qCWarning(lcShiboken) << m_extraSectionDir << "doesn't exist"; + + QStringList fileList = extraSectionDir.entryList(QStringList() << (moduleName.mid(lastIndex + 1) + QLatin1String("?*.rst")), QDir::Files); QStringList::iterator it2 = fileList.begin(); for (; it2 != fileList.end(); ++it2) { QString origFileName(*it2); @@ -2231,7 +2239,7 @@ void QtDocGenerator::writeModuleDocumentation() s << "--------------------" << endl << endl; // module doc is always wrong and C++istic, so go straight to the extra directory! - QFile moduleDoc(m_extraSectionDir + QLatin1Char('/') + it.key() + QLatin1String(".rst")); + QFile moduleDoc(m_extraSectionDir + QLatin1Char('/') + moduleName.mid(lastIndex + 1) + QLatin1String(".rst")); if (moduleDoc.open(QIODevice::ReadOnly | QIODevice::Text)) { s << moduleDoc.readAll(); moduleDoc.close(); -- cgit v1.2.3