qtbase/doc/global
Thibaut Cuvelier 6cfd7944bf Implement \tabs for DocBook
The existing implementation only works for online HTML and the
workaround generates nonsensical DocBook that not a single processor
could parse.

This implementation is not ideal, but gives enough information for
processors to do their job (i.e. the tab title and contents are uniquely
linked, the tabs in a group are related). Unaware processors still
render useful information to the user thanks to links.

The ideal presentation would use a container such as `formalgroup` for
the tabs, but there is no notion of tab in DocBook.

The missing part in this patch is allowing all uses of tabs with DocBook; they are still guarded by `\if defined(onlinedocs)`.

For instance, this change updates `porting-to-ios.xml` from:

```xml
<db:listitem…>
<db:para>If your application uses imports or plugins that depend on special Qt modules, these Qt modules should be added to your build configuration file. For example, if your application uses the Qt Multimedia import in QML, you should add the following to your .pro or CMakeLists.txt file: </db:para>
<db:section xml:id="using-cmake">
<db:title>Using CMake</db:title>
<db:programlisting language="cpp" role="bad">find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(my_project PRIVATE Qt6::Multimedia)
</db:programlisting>
</db:section>
<db:section xml:id="using-qmake">
<db:title>Using qmake</db:title>
<db:programlisting language="cpp" role="bad">QT += multimedia
</db:programlisting>
<db:para>In Qt for iOS, everything is compiled statically and placed into the application bundle. The applications are &quot;sandboxed&quot; inside their bundles and cannot make use of shared object files. Because of this, also the plugins used by the Qt modules need to be statically linked. To do this, define the required plugins using the <db:link xlink:href="qmake-variable-reference.xml#qtplugin">QTPLUGIN</db:link> variable.</db:para>
</db:section>
```

to:

```xml
<db:listitem…>
<db:para>If your application uses imports or plugins that depend on special Qt modules, these Qt modules should be added to your build configuration file. For example, if your application uses the Qt Multimedia import in QML, you should add the following to your .pro or CMakeLists.txt file: </db:para>
<db:bridgehead xml:id="tab-cmake" renderas="sect5" role="tabbed checked tab-group_build-ios-app" xlink:href="#tab-cmake_contents">CMake</db:bridgehead>
<db:bridgehead xml:id="tab-qmake" renderas="sect5" role="tabbed checked tab-group_build-ios-app" xlink:href="#tab-qmake_contents">qake</db:bridgehead>
<db:sidebar xml:id="tab-cmake_contents">
<db:programlisting language="cpp" role="bad">find_package(Qt6 REQUIRED COMPONENTS Multimedia)
  target_link_libraries(my_project PRIVATE Qt6::Multimedia)
</db:programlisting>
</db:sidebar>
<db:sidebar xml:id="tab-qmake_contents">
<db:programlisting language="cpp" role="bad">QT += multimedia
</db:programlisting>
</db:sidebar>
```

Change-Id: I63f3e8d03a5f4ee52e7c67971d14d4497dd78cb8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2025-04-03 21:39:13 +00:00
..
externalsites Doc: Update copyright year in the global configuration 2025-03-27 14:57:43 +00:00
includes Doc: Update \externalpage entries for Qt Creator documentation 2024-08-02 14:18:19 +02:00
includes-online
snippets/code Change doc snippet license 2024-02-02 16:52:11 +00:00
template Doc: Don't add padding to div that wraps the pre element 2025-03-14 13:03:41 +00:00
tools-doc-front-page Add new icons for the tools doc front page template 2024-11-11 17:39:29 +02:00
compat.qdocconf Doc: Drop "Unknown base" spurious regex from config 2025-03-26 16:43:21 +01:00
config.qdocconf Doc: Update copyright year in the global configuration 2025-03-27 14:57:43 +00:00
cpp-doc-macros.qdocconf Create qdoc macros for C++ class docs 2.1: qHash() 2024-11-27 12:39:55 +01:00
externalsites.qdocconf
fileextensions.qdocconf qdoc: Add *.webp as an default image suffix 2023-02-21 18:56:07 +00:00
grid.qdocconf Doc: Drop parentheses and fifth macro argument in offline '\grid' 2024-09-20 16:28:55 +02:00
html-config.qdocconf Doc: Use Qt Design System colors also in help CSS 2025-03-04 16:00:50 +01:00
html-footer-online.qdocconf Doc: Update copyright year in the global configuration 2025-03-27 14:57:43 +00:00
html-footer.qdocconf Doc: Update copyright year in the global configuration 2025-03-27 14:57:43 +00:00
html-header-offline.qdocconf Doc: Add CSS styling and icon for 'technical preview' items 2023-05-10 04:40:38 +00:00
html-header-online.qdocconf Doc: Add CSS styling and icon for 'technical preview' items 2023-05-10 04:40:38 +00:00
htmltabs.qdocconf Implement \tabs for DocBook 2025-04-03 21:39:13 +00:00
macros-online.qdocconf Doc: Add DocBook version of youtube macro 2023-06-14 16:18:55 +02:00
macros.qdocconf Docs: Replace supported Android NDK r26b with r27c 2025-03-25 14:45:15 +00:00
manifest-meta.qdocconf Docs: Create \Q4A macro for "Qt for Android" and replace instances 2025-02-28 06:35:03 +00:00
qt-cpp-defines.qdocconf Doc: Add convenience macros for specifying C++ type ordering information 2023-12-01 11:58:36 +00:00
qt-html-templates-offline-simple.qdocconf
qt-html-templates-offline.qdocconf Doc: Use Qt Design System colors also in help CSS 2025-03-04 16:00:50 +01:00
qt-html-templates-online.qdocconf
qt-module-defaults-offline.qdocconf
qt-module-defaults-online-commercial.qdocconf Doc: Fix online macros for commercial template 2022-06-21 22:08:34 +00:00
qt-module-defaults-online.qdocconf Doc: Update copyright year in the global configuration 2025-03-27 14:57:43 +00:00
qt-module-defaults.qdocconf
warninglimit.qdocconf Doc: Move the warninglimit configuration to doc/global 2023-06-29 12:08:34 +00:00