include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
include($QT_INSTALL_DOCS/config/exampleurl-qtquickcontrols2.qdocconf)
include(manifest-meta.qdocconf)

moduleheader            = QtQuickControls2

project                 = QtQuickControls
description             = Qt Quick Controls Reference Documentation
version                 = $QT_VERSION

qhp.projects            = QtQuickControls

qhp.QtQuickControls.file          = qtquickcontrols.qhp
qhp.QtQuickControls.namespace     = org.qt-project.qtquickcontrols.$QT_VERSION_TAG
qhp.QtQuickControls.virtualFolder = qtquickcontrols
qhp.QtQuickControls.indexTitle    = Qt Quick Controls
qhp.QtQuickControls.indexRoot     =

qhp.QtQuickControls.subprojects = qmltypes classes examples
qhp.QtQuickControls.subprojects.qmltypes.title = QML Types
qhp.QtQuickControls.subprojects.qmltypes.indexTitle = Qt Quick Controls QML Types
qhp.QtQuickControls.subprojects.qmltypes.selectors = qmlclass
qhp.QtQuickControls.subprojects.qmltypes.sortPages = true
qhp.QtQuickControls.subprojects.classes.title = C++ Classes
qhp.QtQuickControls.subprojects.classes.indexTitle = Qt Quick Controls C++ Classes
qhp.QtQuickControls.subprojects.classes.selectors = class fake:headerfile
qhp.QtQuickControls.subprojects.classes.sortPages = true
qhp.QtQuickControls.subprojects.examples.title = Examples
qhp.QtQuickControls.subprojects.examples.indexTitle = Qt Quick Controls Examples
qhp.QtQuickControls.subprojects.examples.selectors = fake:example

depends = qtcore qtgui qtdoc qtqml qtqmlmodels qtquick qtsql qtwidgets qtlabsplatform qmake qtcmake

# Specify the install path under QT_INSTALL_EXAMPLES
# Note: paths passed to \example command must contain the parent directory, e.g.
# \example controls/tabs
exampledirs += ../../../examples/quickcontrols \
               ../../quicktemplates \
               ../ \
               snippets

examples.fileextensions += "*.conf *.theme"

examplesinstallpath = quickcontrols

headerdirs += ../../quicktemplates \
              ..

sourcedirs += ../../quicktemplates \
              .. \
              ../../quicktemplates/doc/src \
              src

# Exclude .qml files from the doc build to prevent conflicts with .qml files
# in style-specific directories; all types are documented in .cpp/.qdoc files
sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qdoc"

imagedirs += images \
             ..

navigation.landingpage  = "Qt Quick Controls"
navigation.qmltypespage = "Qt Quick Controls QML Types"
navigation.cppclassespage = "Qt Quick Controls C++ Classes"

tagfile                 = qtquickcontrols.tags

# \styleimport {QtQuick.Controls.Universal 2.0}
macro.styleimport.HTML = "<table class=\"alignedsummary\"><tbody><tr><td class=\"memItemLeft rightAlign topAlign\"> Import Statement:</td><td class=\"memItemRight bottomAlign\"> import \1</td></tr><tr><td class=\"memItemLeft rightAlign topAlign\"> Since:</td><td class=\"memItemRight bottomAlign\"> \2</td></tr></tbody></table>"
macro.styleimport.DocBook = "<db:variablelist><db:varlistentry><db:term>Import Statement</db:term><db:listitem><db:para>import \1</db:para></db:listitem></db:varlistentry><db:varlistentry><db:term>Since</db:term><db:listitem><db:para>\2</db:para></db:listitem></db:varlistentry></db:variablelist>"

# \styleproperty {propertyname} {enumeration} {html-target-id}
# \target html-target-id
# This property holds ...
# (empty line)
# \endstyleproperty
macro.styleproperty.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\3\"><td class=\"tblQmlPropNode\"><p><span class=\"name\">\1</span> : <span class=\"type\">\2</span></p></td></tr></tbody></table></div>"
macro.endstyleproperty.HTML = "<br/>"
macro.styleproperty.DocBook = "<db:section xml:id=\"\3\"><db:title>\1 : \2</db:title><db:fieldsynopsis><db:type>\2</db:type><db:varname>\1</db:varname></db:fieldsynopsis>"
macro.endstyleproperty.DocBook = "</db:section>"

# \stylemethod {returntype} {methodname} {argtype} {argname} {html-target-id}
# \target html-target-id
# This property holds ...
# (empty line)
# \endstylemethod
macro.stylemethod.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\5\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>)</p></td></tr></tbody></table></div>"
macro.endstylemethod.HTML = "<br/>"
macro.stylemethod.DocBook = "<db:section xml:id=\"\5\"><db:title>\1 \2(\3 <db:emphasis>\4</db:emphasis>)</db:title><db:methodsynopsis><db:type>\1</db:type><db:methodname>\2</db:methodname><db:methodparam><db:type>\3</db:type><db:parameter>\4</db:parameter></db:methodparam></db:methodsynopsis>"
macro.endstylemethod.DocBook = "</db:section>"

# \stylemethod2 {returntype} {methodname} {arg1type} {arg1name} {arg2type} {arg2name} {html-target-id}
# \target html-target-id
# This method returns ...
# (empty line)
# \endstylemethod2
macro.stylemethod2.HTML = "<div class=\"qmlproto\"><table class=\"qmlname\"><tbody><tr valign=\"top\" class=\"odd\" id=\"\7\"><td class=\"tblQmlFuncNode\"><p><span class=\"type\">\1</span> <span class=\"name\">\2</span>(<span class="type">\3</span> <i>\4</i>, <span class="type">\5</span> <i>\6</i>)</p></td></tr></tbody></table></div>"
macro.endstylemethod2.HTML = "<br/>"
macro.stylemethod2.DocBook = "<db:section xml:id=\"\7\"><db:title>\1 \2(\3 <db:emphasis>\4</db:emphasis>)</db:title><db:methodsynopsis><db:type>\1</db:type><db:methodname>\2</db:methodname><db:methodparam><db:type>\3</db:type><db:parameter>\4</db:parameter></db:methodparam><db:methodparam><db:type>\5</db:type><db:parameter>\6</db:parameter></db:methodparam></db:methodsynopsis>"
macro.endstylemethod2.DocBook = "</db:section>"

# \stylecolor {#6A00FF} {(default)}
macro.stylecolor.HTML = "<div style=\"padding:10px;color:#fff;background:\1;\">\1 \2</div>"
macro.stylecolor.DocBook = "<db:phrase role=\"color:\1\">\1 \2</db:phrase>"

macro.nbsp.HTML = "&nbsp;"
macro.nbsp.DocBook = "&#160;"

manifestmeta.highlighted.names = \
    "QtQuickControls/File System Explorer" \
    "QtQuickControls/Qt Quick Controls - Wearable Demo" \
    "QtQuickControls/Qt Quick Controls - Gallery" \
    "QtQuickControls/Qt Quick Controls - Event Calendar" \
    "QtQuickControls/Qt Quick Controls - Contact List"

# Fail the documentation build if there are more warnings than the limit
warninglimit = 0
