{
    "version": 1,
    "supportedProjectTypes": [ "CMakeProjectManager.CMakeProject" ],
    "id": "U.QtQuickApplicationEmpty",
    "category": "D.ApplicationQt",
    "trDescription": "Creates a Qt Quick application that can have both QML and C++ code. You can build the application and deploy it to desktop, embedded, and mobile target platforms.",
    "trDisplayName": "Qt Quick Application",
    "trDisplayCategory": "Application (Qt)",
    "icon": "icon.png",
    "iconKind": "Themed",
    "featuresRequired": [ "QtSupport.Wizards.FeatureQtQmlCMakeApi" ],
    "enabled": "%{JS: false // isPluginRunning('cmakeprojectmanager') }",

    "options":
    [
        { "key": "ProjectFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
        { "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src') }" },
        { "key": "UseVirtualKeyboardByDefault", "value": "%{JS: isPluginRunning('boot2qt') }" },
        { "key": "TargetName", "value": "%{JS: 'app' + value('ProjectName') }" },
        { "key": "HasQSPSetup", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.2' }"},
        { "key": "HasFailureSignal", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.3' }"},
        { "key": "UsesAutoResourcePrefix", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.4' }"},
        { "key": "HasLoadFromModule", "value": "%{JS: value('MinimumSupportedQtVersion') > '6.4' && value('UsesAutoResourcePrefix') }"},
        { "key": "FeatureQt", "value": "QtSupport.Wizards.FeatureQt.%{MinimumSupportedQtVersion}"},
        { "key": "QdsWizardPath", "value": "%{IDE:ResourcePath}/qmldesigner/studio_templates/projects" },
        { "key": "NoQdsProjectStyle", "value": "%{JS: !%{QdsProjectStyle} }" },

        { "key": "EnableCMakeGeneration", "value": "%{JS: false}" },
        { "key": "ImportModuleName", "value": "%{ProjectName}" },
        { "key": "ImportModuleVersion", "value": "" },
        { "key": "IsQt6Project", "value": true },
        { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" },
        { "key": "ProjectPluginName", "value": "%{ProjectName}plugin" },
        { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" },
        { "key": "QtQuickControlsStyle", "value": "Material" },
        { "key": "QtQuickControlsStyleTheme", "value": "Light" },
        { "key": "QtQuickVersion", "value": "6.2" },
        { "key": "ScreenHeight", "value": 1080 },
        { "key": "ScreenWidth", "value": 1920 },
        { "key": "UIClassName", "value": "Screen01" },
        { "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" }
    ],

    "pages":
    [
        {
            "trDisplayName": "Project Location",
            "trShortTitle": "Location",
            "typeId": "Project"
        },
        {
            "trDisplayName": "Define Project Details",
            "trShortTitle": "Details",
            "typeId": "Fields",
            "data":
            [
                {
                    "name": "UseVirtualKeyboard",
                    "trDisplayName": "Use Qt Virtual Keyboard",
                    "type": "CheckBox",
                    "span": true,
                    "persistenceKey": "QtQuick.UseVirtualKeyboard",
                    "data":
                    {
                        "checked": "%{UseVirtualKeyboardByDefault}"
                    }
                },
                {
                    "name": "MinimumSupportedQtVersion",
                    "trDisplayName": "Minimum required Qt version:",
                    "type": "ComboBox",
                    "data":
                    {
                        "items": [
                            { "trKey": "Qt 6.2", "value": "6.2" },
                            { "trKey": "Qt 6.5", "value": "6.5" },
                            { "trKey": "Qt 6.8", "value": "6.8" }
                        ],
                        "index": 2
                    }
                }
            ]
        },
        {
            "trDisplayName": "Kit Selection",
            "trShortTitle": "Kits",
            "typeId": "Kits",
            "data": {
                "projectFilePath": "%{ProjectFile}",
                "requiredFeatures": [ "QtSupport.Wizards.FeatureQtQmlCMakeApi", "%{FeatureQt}" ]
            }
        },
        {
            "trDisplayName": "Project Management",
            "trShortTitle": "Summary",
            "typeId": "Summary"
        }
    ],
    "generators":
    [
        {
            "typeId": "File",
            "data":
            [
                {
                    "source": "CMakeLists.txt",
                    "openAsProject": true
                },
                {
                    "source": "main.cpp",
                    "target": "%{MainCppFileName}"
                },
                {
                    "source": "Main.qml.tpl",
                    "target": "Main.qml",
                    "openInEditor": true
                },
                {
                    "source": "../git.ignore",
                    "target": ".gitignore",
                    "condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git' }"
                }
            ]
        }
    ]
}
