// 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
    \nextpage

    \title Adding files

    \quotation
    \l {Add files}{How to: Add files}
    \endquotation

    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 {Lua}
        \li Simple Lua files for \l {Extending \QC with Lua}{Lua plugins} and
            script files that can access \QC internals and be triggered by an action.
    \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++, Python,
            or Qt and C++ 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 (\c 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/C++} >
            \uicontrol {C++ Class} > \uicontrol Choose.
        \li Specify the class name, base class, and header and source files for
            the class.
            \image {qtcreator-cpp-class-wizard.webp} {Define Class 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 {Adding 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 (\c .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{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
    \uicontrol {Delete file permanently} 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 {Adding 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 and Vulkan shaders

    Qt supports integration with OpenGL and Vulkan 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 or Vulkan shaders:

    \list 1
        \li Select \uicontrol File > \uicontrol {New File} > \uicontrol {GLSL}.
            \image {qtcreator-new-opengl-file.webp} {New GLSL 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, GLSL/ES, or Vulkan-compatible GLSL. The code editor offers
            syntax highlighting and code completion for the files.
    \endlist

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