diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-09-28 15:23:47 +0200 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-10-15 06:41:34 +0000 |
commit | 261e4c619214af5e5cf95ec08a7d46d702ae0a93 (patch) | |
tree | b670a6f347a8a8053bee850162c6ed542fcb5524 /src/doc | |
parent | 0ecd391912f6338d5aef6105600fc8c321c83bd8 (diff) |
Doc: Add documentation for C++ classes
Currently, only QML types are documented.
Task-number: QTBUG-69686
Change-Id: Idc13bff25a154e88c6c769c0af37204573ec1118
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'src/doc')
-rw-r--r-- | src/doc/QtDeviceUtilitiesDoc | 6 | ||||
-rw-r--r-- | src/doc/config/html-offline.qdocconf | 29 | ||||
-rw-r--r-- | src/doc/config/qtdeviceutilities-online.qdocconf | 5 | ||||
-rw-r--r-- | src/doc/config/qtdeviceutilities-project.qdocconf | 55 | ||||
-rw-r--r-- | src/doc/config/qtdeviceutilities.qdocconf | 2 | ||||
-rw-r--r-- | src/doc/doc.pro | 12 | ||||
-rw-r--r-- | src/doc/qtdeviceutilities-project.qdocconf | 85 | ||||
-rw-r--r-- | src/doc/qtdeviceutilities.qdocconf | 5 | ||||
-rw-r--r-- | src/doc/src/qtdeviceutilities-examples.qdoc | 45 | ||||
-rw-r--r-- | src/doc/src/qtdeviceutilities-index.qdoc | 73 | ||||
-rw-r--r-- | src/doc/src/qtdeviceutilities-module-qml.qdoc (renamed from src/doc/src/qtdeviceutilities.qdoc) | 45 | ||||
-rw-r--r-- | src/doc/src/qtdeviceutitilies-module-cpp.qdoc | 48 | ||||
-rw-r--r-- | src/doc/src/wifiexample.qdoc | 2 |
13 files changed, 294 insertions, 118 deletions
diff --git a/src/doc/QtDeviceUtilitiesDoc b/src/doc/QtDeviceUtilitiesDoc new file mode 100644 index 0000000..3b3e297 --- /dev/null +++ b/src/doc/QtDeviceUtilitiesDoc @@ -0,0 +1,6 @@ +#include <QtNetworkSettings/QtNetworkSettings> +#include <QtBluetoothSettings/QtBluetoothSettings> +#include <QtLocaleSettings/QtLocaleSettings> +#include <QtTimeDateSettings/QtTimeDateSettings> +#include <QtDisplaySettings/QtDisplaySettings> +#include <QtLocalDevice/QtLocalDevice> diff --git a/src/doc/config/html-offline.qdocconf b/src/doc/config/html-offline.qdocconf deleted file mode 100644 index f9c92b7..0000000 --- a/src/doc/config/html-offline.qdocconf +++ /dev/null @@ -1,29 +0,0 @@ -# use the global Qt template with modifications to the html footer -include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) -include($QT_INSTALL_DOCS/global/qt-cpp-defines.qdocconf) -include($QT_INSTALL_DOCS/global/fileextensions.qdocconf) - -HTML.nobreadcrumbs = "true" - -# \welcome macro is used in online docs, no output in offline mode -macro.welcome.HTML = "\n" - -HTML.footer = \ - " <div class=\"ft\">\n" \ - " <span></span>\n" \ - " </div>\n" \ - "</div> \n" \ - "<div class=\"footer\">\n" \ - " <p>\n" \ - " <acronym title=\"Copyright\">©</acronym> 2016 The Qt Company Ltd.</p>\n" \ - " <p>\n" \ - " Licensees holding valid commercial Qt licenses may use this document in\n" \ - " accordance with the commercial license agreement provided with the\n" \ - " Software or, alternatively, in accordance with the terms contained in a\n" \ - " written agreement between you and The Qt Company.<\p>\n" \ - " <p>\n" \ - " Qt and respective logos are trademarks of The Qt Company \n" \ - " in Finland and/or other countries worldwide. All other trademarks are property\n" \ - " of their respective owners. <a title=\"Privacy Policy\"\n" \ - " href=\"http://www.qt.io/terms-conditions/#section-2\">Privacy Policy</a></p>\n" \ - "</div>\n" diff --git a/src/doc/config/qtdeviceutilities-online.qdocconf b/src/doc/config/qtdeviceutilities-online.qdocconf deleted file mode 100644 index 59cac90..0000000 --- a/src/doc/config/qtdeviceutilities-online.qdocconf +++ /dev/null @@ -1,5 +0,0 @@ -include($QT_INSTALL_DOCS/global/qt-module-defaults-online-commercial.qdocconf) -include(qtdeviceutilities-project.qdocconf) - -# sidebar used for online template -HTML.stylesheets += style/qt5-sidebar.html diff --git a/src/doc/config/qtdeviceutilities-project.qdocconf b/src/doc/config/qtdeviceutilities-project.qdocconf deleted file mode 100644 index d176779..0000000 --- a/src/doc/config/qtdeviceutilities-project.qdocconf +++ /dev/null @@ -1,55 +0,0 @@ -project = QtDeviceUtilities -description = Qt Device Utilities $QT_VERSION -version = $QT_VERSION -macro.maintitle = "\\title Qt Device Utilities $QT_VERSION" - -sourcedirs += ../src \ - ../../imports/localesettings \ - ../../imports/bluetoothsettings \ - ../../imports/displaysettings \ - ../../imports/localdevice \ - ../../imports/localesettings \ - ../../imports/timedatesettings \ - ../../imports/networksettings \ - ../../settingsui/settingsuiplugin \ - ../../networksettings - -headerdirs += ../../networksettings - -exampledirs += ../../../examples - -imagedirs += ../images - -indexes = $QT_INSTALL_DOCS/qtquick/qtquick.index \ - $QT_INSTALL_DOCS/qtqml/qtqml.index \ - $QT_INSTALL_DOCS/qtdoc/qtdoc.index \ - $QT_INSTALL_DOCS/qtgui/qtgui.index \ - $QT_INSTALL_DOCS/qtcore/qtcore.index \ - $QT_INSTALL_DOCS/qtquickcontrols/qtquickcontrols.index - -qhp.projects = QtDeviceUtilities - -qhp.QtDeviceUtilities.file = qtdeviceutilities.qhp -qhp.QtDeviceUtilities.namespace = io.qt.qtdeviceutilities.$QT_VERSION_TAG -qhp.QtDeviceUtilities.virtualFolder = qtdeviceutilities -qhp.QtDeviceUtilities.indexTitle = Qt Device Utilities $QT_VERSION -qhp.QtDeviceUtilities.indexRoot = - -qhp.QtDeviceUtilities.subprojects = modules -qhp.QtDeviceUtilities.subprojects.modules.title = Modules -qhp.QtDeviceUtilities.subprojects.modules.indexTitle = Qt Device Utilities $QT_VERSION -qhp.QtDeviceUtilities.subprojects.modules.selectors = qmlmodule module -qhp.QtDeviceUtilities.subprojects.modules.sortPages = true - -macro.B2Q = "Boot to Qt" -macro.SDK = "Qt for Device Creation" -macro.QAS = "Qt Automotive Suite" -macro.B2QA = "\\e {Boot to Qt for embedded Android}" -macro.B2QL = "\\e {Boot to Qt for embedded Linux}" - -# Keep Device Creation as the landing page -navigation.landingpage = "Qt for Device Creation" -navigation.qmltypespage = "Qt Device Utilities $QT_VERSION" - -Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY -Cpp.ignoretokens += Q_DEL_EXPORT diff --git a/src/doc/config/qtdeviceutilities.qdocconf b/src/doc/config/qtdeviceutilities.qdocconf deleted file mode 100644 index 9c56ed8..0000000 --- a/src/doc/config/qtdeviceutilities.qdocconf +++ /dev/null @@ -1,2 +0,0 @@ -include(html-offline.qdocconf) -include(qtdeviceutilities-project.qdocconf) diff --git a/src/doc/doc.pro b/src/doc/doc.pro index d55b9c3..c038f1e 100644 --- a/src/doc/doc.pro +++ b/src/doc/doc.pro @@ -1,9 +1,9 @@ TEMPLATE = aux -build_online_docs: { - QMAKE_DOCS_TARGETDIR = qtdeviceutilities - QMAKE_DOCS = $$PWD/config/qtdeviceutilities-online.qdocconf -} else { - QMAKE_DOCS = $$PWD/config/qtdeviceutilities.qdocconf -} + +CONFIG += force_qt # Needed for Qt include paths + +QMAKE_DOCS = $$PWD/qtdeviceutilities.qdocconf + +build_online_docs: QMAKE_DOCS_TARGETDIR = qtdeviceutilities QMAKE_DOCS_OUTPUTDIR = $$OUT_PWD/qtdeviceutilities diff --git a/src/doc/qtdeviceutilities-project.qdocconf b/src/doc/qtdeviceutilities-project.qdocconf new file mode 100644 index 0000000..e8abc97 --- /dev/null +++ b/src/doc/qtdeviceutilities-project.qdocconf @@ -0,0 +1,85 @@ +include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) + +project = QtDeviceUtilities +description = Qt Device Utilities $QT_VERSION +version = $QT_VERSION +macro.maintitle = "\\title Qt Device Utilities $QT_VERSION" + +includepaths += -I . +# -I ../bluetoothsettings \ +# -I ../displaysettings \ +# -I ../localdevice \ +# -I ../localesettings \ +# -I ../networksettings \ +# -I ../timedatesettings + +# pass a custom module header to Clang +moduleheader = QtDeviceUtilitiesDoc + +sourcedirs += src \ + ../imports/localesettings \ + ../imports/bluetoothsettings \ + ../imports/displaysettings \ + ../imports/localdevice \ + ../imports/localesettings \ + ../imports/timedatesettings \ + ../imports/networksettings \ + ../bluetoothsettings \ + ../displaysettings \ + ../localdevice \ + ../localesettings \ + ../networksettings \ + ../timedatesettings \ + ../settingsui/settingsuiplugin + +headerdirs += ../bluetoothsettings \ + ../displaysettings \ + ../localdevice \ + ../localesettings \ + ../networksettings \ + ../timedatesettings + +exampledirs += ../../examples + +imagedirs += images + +depends = qtcore qtdoc qtgui qtqml qtquick qtquickcontrols qtwidgets + +qhp.projects = QtDeviceUtilities + +qhp.QtDeviceUtilities.file = qtdeviceutilities.qhp +qhp.QtDeviceUtilities.namespace = io.qt.qtdeviceutilities.$QT_VERSION_TAG +qhp.QtDeviceUtilities.virtualFolder = qtdeviceutilities +qhp.QtDeviceUtilities.indexTitle = Qt Device Utilities $QT_VERSION +qhp.QtDeviceUtilities.indexRoot = + +qhp.QtDeviceUtilities.subprojects = classes qmltypes examples + +qhp.QtDeviceUtilities.subprojects.classes.title = C++ Classes +qhp.QtDeviceUtilities.subprojects.classes.indexTitle = Qt Device Utilities C++ Classes +qhp.QtDeviceUtilities.subprojects.classes.selectors = class fake:headerfile +qhp.QtDeviceUtilities.subprojects.classes.sortPages = true + +qhp.QtDeviceUtilities.subprojects.modules.title = QML Types +qhp.QtDeviceUtilities.subprojects.modules.indexTitle = Qt Device Utilities QML Types +qhp.QtDeviceUtilities.subprojects.modules.selectors = qmlmodule module +qhp.QtDeviceUtilities.subprojects.modules.sortPages = true + +qhp.QtWebEngine.subprojects.examples.title = Examples +qhp.QtWebEngine.subprojects.examples.indexTitle = Qt Device Utilities Examples +qhp.QtWebEngine.subprojects.examples.selectors = doc:example +qhp.QtWebEngine.subprojects.examples.sortPages = true + +macro.B2Q = "Boot to Qt" +macro.SDK = "Qt for Device Creation" +macro.QAS = "Qt Automotive Suite" +macro.B2QA = "\\e {Boot to Qt for embedded Android}" +macro.B2QL = "\\e {Boot to Qt for embedded Linux}" + +# Keep Device Creation as the landing page +navigation.landingpage = "Qt for Device Creation" +navigation.qmltypespage = "Qt Device Utilities QML Types" +navigation.cppclassespage = "Qt Device Utilities C++ Classes" + +Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY +Cpp.ignoretokens += Q_DEL_EXPORT diff --git a/src/doc/qtdeviceutilities.qdocconf b/src/doc/qtdeviceutilities.qdocconf new file mode 100644 index 0000000..5b56cf1 --- /dev/null +++ b/src/doc/qtdeviceutilities.qdocconf @@ -0,0 +1,5 @@ +include(qtdeviceutilities-project.qdocconf) + +# Turn off single-directory output mode +HTML.nosubdirs = "false" +HTML.outputsubdir = qtdeviceutilities diff --git a/src/doc/src/qtdeviceutilities-examples.qdoc b/src/doc/src/qtdeviceutilities-examples.qdoc new file mode 100644 index 0000000..e912b94 --- /dev/null +++ b/src/doc/src/qtdeviceutilities-examples.qdoc @@ -0,0 +1,45 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Device Utilities module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + + \group qtdeviceutilities-examples + \title Qt Device Utilities Examples + \brief Examples on using Qt Device Utilities. + \ingroup-all-examples + + \l{Qt Device Utilities WiFi Tutorial} demonstrates how you can use + the \l{QtDeviceUtilities.NetworkSettings}{NetworkSettings} module for + connecting to WiFi. + + The source code of Qt Device Utilities is availabe via a public Git repository. + For more information, see \l{Device Utilities Git Repository}. + + You find the Qt Device Utilities module sources under + \l{http://code.qt.io/cgit/qt/qtdeviceutilities.git/tree/src}. Especially, + the sources of \l{Settings UI} provide examples of how to use Qt Device Utilities. +*/ diff --git a/src/doc/src/qtdeviceutilities-index.qdoc b/src/doc/src/qtdeviceutilities-index.qdoc new file mode 100644 index 0000000..af4d26e --- /dev/null +++ b/src/doc/src/qtdeviceutilities-index.qdoc @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtdeviceutilities-index.html + \title Qt Device Utilities + \brief Provides functionality that is useful for embedded applications. + + \section1 Getting Started + + To include the definitions of the module's classes, use the following + directive: + + \code + #include <QDeviceUtilities> + \endcode + + To import the QML types into your application, use the following import + statements in your .qml file: + + \code + import QtDeviceUtilities.BluetoothSettings 1.0 + import QtDeviceUtilities.DisplaySettings 1.0 + import QtDeviceUtilities.LocalDeviceSettings 1.0 + import QtDeviceUtilities.LocaleSettings 1.0 + import QtDeviceUtilities.NetworkSettings 1.0 + import QtDeviceUtilities.SettingsUI 1.0 + import QtDeviceUtilities.TimeDateSettings 1.0 + \endcode + + To link against the module, add this line to your qmake .pro file: + + \code + QT += deviceutilities + \endcode + + \section1 Examples + + \list + \li \l {Qt Device Utilities Examples} + \endlist + + \section1 Reference + + \list + \li \l {Qt Device Utilities C++ Classes} {C++ Classes and Namespaces} + \li \l {Qt Device Utilities QML Types} {QML Types} + \endlist +*/ diff --git a/src/doc/src/qtdeviceutilities.qdoc b/src/doc/src/qtdeviceutilities-module-qml.qdoc index 9c7c5d5..44fc688 100644 --- a/src/doc/src/qtdeviceutilities.qdoc +++ b/src/doc/src/qtdeviceutilities-module-qml.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Device Utilities module of the Qt Toolkit. @@ -25,11 +25,30 @@ ** ****************************************************************************/ /*! - \page qtee-module-reference.html - \maintitle - - The \B2Q stack in \SDK includes a number of additional modules that are - useful for embedded applications. + \qmlmodule QtDeviceutilities 1.0 + \title Qt Device Utilities QML Types + \brief Provides additional modules that are useful for embedded + applications. + \ingroup qmlmodules + + The QML types in the modules can be imported into your application using the + following import statements in your .qml file: + + \badcode + import QtDeviceUtilities.BluetoothSettings 1.0 + import QtDeviceUtilities.DisplaySettings 1.0 + import QtDeviceUtilities.LocalDeviceSettings 1.0 + import QtDeviceUtilities.LocaleSettings 1.0 + import QtDeviceUtilities.NetworkSettings 1.0 + import QtDeviceUtilities.SettingsUI 1.0 + import QtDeviceUtilities.TimeDateSettings 1.0 + \endcode + + To link against the module, add this line to your qmake .pro file: + + \badcode + QT += deviceutilities + \endcode \section1 Modules @@ -57,19 +76,5 @@ \section2 Settings UI \generatelist qmltypesbymodule QtDeviceUtilities.SettingsUI - - \section1 Tutorial and Example Code - - \l{Qt Device Utilities WiFi Tutorial} demonstrates how you can use - the \l{QtDeviceUtilities.NetworkSettings}{NetworkSettings} module for - connecting to WiFi. - - The source code of Qt Device Utilities is availabe via a public Git repository. - For more information, see \l{Device Utilities Git Repository}. - - You find the Qt Device Utilities module sources under - \l{http://code.qt.io/cgit/qt/qtdeviceutilities.git/tree/src}. Especially, - the sources of \l{Settings UI} provide examples of how to use Qt Device Utilities. - */ diff --git a/src/doc/src/qtdeviceutitilies-module-cpp.qdoc b/src/doc/src/qtdeviceutitilies-module-cpp.qdoc new file mode 100644 index 0000000..caa9346 --- /dev/null +++ b/src/doc/src/qtdeviceutitilies-module-cpp.qdoc @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2018 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \module QtDeviceUtilities + \title Qt Device Utilities C++ Classes + \brief Provides classes that are useful for embedded applications. + \ingroup modules + + \qtvariable deviceutilities + + To include the definitions of the module's classes, use the following + directive: + + \badcode + #include <QtDeviceUtilities> + \endcode + + To link against the module, add this line to your qmake .pro file: + + \badcode + QT += qtdeviceutilities + \endcode +*/ diff --git a/src/doc/src/wifiexample.qdoc b/src/doc/src/wifiexample.qdoc index ce5d43c..2de002b 100644 --- a/src/doc/src/wifiexample.qdoc +++ b/src/doc/src/wifiexample.qdoc @@ -27,7 +27,7 @@ /*! \page qtdeviceutilities-wifitutorial.html \title Qt Device Utilities WiFi Tutorial - \previouspage qtee-module-reference.html + \previouspage Qt Device Utilities Examples \section1 Importing NetworkSettings |