Grouping Things
The grouping commands relate classes to defined groups and modules. The groups are used when generating lists of related classes in the documentation, while the modules are elements of Qt's structure.
Commands
\ingroup
The \ingroup command indicates that the given class, page, or other entity belongs to a certain group of related documentation.
An entity may belong to multiple groups.
The \ingroup command's argument is a group name, but note that the command considers the rest of the line as part of its argument. Make sure that the group name is followed by a linebreak.
/*! \class QDir \brief The QDir class provides access to directory structures and their contents. \ingroup io ... */
This adds the QDir class to the io
group. An entry for QDir will then appear on the list created with, for example, the \annotatedlist command with an argument io
.
QDoc automatically generates links to associated groups on a C++ class, namespace, or header reference page. For example, given the above documentation for class QDir and the following \group page:
/* \group io \title Input/Output and Networking ... */
QDoc then outputs a statement on the QDir reference page:
- QDir is part of Input/Output and Networking.
For HTML output, QDoc also generates a link to the group page as part of the navigation bar (breadcrumbs). If multiple \ingroup commands are used, the first one that references a documented \group is selected.
See also \group.
\inmodule
The \inmodule command relates a class to the module specified by the command's argument.
For the basic classes in Qt, a class's module is determined by its location, namely its directory. However, for extensions like ActiveQt and Qt Designer, a class must be related to a module explicitly.
The command's argument is a module name, but note that the command considers the rest of the line as part of its argument. Make sure that the module name is followed by a linebreak.
/*!
\class QDesignerTaskMenuExtension
\inmodule QtDesigner
* /
This ensures that the QDesignerTaskMenuExtension class is included in the Qt Designer module, which means, for example, that the class will appear on the list created by calling the \generatelist command with the {classesbymodule QtDesigner}
argument.
See also \module and \generatelist.