Qt5ModuleQDocconf: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(Convert ExpressionEngine section headers)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
h1. Qt 5 Module qdocconf Files
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}


= 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.


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


== Sample ==
== Sample ==


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 "qmake -query" to find the path set to QT_INSTALL_DOCS.<br />include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
Here is a sample qdocconf file from Qt Contacts:
<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
It is located in ''qt5/qtpim/src/contacts/doc/qtcontacts.qdocconf''
<code>
#include this line to inherit the default templates, macros, and settings. QT_INSTALL_DOCS must be set. Run "qmake -query" to find the path set to QT_INSTALL_DOCS.
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)


<br />#The qhp variables determine how the documentation is configured for Qt Creator and Qt Assistant<br />qhp.projects = QtSql
project = QtSql #the project file determines the .index file. qtsql.index is the filename for Qt SQL's index file
<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 =
description = Qt SQL Reference Documentation
<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
url = http://doc.qt.io/qt-$QT_VER/qtsql
<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
version = $QT_VERSION
<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 ('', =,-) in<br /># the name. Properties for this project are set using a qhp.<projectname>.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
 
#The qhp variables determine how the documentation is configured for Qt Creator and Qt Assistant
qhp.projects = QtSql
 
qhp.QtSql.file = qtsql.qhp
qhp.QtSql.namespace = org.qt-project.qtsql.$QT_VERSION_TAG
qhp.QtSql.virtualFolder = qtsql
qhp.QtSql.indexTitle = Qt SQL
qhp.QtSql.indexRoot =
 
qhp.QtSql.filterAttributes = qtsql $QT_VERSION qtrefdoc
qhp.QtSql.customFilters.Qt.name = QtSql $QT_VERSION
qhp.QtSql.customFilters.Qt.filterAttributes = qtsql $QT_VERSION
 
qhp.QtSql.subprojects = classes
qhp.QtSql.subprojects.classes.title = C++ Classes
qhp.QtSql.subprojects.classes.indexTitle = Qt SQL C++ Classes
qhp.QtSql.subprojects.classes.selectors = class fake:headerfile
qhp.QtSql.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtsql/qtsql.tags
 
#these depends match the index files in QT_INSTALL_DOCS. qtcore.index is in the directory called qtcore
depends ''= qtcore qtwidgets qtdoc
 
headerdirs''= ..
 
sourcedirs ''= ..  ../../../examples/sql/doc/src
 
exampledirs''= ../../../examples/sql  ../  snippets
 
imagedirs ''= images  ../../../examples/sql/doc/images
</code>
 
== 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
<code>
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
 
project = QtMultimedia
description = Qt Multimedia Documentation
url = http://doc.qt.io/qt-$QT_VER/qtmultimedia
version = $QT_VERSION
 
# The following parameters are for creating a qhp file, the qhelpgenerator
# program can convert the qhp file into a qch file which can be opened in
# Qt Assistant and/or Qt Creator.
 
# Defines the name of the project. You cannot use operators ('', =,-) in
# the name. Properties for this project are set using a qhp.<projectname>.property
# format.
qhp.projects = QtMultimedia
qhp.QtMultimedia.file = qtmultimedia.qhp
qhp.QtMultimedia.namespace = org.qt-project.qtmultimedia.$QT_VERSION_TAG
qhp.QtMultimedia.indexTitle = Qt Multimedia
qhp.QtMultimedia.virtualFolder = qtmultimedia
 
# For listing child nodes in Qt Creator or Assistant.
qhp.QtMultimedia.subprojects = classes qmltypes
qhp.QtMultimedia.subprojects.classes.title = C++ Classes
qhp.QtMultimedia.subprojects.classes.indexTitle = Qt Multimedia C++ Classes
qhp.QtMultimedia.subprojects.classes.selectors = class fake:headerfile
qhp.QtMultimedia.subprojects.classes.sortPages = true
qhp.QtMultimedia.subprojects.qmltypes.title = QML Types
qhp.QtMultimedia.subprojects.qmltypes.indexTitle = Qt Multimedia QML Types
qhp.QtMultimedia.subprojects.qmltypes.selectors = fake:qmlclass
qhp.QtMultimedia.subprojects.qmltypes.sortPages = true


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


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


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


== Notes ==
== Notes ==

Latest revision as of 16:18, 5 March 2015

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

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

#include this line to inherit the default templates, macros, and settings. QT_INSTALL_DOCS must be set. Run "qmake -query" to find the path set to QT_INSTALL_DOCS.
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)

project = QtSql #the project file determines the .index file. qtsql.index is the filename for Qt SQL's index file
description = Qt SQL Reference Documentation
url = http://doc.qt.io/qt-$QT_VER/qtsql
version = $QT_VERSION


#The qhp variables determine how the documentation is configured for Qt Creator and Qt Assistant
qhp.projects = QtSql

qhp.QtSql.file = qtsql.qhp
qhp.QtSql.namespace = org.qt-project.qtsql.$QT_VERSION_TAG
qhp.QtSql.virtualFolder = qtsql
qhp.QtSql.indexTitle = Qt SQL
qhp.QtSql.indexRoot =

qhp.QtSql.filterAttributes = qtsql $QT_VERSION qtrefdoc
qhp.QtSql.customFilters.Qt.name = QtSql $QT_VERSION
qhp.QtSql.customFilters.Qt.filterAttributes = qtsql $QT_VERSION

qhp.QtSql.subprojects = classes
qhp.QtSql.subprojects.classes.title = C++ Classes
qhp.QtSql.subprojects.classes.indexTitle = Qt SQL C++ Classes
qhp.QtSql.subprojects.classes.selectors = class fake:headerfile
qhp.QtSql.subprojects.classes.sortPages = true
tagfile = ../../../doc/qtsql/qtsql.tags

#these depends match the index files in QT_INSTALL_DOCS. qtcore.index is in the directory called qtcore
depends ''= qtcore qtwidgets qtdoc

headerdirs''= ..

sourcedirs ''= ..  ../../../examples/sql/doc/src

exampledirs''= ../../../examples/sql  ../  snippets

imagedirs ''= images  ../../../examples/sql/doc/images

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

include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)

project = QtMultimedia
description = Qt Multimedia Documentation
url = http://doc.qt.io/qt-$QT_VER/qtmultimedia
version = $QT_VERSION

# The following parameters are for creating a qhp file, the qhelpgenerator
# program can convert the qhp file into a qch file which can be opened in
# Qt Assistant and/or Qt Creator.

# Defines the name of the project. You cannot use operators ('', =,-) in
# the name. Properties for this project are set using a qhp.<projectname>.property
# format.
qhp.projects = QtMultimedia
qhp.QtMultimedia.file = qtmultimedia.qhp
qhp.QtMultimedia.namespace = org.qt-project.qtmultimedia.$QT_VERSION_TAG
qhp.QtMultimedia.indexTitle = Qt Multimedia
qhp.QtMultimedia.virtualFolder = qtmultimedia

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

exampledirs ''= ..  ../../../examples

headerdirs''= ../..

imagedirs ''= src/images 
sourcedirs''= ../..

excludedirs ''=

depends''= qtcore qtdoc qtquick qtqml

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