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

// **********************************************************************
// NOTE: the sections are not ordered by their logical order to avoid
// reshuffling the file each time the index order changes (i.e., often).
// Run the fixnavi.pl script to adjust the links to the index order.
// **********************************************************************

/*!
    \previouspage creator-faq.html
    \page creator-how-tos.html
    \nextpage creator-reference.html

    \title How-to

    The following topics describe how to use \QC to perform a particular task.

    \section1 Use the UI

    \list
        \li \l {Assign keyboard shortcuts}
        \li \l {Find a particular preference}
        \li \l {Find keyboard shortcuts}
        \li \l {Find menu items on \macos}
        \li \l {Import and export keyboard shortcuts}
        \li \l {Set high DPI scaling}
        \li \l {Set the number of recent files shown}
        \li \l {Show and hide sidebars}
        \li \l {Switch between modes}
        \li \l {Switch UI themes}
        \li \l {View output}
    \endlist

    \section1 Edit Code

     \list
        \li \l {Add code snippets to the auto-complete menu}
        \li \l {Enclose selected code in curly braces, parentheses, or double quotes}
        \li \l {Jump to a function in QML code}
        \li \l {Locate files using the keyboard}
        \li \l {Move between open files}
        \li \l {Move to symbols}
        \li \l {Paste text from clipboard history}
        \li \l {Perform calculations}
        \li \l {Search and replace across files using a regular expression}
        \li \l {Select the enclosing block in C++}
        \li \l {Sort lines alphabetically}
        \li \l {Switch to Edit mode}
        \li \l {Write down notes}
    \endlist

    \section1 Design UIs

     \list
        \li \l {Export SVG images}
        \li \l {View images}
    \endlist

    \section1 Manage Projects

    \list
        \li \l {Add a license header template for C++ code}
    \endlist

    \section1 Use \QC

    \list
        \li \l {Enable and disable plugins}
        \li \l {Find settings files}
        \li \l {Install plugins}
        \li \l {Run \QC from the command line}
    \endlist
*/

/*!
    \page creator-how-to-move-between-open-files.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Move between open files

    To quickly move between currently open files, press
    \key Ctrl+Tab.

    To move forward in the location history, press \key {Alt+Right}
    (\key {Cmd+Opt+Right} on \macos).

    To move backward, press \key {Alt+Left} (\key {Cmd+Opt+Left} on \macos).
    For example, if you use the \uicontrol Locator
    to jump to a symbol in the same file, you can jump back to your original
    location in that file by pressing \key {Alt+Left}.
*/

/*!
    \page creator-how-to-switch-to-edit-mode.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Switch to Edit mode

    To move to the \uicontrol Edit mode and currently active file, press
    \key Esc.

    If you already are in the \uicontrol Edit mode:

    \list

        \li The first press moves focus to the editor

        \li The second press closes secondary windows

    \endlist
*/

/*!
    \page creator-how-to-find-preferences.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-ui

    \title Find a particular preference

    To find a particular preference in \uicontrol Edit > \uicontrol Preferences,
    use the filter located at the top left of the \uicontrol Preferences dialog.

    \image qtcreator-preferences.webp {Filtering preferences}
*/

/*!
    \page creator-how-to-run-from-cli.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-use

    \title Run \QC from the command line

    You can launch \QC from the command line using the name of an
    existing \l{Managing Sessions}{session} or project file by entering
    the name as the command argument.

    For example, running \c {qtcreator somesession}, launches \QC and
    loads the session called \e somesession.

    For more information, see \l{Using Command Line Options}.
*/

/*!
    \page creator-how-to-move-to-symbols.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Move to symbols

    To move straight to a symbol used in a project, select the symbol in the
    \uicontrol Editor toolbar drop-down menu. For more information on the editor
    toolbar, see \l {Using the Editor Toolbar}.

    To jump to a symbol in the current file, press \key {Ctrl+K} to open the
    \uicontrol Locator, enter a period (.), and start typing the symbol name. Then
    select the symbol in the list. For more information on using the locator,
    see \l{Searching with the Locator}.

    Press \key Ctrl (\key Cmd on \macos) and click a symbol to move directly to
    the definition or the declaration of the symbol. You can also move the
    cursor on the symbol and press \key {F2}. For more information, see
    \l{Moving to Symbol Definition or Declaration}.
*/

/*!
    \page creator-how-to-locate-files-using-keyboard.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Locate files using the keyboard

    Use the \uicontrol Locator to browse
    through projects, files, classes, functions, documentation, and file systems.

    \image qtcreator-locator-open.webp "List of found files"

    To quickly access files not directly mentioned in your project, you can
    create your own locator filters. That way you can locate files in a
    directory structure you have defined.

    To create locator filters, select \uicontrol Edit > \uicontrol Preferences >
    \uicontrol Environment > \uicontrol Locator > \uicontrol Add.

    \image qtcreator-locator-customize.webp "Locator preferences"

    For more information, see \l{Creating Locator Filters}.
*/

/*!
    \page creator-how-to-perform-calculations.html
    \previouspage creator-how-to-move-between-open-files.html

    \ingroup creator-how-to-edit

    \title Perform calculations

    Open the \uicontrol Locator with \key {Ctrl+K} and type =, followed by a space.
    You can now do basic calculations, with options to copy the results to the clipboard
    by navigating through the entries and pressing \key {Enter}.

    \image qtcreator-locator.webp "List of locator filters"

    For more information, see \l{Executing JavaScript}.
*/

/*!
    \page creator-how-to-jump-to-functions-in-qml-code.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Jump to a function in QML code

    Open the \uicontrol Locator with \key {Ctrl+K} and type m, followed by a space.
    You can now go directly to any QML method in the file.
*/

/*!
    \page creator-how-to-add-license-header-templates.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects

    \title Add a license header template for C++ code

    Specify a file that has a license header for C++ in \uicontrol Edit >
    \uicontrol Preferences > \uicontrol C++ > \uicontrol {File Naming} >
    \uicontrol {License template}.

    \image qtcreator-options-cpp-files.png "File Naming preferences"

    The license file may have special placeholders enclosed
    in \c{%%} that are replaced when generating a new file:

    \list 1

        \li \c %YEAR%: Year
        \li \c %MONTH%: Month
        \li \c %DAY%: Day of the month
        \li \c %DATE%: Date
        \li \c %USER%: Username
        \li \c %FILENAME%: File name
        \li \c %CLASS%: Class name (if applicable)
        \li \c %$VARIABLE%: Contents of environment variable \c{VARIABLE}.

    \endlist
*/

/*!
    \page creator-how-to-paste-text-from-clipboard-history.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Paste text from clipboard history

    \QC stores copied text in clipboard history. To retrieve clips from the
    history, press \key {Ctrl+Shift+V} until the clip appears.
    The number of clips in the history is fixed to 10.
*/

/*!
    \page creator-how-to-sort-lines-alphabetically.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Sort lines alphabetically

    To sort selected lines alphabetically, select \uicontrol Edit >
    \uicontrol Advanced > \uicontrol {Sort Selected Lines} or press
    \key {Alt+Shift+S} (or \key Ctrl+Shift+S on \macos).
*/

/*!
    \page creator-enclose-code-in-characters.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Enclose selected code in curly braces, parentheses, or double quotes

    When you have selected code and enter one of the following opening
    characters, the matching closing character is added automatically
    at the end of the selection:

    \list
        \li {
        \li (
        \li "
    \endlist

    To specify whether to automatically insert matching characters,
    select \uicontrol Edit > \uicontrol Preferences >
    \uicontrol {Text Editor} > \uicontrol Completion.

    \image qtcreator-options-texteditor-completion.png "Completion preferences"
*/

/*!
    \page creator-how-to-select-enclosing-block.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Select the enclosing block in C++

    Press \key {Ctrl+U}.
*/

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

    \ingroup creator-how-to-edit

    \title Add code snippets to the auto-complete menu

    Add, modify, and remove snippets in the snippet editor.
    To open the editor, select \uicontrol Edit > \uicontrol Preferences
    > \uicontrol {Text Editor} > \uicontrol Snippets.

    \image qtcreator-snippet-modifiers.png "Snippets preferences"

    For more information, see \l {Adding and Editing Snippets}.
*/

/*!
    \page creator-how-to-write-notes.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-edit

    \title Write down notes

    To write down notes without having to worry about deleting the file
    later, create a new empty text file and save it to a temporary directory
    on your machine.

    \image qtcreator-scratch-buffer.webp {Scratch file open in the text editor}

    To create a scratch file and open it in the text editor:

    \list
        \li Select \uicontrol File > \uicontrol {New File} > \uicontrol General >
            \uicontrol {Scratch Buffer}.
        \li Press \key {Ctrl+N}.
    \endlist

    Use the up and down arrow keys and the tab key to navigate in the editor.

    The operating system will eventually remove the file automatically. To keep
    the file, save it as a new file somewhere else. If you accidentally close the
    file, find it in \uicontrol File > \uicontrol {Recent Files}.
*/

/*!
    \page creator-how-to-set-recent-files.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-ui

    \title Set the number of recent files shown

    To set the number of files to list in \uicontrol File >
    \uicontrol {Recent Files}:

    \list 1
        \li Select \uicontrol Edit > \uicontrol Preferences >
            \uicontrol Environment > \uicontrol System.
            \image qtcreator-options-environment-system.png {System preferences}
        \li In \uicontrol {Maximum number of entries in "Recent Files"}, set
            the number of files to show.
    \endlist
*/

/*!
    \page creator-how-to-search-and-replace-using-regexp.html
    \previouspage creator-how-to-move-between-open-files.html

    \ingroup creator-how-to-edit

    \title Search and replace across files using a regular expression

    As an example, say you want to replace equality checks (\c {foo == bar})
    with a function (\c {foo.equals(bar)}):

    \list 1
    \li Ensure that any work you have done is committed to version control,
        as the changes cannot be undone.
    \li Press \key {Ctrl+Shift+F} to bring up the \uicontrol {Advanced Find}
        form.
    \li Change the scope to whatever is appropriate for your search.
    \li Under the \uicontrol {Search for} text field, select
        the \uicontrol {Use regular expressions} check box.
    \li Enter the following text in the \uicontrol {Search for} text field:
        \badcode
        if \((.*) == (.*)\)
        \endcode
    \li Press \uicontrol {Search & Replace} to see a list of search results.
    \li In the \uicontrol {Replace with} text field, enter the following text:
        \badcode
        if (\1.strictlyEquals(\2))
        \endcode
    \li Press \uicontrol Replace to replace all instances of the text.
    \endlist

    For more information, see \l {Advanced Search}.
*/
