{
    "version": 1,
    "supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
    "id": "U.QtQuickApplicationEmpty",
    "category": "E.ApplicationQtQuick",
    "trDescription": "Creates a Qt Quick application that contains an empty window.",
    "trDisplayName": "Qt Quick Application - Empty",
    "trDisplayCategory": "Application (Qt Quick)",
    "icon": "icon.png",
    "featuresRequired": [ "QtSupport.Wizards.FeatureQt.5.6" ],
    "enabled": "%{JS: false // value('Plugins').indexOf('QmakeProjectManager') >= 0 || value('Plugins').indexOf('QbsProjectManager') >= 0 || value('Plugins').indexOf('CMakeProjectManager') >= 0}",

    "options":
    [
        { "key": "ProjectFile", "value": "%{JS: value('BuildSystem') === 'qmake' ? value('ProFile') : (value('BuildSystem') === 'cmake' ? value('CMakeFile') : value('QbsFile'))}" },
        { "key": "ProFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'pro')}" },
        { "key": "QbsFile", "value": "%{JS: Util.fileName(value('ProjectDirectory') + '/' + value('ProjectName'), 'qbs')}" },
        { "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
        { "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
        { "key": "QtQuickVersion", "value": "%{JS: value('QtVersion').QtQuickVersion}" },
        { "key": "QtQuickWindowVersion", "value": "%{JS: value('QtVersion').QtQuickWindowVersion}" },
        { "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: value('QtVersion').QtQuickVirtualKeyboardImport}" },
        { "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
        { "key": "UseVirtualKeyboardByDefault", "value": "%{JS: value('Plugins').indexOf('Boot2Qt') >= 0 || value('Plugins').indexOf('Boot2QtQdb') >= 0}" },
        { "key": "HasTranslation", "value": "%{JS: value('TsFileName') !== ''}" },
        { "key": "SetQPAPhysicalSize", "value": "%{UseVirtualKeyboardByDefault}" }
    ],

    "pages":
    [
        {
            "trDisplayName": "Project Location",
            "trShortTitle": "Location",
            "typeId": "Project"
        },
        {
            "trDisplayName": "Define Build System",
            "trShortTitle": "Build System",
            "typeId": "Fields",
            "enabled": "%{JS: !value('IsSubproject')}",
            "data":
            [
                {
                    "name": "BuildSystem",
                    "trDisplayName": "Build system:",
                    "type": "ComboBox",
                    "persistenceKey": "BuildSystemType",
                    "data":
                    {
                        "index": 0,
                        "items":
                        [
                            {
                                "trKey": "qmake",
                                "value": "qmake",
                                "condition": "%{JS: value('Plugins').indexOf('QmakeProjectManager') >= 0}"
                            },
                            {
                                "trKey": "CMake",
                                "value": "cmake",
                                "condition": "%{JS: value('Plugins').indexOf('CMakeProjectManager') >= 0}"
                            },
                            {
                                "trKey": "Qbs",
                                "value": "qbs",
                                "condition": "%{JS: value('Plugins').indexOf('QbsProjectManager') >= 0}"
                            }
                        ]
                    }
                }
            ]
        },
        {
            "trDisplayName": "Define Project Details",
            "trShortTitle": "Details",
            "typeId": "Fields",
            "data":
            [
                {
                    "name": "QtVersion",
                    "trDisplayName": "Minimal required Qt version:",
                    "type": "ComboBox",
                    "persistenceKey": "QtQuick.minimumQtVersion",
                    "data":
                    {
                        "index": 3,
                        "items":
                        [
                            {
                                "trKey": "Qt 5.15",
                                "value":
                                {
                                    "QtQuickVersion": "2.15",
                                    "QtQuickWindowVersion": "2.15",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.15"
                                }
                            },
                            {
                                "trKey": "Qt 5.14",
                                "value":
                                {
                                    "QtQuickVersion": "2.14",
                                    "QtQuickWindowVersion": "2.14",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.14"
                                }
                            },
                            {
                                "trKey": "Qt 5.13",
                                "value":
                                {
                                    "QtQuickVersion": "2.13",
                                    "QtQuickWindowVersion": "2.13",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
                                }
                            },
                            {
                                "trKey": "Qt 5.12",
                                "value":
                                {
                                    "QtQuickVersion": "2.12",
                                    "QtQuickWindowVersion": "2.12",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.4"
                                }
                            },
                            {
                                "trKey": "Qt 5.11",
                                "value":
                                {
                                    "QtQuickVersion": "2.11",
                                    "QtQuickWindowVersion": "2.11",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
                                }
                            },
                            {
                                "trKey": "Qt 5.10",
                                "value":
                                {
                                    "QtQuickVersion": "2.10",
                                    "QtQuickWindowVersion": "2.10",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.3"
                                }
                            },
                            {
                                "trKey": "Qt 5.9",
                                "value":
                                {
                                    "QtQuickVersion": "2.9",
                                    "QtQuickWindowVersion": "2.2",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.2"
                                }
                            },
                            {
                                "trKey": "Qt 5.8",
                                "value":
                                {
                                    "QtQuickVersion": "2.8",
                                    "QtQuickWindowVersion": "2.2",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
                                }
                            },
                            {
                                "trKey": "Qt 5.7",
                                "value":
                                {
                                    "QtQuickVersion": "2.7",
                                    "QtQuickWindowVersion": "2.2",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.VirtualKeyboard 2.1"
                                }
                            },
                            {
                                "trKey": "Qt 5.6",
                                "value":
                                {
                                    "QtQuickVersion": "2.6",
                                    "QtQuickWindowVersion": "2.2",
                                    "QtQuickVirtualKeyboardImport": "QtQuick.Enterprise.VirtualKeyboard 2.0"
                                }
                            }
                        ]
                    }
                },
                {
                    "name": "UseVirtualKeyboard",
                    "trDisplayName": "Use Qt Virtual Keyboard",
                    "type": "CheckBox",
                    "persistenceKey": "QtQuick.UseVirtualKeyboard.%{UseVirtualKeyboardByDefault}",
                    "data":
                    {
                        "checked": "%{UseVirtualKeyboardByDefault}"
                    }
                }
            ]
        },
        {
            "trDisplayName": "Translation File",
            "trShortTitle": "Translation",
            "typeId": "QtTranslation"
        },
        {
            "trDisplayName": "Kit Selection",
            "trShortTitle": "Kits",
            "typeId": "Kits",
            "enabled": "%{JS: !value('IsSubproject')}",
            "data": {
                "projectFilePath": "%{ProjectFile}",
                "requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
            }
        },
        {
            "trDisplayName": "Project Management",
            "trShortTitle": "Summary",
            "typeId": "Summary"
        }
    ],
    "generators":
    [
        {
            "typeId": "File",
            "data":
            [
                {
                    "source": "../app.pro",
                    "target": "%{ProFile}",
                    "openAsProject": true,
                    "condition": "%{JS: value('BuildSystem') === 'qmake'}"
                },
                {
                    "source": "../CMakeLists.txt",
                    "target": "CMakeLists.txt",
                    "openAsProject": true,
                    "condition": "%{JS: value('BuildSystem') === 'cmake'}"
                },
                {
                    "source": "../app.qbs",
                    "target": "%{QbsFile}",
                    "openAsProject": true,
                    "condition": "%{JS: value('BuildSystem') === 'qbs'}"
                },
                {
                    "source": "../main.cpp",
                    "target": "%{MainCppFileName}"
                },
                {
                    "source": "main.qml.tpl",
                    "target": "main.qml",
                    "openInEditor": true
                },
                {
                    "source": "qml.qrc"
                },
                {
                    "source": "../../translation.ts",
                    "target": "%{TsFileName}",
                    "condition": "%{HasTranslation}"
                },
                {
                    "source": "../../git.ignore",
                    "target": ".gitignore",
                    "condition": "%{JS: !value('IsSubproject') && value('VersionControl') === 'G.Git'}"
                }
            ]
        }
    ]
}
