Qt5ModuleQDocconf: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Qt 5 Module qdocconf Files=
h1. Qt 5 Module qdocconf Files


Each module in Qt 5 need a qdocconf file to build its documentation set.
Each module in Qt 5 need a qdocconf file to build its documentation set.


* [http://doc-snapshot.qt.io/qdoc/ QDoc Manual] ''[doc-snapshot.qt.io]''
* "QDoc Manual":http://doc-snapshot.qt.io/qdoc/
* [http://doc-snapshot.qt.io/qdoc/qdoc-guide-conf.html Creating QDoc Configuration Files] ''[doc-snapshot.qt.io]''
* "Creating QDoc Configuration Files":http://doc-snapshot.qt.io/qdoc/qdoc-guide-conf.html


==Sample==
== Sample ==


Here is a sample qdocconf file from Qt Contacts:<br /> It is located in ''qt5/qtpim/src/contacts/doc/qtcontacts.qdocconf''<br />
Here is a sample qdocconf file from Qt Contacts:<br />It is located in ''qt5/qtpim/src/contacts/doc/qtcontacts.qdocconf''<br /><code><br />#include this line to inherit the default templates, macros, and settings. QT_INSTALL_DOCS must be set. Run &quot;qmake <s>query&amp;quot; to find the path set to QT_INSTALL_DOCS.<br />include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
<br />project = QtSql #the project file determines the .index file. qtsql.index is the filename for Qt SQL's index file<br />description = Qt SQL Reference Documentation<br />url = http://doc.qt.io/qt-$QT_VER/qtsql<br />version = $QT_VERSION


==Another Example with <span class="caps">QML</span> types==
<br />#The qhp variables determine how the documentation is configured for Qt Creator and Qt Assistant<br />qhp.projects = QtSql
<br />qhp.QtSql.file = qtsql.qhp<br />qhp.QtSql.namespace = org.qt-project.qtsql.$QT_VERSION_TAG<br />qhp.QtSql.virtualFolder = qtsql<br />qhp.QtSql.indexTitle = Qt SQL<br />qhp.QtSql.indexRoot =
<br />qhp.QtSql.filterAttributes = qtsql $QT_VERSION qtrefdoc<br />qhp.QtSql.customFilters.Qt.name = QtSql $QT_VERSION<br />qhp.QtSql.customFilters.Qt.filterAttributes = qtsql $QT_VERSION
<br />qhp.QtSql.subprojects = classes<br />qhp.QtSql.subprojects.classes.title = C++ Classes<br />qhp.QtSql.subprojects.classes.indexTitle = Qt SQL C++ Classes<br />qhp.QtSql.subprojects.classes.selectors = class fake:headerfile<br />qhp.QtSql.subprojects.classes.sortPages = true<br />tagfile = ../../../doc/qtsql/qtsql.tags
<br />#these depends match the index files in QT_INSTALL_DOCS. qtcore.index is in the directory called qtcore<br />depends ''= qtcore qtwidgets qtdoc
<br />headerdirs''= ..
<br />sourcedirs ''= ..  ../../../examples/sql/doc/src
<br />exampledirs''= ../../../examples/sql  ../  snippets
<br />imagedirs ''= images  ../../../examples/sql/doc/images<br /></code>
<br />h2. Another Example with QML types
<br />Here is another example for a module with QML types. This file is found in qt5/qtmultimedia/src/multimedia/doc<br /><code><br />include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
<br />project = QtMultimedia<br />description = Qt Multimedia Documentation<br />url = http://doc.qt.io/qt-$QT_VER/qtmultimedia<br />version = $QT_VERSION
<br /># The following parameters are for creating a qhp file, the qhelpgenerator<br /># program can convert the qhp file into a qch file which can be opened in<br /># Qt Assistant and/or Qt Creator.
<br /># Defines the name of the project. You cannot use operators ('', =,</s>) in<br /># the name. Properties for this project are set using a qhp.&lt;projectname&amp;gt;.property<br /># format.<br />qhp.projects = QtMultimedia<br />qhp.QtMultimedia.file = qtmultimedia.qhp<br />qhp.QtMultimedia.namespace = org.qt-project.qtmultimedia.$QT_VERSION_TAG<br />qhp.QtMultimedia.indexTitle = Qt Multimedia<br />qhp.QtMultimedia.virtualFolder = qtmultimedia


Here is another example for a module with <span class="caps">QML</span> types. This file is found in qt5/qtmultimedia/src/multimedia/doc<br />
# For listing child nodes in Qt Creator or Assistant.<br />qhp.QtMultimedia.subprojects = classes qmltypes<br />qhp.QtMultimedia.subprojects.classes.title = C++ Classes<br />qhp.QtMultimedia.subprojects.classes.indexTitle = Qt Multimedia C++ Classes<br />qhp.QtMultimedia.subprojects.classes.selectors = class fake:headerfile<br />qhp.QtMultimedia.subprojects.classes.sortPages = true<br />qhp.QtMultimedia.subprojects.qmltypes.title = QML Types<br />qhp.QtMultimedia.subprojects.qmltypes.indexTitle = Qt Multimedia QML Types<br />qhp.QtMultimedia.subprojects.qmltypes.selectors = fake:qmlclass<br />qhp.QtMultimedia.subprojects.qmltypes.sortPages = true


==Notes==
exampledirs ''= ..  ../../../examples
<br />headerdirs''= ../..


* Please use CamelCase for module names defined in qhp.projects, as above. This ensures that the module names are correctly added as tags into example manifest file, and the examples can be found in Qt Creator’s Welcome mode by searching for the module
imagedirs ''= src/images <br />sourcedirs''= ../..


==List of valid selector types:==
excludedirs ''=
<br />depends''= qtcore qtdoc qtquick qtqml<br /></code>
 
== Notes ==
 
* Please use CamelCase for module names defined in qhp.projects, as above. This ensures that the module names are correctly added as tags into example manifest file, and the examples can be found in Qt Creator's Welcome mode by searching for the module
 
== List of valid selector types: ==


* namespace
* namespace
Line 33: Line 55:
* fake
* fake


A ‘fake’ type specifies a generic documentation node, and is followed by :subtype specifier. Valid subtypes:
A 'fake' type specifies a generic documentation node, and is followed by :subtype specifier. Valid subtypes:


* example
* example

Revision as of 11:12, 24 February 2015

h1. Qt 5 Module qdocconf Files

Each module in Qt 5 need a qdocconf file to build its documentation set.

Sample

Here is a sample qdocconf file from Qt Contacts:
It is located in qt5/qtpim/src/contacts/doc/qtcontacts.qdocconf

<br />#include this line to inherit the default templates, macros, and settings. QT_INSTALL_DOCS must be set. Run &quot;qmake <s>query&amp;quot; to find the path set to QT_INSTALL_DOCS.<br />include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
<br />project = QtSql #the project file determines the .index file. qtsql.index is the filename for Qt SQL's index file<br />description = Qt SQL Reference Documentation<br />url = http://doc.qt.io/qt-$QT_VER/qtsql<br />version = $QT_VERSION

<br />#The qhp variables determine how the documentation is configured for Qt Creator and Qt Assistant<br />qhp.projects = QtSql
<br />qhp.QtSql.file = qtsql.qhp<br />qhp.QtSql.namespace = org.qt-project.qtsql.$QT_VERSION_TAG<br />qhp.QtSql.virtualFolder = qtsql<br />qhp.QtSql.indexTitle = Qt SQL<br />qhp.QtSql.indexRoot =
<br />qhp.QtSql.filterAttributes = qtsql $QT_VERSION qtrefdoc<br />qhp.QtSql.customFilters.Qt.name = QtSql $QT_VERSION<br />qhp.QtSql.customFilters.Qt.filterAttributes = qtsql $QT_VERSION
<br />qhp.QtSql.subprojects = classes<br />qhp.QtSql.subprojects.classes.title = C++ Classes<br />qhp.QtSql.subprojects.classes.indexTitle = Qt SQL C++ Classes<br />qhp.QtSql.subprojects.classes.selectors = class fake:headerfile<br />qhp.QtSql.subprojects.classes.sortPages = true<br />tagfile = ../../../doc/qtsql/qtsql.tags
<br />#these depends match the index files in QT_INSTALL_DOCS. qtcore.index is in the directory called qtcore<br />depends ''= qtcore qtwidgets qtdoc
<br />headerdirs''= ..
<br />sourcedirs ''= ..  ../../../examples/sql/doc/src
<br />exampledirs''= ../../../examples/sql  ../  snippets
<br />imagedirs ''= images  ../../../examples/sql/doc/images<br />


h2. Another Example with QML types


Here is another example for a module with QML types. This file is found in qt5/qtmultimedia/src/multimedia/doc

<br />include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
<br />project = QtMultimedia<br />description = Qt Multimedia Documentation<br />url = http://doc.qt.io/qt-$QT_VER/qtmultimedia<br />version = $QT_VERSION
<br /># The following parameters are for creating a qhp file, the qhelpgenerator<br /># program can convert the qhp file into a qch file which can be opened in<br /># Qt Assistant and/or Qt Creator.
<br /># Defines the name of the project. You cannot use operators ('', =,</s>) in<br /># the name. Properties for this project are set using a qhp.&lt;projectname&amp;gt;.property<br /># format.<br />qhp.projects = QtMultimedia<br />qhp.QtMultimedia.file = qtmultimedia.qhp<br />qhp.QtMultimedia.namespace = org.qt-project.qtmultimedia.$QT_VERSION_TAG<br />qhp.QtMultimedia.indexTitle = Qt Multimedia<br />qhp.QtMultimedia.virtualFolder = qtmultimedia

# For listing child nodes in Qt Creator or Assistant.<br />qhp.QtMultimedia.subprojects = classes qmltypes<br />qhp.QtMultimedia.subprojects.classes.title = C++ Classes<br />qhp.QtMultimedia.subprojects.classes.indexTitle = Qt Multimedia C++ Classes<br />qhp.QtMultimedia.subprojects.classes.selectors = class fake:headerfile<br />qhp.QtMultimedia.subprojects.classes.sortPages = true<br />qhp.QtMultimedia.subprojects.qmltypes.title = QML Types<br />qhp.QtMultimedia.subprojects.qmltypes.indexTitle = Qt Multimedia QML Types<br />qhp.QtMultimedia.subprojects.qmltypes.selectors = fake:qmlclass<br />qhp.QtMultimedia.subprojects.qmltypes.sortPages = true

exampledirs ''= ..  ../../../examples
<br />headerdirs''= ../..

imagedirs ''= src/images <br />sourcedirs''= ../..

excludedirs ''=
<br />depends''= qtcore qtdoc qtquick qtqml<br />

Notes

  • Please use CamelCase for module names defined in qhp.projects, as above. This ensures that the module names are correctly added as tags into example manifest file, and the examples can be found in Qt Creator's Welcome mode by searching for the module

List of valid selector types:

  • namespace
  • class
  • enum
  • typedef
  • function
  • property
  • variable
  • qmlproperty
  • qmlsignal
  • qmlsignalhandler
  • qmlmethod
  • fake

A 'fake' type specifies a generic documentation node, and is followed by :subtype specifier. Valid subtypes:

  • example
  • headerfile
  • file
  • group
  • module
  • page
  • externalpage
  • qmlclass
  • qmlpropertygroup
  • qmlbasictype