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

/*!
    \page creator-file-creating.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects-files

    \title Create files

    Use wizard templates to add individual files to your \l{Creating Projects}
    {projects}.

    To add files to projects, select \uicontrol File > \uicontrol {New File}, and
    then select the type of the file.

    \image qtcreator-new-file.webp {New File wizard}

    \note You can also use the \c f locator filter to create a new
    file and open it in the editor. However, you must manually add
    the created file to a project.

    \section1 Select file type

    The following table lists the types of wizard templates that you can use
    for creating files. The \uicontrol {New File} dialog shows detailed information about each file
    wizard template.

    \table
    \header
        \li Category
        \li Purpose
    \row
        \li \uicontrol {C/C++}
        \li Header and source files for new classes.
    \row
        \li \uicontrol {Modeling}
        \li State Chart XML (SCXML) files, Universal Modeling Language (UML)
            style models, and scratch models that use a temporary file.
    \row
        \li \uicontrol {Qt}
        \li Source and header files for item, table,
            or list models, \QD forms and a matching classes for Qt Widgets
            projects, Qt resource and translation files, as well as QML and
            JavaScript files for Qt Quick projects.
    \row
        \li \uicontrol {Compiler Explorer}
        \li Example setup for using Compiler Explorer to compile C++ or Python
            code.
    \row
        \li \uicontrol {GLSL}
        \li OpenGL fragment and vertex shaders.
    \row
        \li \uicontrol {General}
        \li Markdown files, empty files that you can save with any filename
            extension, and scratch buffers that use temporary files.
    \row
        \li \uicontrol {Java}
        \li Class files.
    \row
        \li \uicontrol {Python}
        \li Class and script files for Python projects.
    \row
        \li \uicontrol {vcpkg} (experimental)
        \li vcpkg package manager manifest files (vcpkg.json).
    \row
        \li \uicontrol {Test Case}
        \li Test framework specific file holding a new test case, to be
            added to projects already using a test framework.
    \row
        \li \uicontrol {Nim} (experimental)
        \li Empty Nim source and script files.
    \endtable

    \sa {Navigate with locator}, {Add Files}{How To: Add Files},
    {Add tests to existing test projects}, {Create UML-style models},
    {Use project wizards}
*/

/*!
    \page creator-how-to-create-cpp-classes.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects-files

    \title Create C++ classes

    To create a C++ header and source file for a new class that you can add to a
    C++ project:

    \list 1
        \li Select \uicontrol File > \uicontrol {New File} >
            \uicontrol {C++ Class Wizard} > \uicontrol Choose.
        \li Specify the class name, base class, and header and source files for
            the class.
            \image qtcreator-cpp-class-wizard.png {Enter Class Name dialog}
    \endlist

    The wizard supports namespaces. To use a namespace, enter a qualified
    class name in the \uicontrol {Class name} field. For example:
    \c MyNamespace::MySubNamespace::MyClass. The wizard suggests
    existing namespaces and class names as you type.

    You can also create your own project and class wizards.

    \sa {Create files}, {Set C++ file naming preferences}, {Use project wizards},
    {Custom Wizards}
*/

/*!
    \page creator-how-to-set-cpp-file-naming.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects-files

    \title Set C++ file naming preferences

    When you use the new file wizard to create a C++ header and source file for a
    new class in a C++ project, the names of the header and source file are based
    on the class name. To change the default suffix of a file for a project,
    select \uicontrol Projects > \uicontrol {Project Settings} >
    \uicontrol {C++ File Naming}.

    \image qtcreator-projects-settings-cpp-file-naming.webp {C++ File Naming settings for a project}

    In the \uicontrol {License template} field, enter
    \l{Using Variables in Wizards}{predefined wizard variables} to specify the
    path and filename of the license to use in the source and header files.

    To globally change the preferences, select \preferences > \uicontrol {C++} >
    \uicontrol {File Naming}.

    \sa {Create C++ classes}, {Use project wizards}
*/

/*!
    \page creator-how-to-create-resource-files.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects-files

    \title Create resource files

    The \l{The Qt Resource System}{Qt Resource System} is a platform-independent
    mechanism for storing files in the application's executable.

    To create a resource file:

    \list 1
        \li Select \uicontrol File > \uicontrol {New File} > \uicontrol {Qt} >
            \uicontrol {Qt Resource File} > \uicontrol Choose.
            \image qtcreator-new-file-qrc.webp {New File dialog}
        \li Follow the instructions of the wizard to create a resource
            collection file (.qrc).
        \li Open the resource file in the resource editor.
            \image qtcreator-add-resource.png "Editing resource files"
        \li Select \uicontrol {Add Files} to locate and add individual files.
    \endlist

    \section1 Sort resource files

    To list the folders and files in ascending alphabetic order in the source
    tree, select \uicontrol {Sort Alphabetically} in the context menu.

    \section1 Set a path prefix

    By default, resources in the application are accessible under the same file
    name as they have in the source tree, with a \c{:/} prefix, or by a URL with
    a \c qrc scheme. To specify a path prefix for all files in the \c .qrc file,
    select \uicontrol {Add Prefix} and enter the prefix in the \uicontrol Prefix
    field.

    \section1 Set a locale

    Some resources need to change based on the user's locale, such as
    translation files or icons. You can specify a locale in the
    \uicontrol Language field.

    Use a lowercase, two-letter \l {https://www.iso.org/iso-639-language-codes.html}
    {ISO 639 language code}, such as \e de, \e en, or \e fr.

    \section1 Remove resource files

    Select \uicontrol Remove to remove the selected file from the resource
    collection.

    In the \uicontrol {Remove File} dialog, select the
    \uicontrol {Delete file permanently} check box to remove the file from
    the file system.

    \image qtcreator-remove-file.webp {Remove File dialog}

    To remove files that cannot be found in the file system,
    select \uicontrol {Remove Missing Files}.

    The above functions are also available in the context menu in the
    \l Projects view.

    \sa {Create files}, {Use project wizards}, {QLocale}
*/

/*!
    \page creator-how-to-create-opengl-shaders.html
    \previouspage creator-how-tos.html

    \ingroup creator-how-to-projects-files

    \title Create OpenGL fragment and vertex shaders

    Qt supports integration with OpenGL implementations on all platforms, so you
    can display hardware accelerated 3D graphics alongside a more conventional
    user interface. For more information, see \l{Qt GUI}.

    You can use the QOpenGLShader class to compile OpenGL shaders written in the
    OpenGL Shading Language (GLSL) and in the OpenGL/ES Shading Language
    (GLSL/ES). QOpenGLShader and QOpenGLShaderProgram shelter you from the
    details of compiling and linking vertex and fragment shaders.

    To create OpenGL shaders:

    \list 1
        \li Select \uicontrol File > \uicontrol {New File} > \uicontrol {GLSL}.
            \image qtcreator-new-opengl-file.png {New OpenGL file wizard}
        \li Select the type of the shader to create, and then select
            \uicontrol Choose.
        \li Follow the instructions of the wizard to create the shader file.
        \li Open the shader file in the code editor, and write the shader code
            in GLSL or GLSL/ES. The code editor offers syntax highlighting and
            code completion for the files.
    \endlist

    \sa {Create files}, {Use project wizards}
*/
