// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page creator-how-to-document-code.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Document code

    When you write documentation comments in the \uicontrol Edit mode, you can
    enable Doxygen code blocks and add brief descriptions and leading asterisks
    automatically. Also, you can select the Doxygen command prefix to use.

    To set preferences for documentation comments for a particular project,
    select \uicontrol Projects > \uicontrol {Project Settings} >
    \uicontrol {Documentation Comments}, and clear
    \uicontrol {Use global settings}.

    \image {qtcreator-preferences-documentation-comments.webp} {Documentation Comments in Project Settings}

    To set global preferences, select \preferences >
    \uicontrol {Text Editor} > \uicontrol {Documentation Comments}.

    \sa {Building and running projects}, {Documentation Comments}
*/

/*!
    \page creator-preferences-text-editor-documentation-comments.html
    \previouspage creator-reference.html

    \ingroup creator-reference-editors

    \title Documentation Comments

    \brief Set preferences for generating Doxygen-style documentation
    comments in the text editor.

    To set global preferences for documentation comments, select
    \preferences > \uicontrol {Text Editor} > \uicontrol {Documentation
    Comments}.

    \image {qtcreator-preferences-text-editor-documentation-comments.webp} {Documentation Comments in Text Editor Preferences}

    To override the global preferences for a particular project, see
    \l {Document code}.

    The following table describes the preferences you can set.

    \table
    \header
        \li Preference
        \li Description
    \row
        \li \uicontrol {Enable Doxygen blocks}
        \li Automatically create a Doxygen comment when you press \key Enter
            after typing \c{/**}, \c{/*!}, \c{//!}, or \c{///}.
    \row
        \li \uicontrol {Generate brief description}
        \li Add a \c brief command with an initial description for the
            documented declaration. Available when \uicontrol {Enable
            Doxygen blocks} is selected.
    \row
        \li \uicontrol {Add leading asterisks}
        \li Add leading asterisks when you continue a C, C++, or Java
            documentation comment (\c{/*}, \c{/*!}, or \c{/**}) on a new
            line.
    \row
        \li \uicontrol {Doxygen command prefix}
        \li Select whether to prefix Doxygen commands with \c @ or \c
            {\\}. Doxygen allows both. Select \uicontrol Automatic to use
            \c @ if the surrounding comment starts with \c{/**} or \c{///},
            and \c {\\} if it starts with \c{/*!} or \c{//!}.
    \endtable

    \sa {Document code}, {Configure editors}{How to: Configure editors}
*/
