Qt5ModuleQDocconf

From Qt Wiki
Revision as of 11:12, 24 February 2015 by Maintenance script (talk | contribs)
Jump to navigation Jump to search

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