{
    "version": 1,
    "supportedProjectTypes": [ "QmlProjectManager.QmlProject" ],
    "id": "QA.QtStudioUi",
    "category": "B.StudioProject",
    "trDescription": "Creates a project that uses default components, such as rectangles, images, and text. The application can be run on all target platforms.",
    "trDisplayName": "Empty",
    "trDisplayCategory": "General",
    "icon": "desktop_blank.png",
    "fontIconName": "wizardsGeneric",
    "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
    "platformIndependent": true,

    "options":
        [
        { "key": "ProjectExecutableName", "value": "%{ProjectName}App" },
        { "key": "ProjectPluginName", "value": "%{ProjectName}plugin" },
        { "key": "ProjectPluginClassName", "value": "%{ProjectName}Plugin" },
        { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qmlproject')}" },
        { "key": "AssetDir", "value": "Generated" },
        { "key": "ContentDir", "value": "%{ProjectName}Content" },
        { "key": "ImportModuleName", "value": "%{ProjectName}" },
        { "key": "UIClassName", "value": "Screen01" },
        { "key": "UIClassFileName", "value": "%{JS: Util.fileName('%{UIClassName}', 'ui.qml')}" },
        { "key": "QtQuickVersion", "value": "%{JS: %{TargetQtVersion}.TargetQuickVersion}" },
        { "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
        { "key": "QtQuickControlsStyle", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyle}" },
        { "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
        { "key": "ApplicationImport", "value": "%{ImportModuleName}" },
        { "key": "UseStandardResolution", "value": "%{JS: value('CustomScreenWidth') === '' || value('CustomScreenHeight') === ''}" },
        { "key": "ScreenWidth", "value": "%{JS: value('UseStandardResolution') === 'true' ? %{ScreenFactor}.ScreenWidth : value('CustomScreenWidth')}" },
        { "key": "ScreenHeight", "value": "%{JS: value('UseStandardResolution') === 'true' ? %{ScreenFactor}.ScreenHeight : value('CustomScreenHeight')}" },
        { "key": "UseVirtualKeyboardDefault", "value": "%{JS: false}" },
        { "key": "EnableCMakeGenerationDefault", "value": "%{JS: true}" },
        { "key": "DefaultStyle", "value": "Basic" }
    ],

    "pages":
        [
        {
            "defaultValues": "qmlapplication-project-page"
        },
        {
            "trDisplayName": "Define Project Details",
            "trShortTitle": "Details",
            "typeId": "Fields",
            "data":
                [
                {
                    "name": "ScreenFactor",
                    "trDisplayName": "Screen Resolution:",
                    "type": "ComboBox",
                    "enabled": "%{JS: value('UseStandardResolution')}",
                    "data":
                    {
                        "index": 2,
                        "items":
                            [
                            {
                                "trKey": "2960 x 1440",
                                "value":
                                "({
                                    'ScreenWidth': '2960',
                                    'ScreenHeight': '1440'
                                })"
                            },
                            {
                                "trKey": "2560 x 1440",
                                "value":
                                "({
                                    'ScreenWidth': '2560',
                                    'ScreenHeight': '1440'
                                })"
                            },
                            {
                                "trKey": "1920 x 1080",
                                "value":
                                "({
                                    'ScreenWidth': '1920',
                                    'ScreenHeight': '1080'
                                })"
                            },
                            {
                                "trKey": "1334 x 750",
                                "value":
                                "({
                                    'ScreenWidth': '1334',
                                    'ScreenHeight': '750'
                                })"
                            },
                            {
                                "trKey": "1280 x 960",
                                "value":
                                "({
                                     'ScreenWidth': '1280',
                                    'ScreenHeight': '960'
                                })"
                            },
                            {
                                "trKey": "1280 x 720",
                                "value":
                                "({
                                    'ScreenWidth': '1280',
                                    'ScreenHeight': '720'
                                })"
                            },
                            {
                                "trKey": "1024 x 768",
                                "value":
                                "({
                                    'ScreenWidth': '1024',
                                    'ScreenHeight': '768'
                                })"
                            },
                            {
                                "trKey": "640 x 480",
                                "value":
                                "({
                                    'ScreenWidth': '640',
                                    'ScreenHeight': '480'
                                })"
                            }
                        ]
                    }
                },
                {
                    "name": "ControlsStyle",
                    "trDisplayName": "Qt Quick Controls Style:",
                    "type": "ComboBox",
                    "data":
                    {
                        "index": 0,
                        "items":
                            [
                            {
                                "trKey": "Basic",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Basic',
                                    'QtQuickControlsStyleTheme': ''
                                })"
                            },
                            {
                                "trKey": "Material Light",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Material',
                                    'QtQuickControlsStyleTheme': 'Light'
                                })"
                            },
                            {
                                "trKey": "Material Dark",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Material',
                                    'QtQuickControlsStyleTheme': 'Dark'
                                })"
                            },
                            {
                                "trKey": "Universal Light",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Universal',
                                    'QtQuickControlsStyleTheme': 'Light'
                                })"
                            },
                            {
                                "trKey": "Universal Dark",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Universal',
                                    'QtQuickControlsStyleTheme': 'Dark'
                                })"
                            },
                            {
                                "trKey": "Universal System",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Universal',
                                    'QtQuickControlsStyleTheme': 'System'
                                })"
                            },
                            {
                                "trKey": "Fusion",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Fusion',
                                    'QtQuickControlsStyleTheme': ''
                                })"
                            },
                            {
                                "trKey": "Imagine",
                                "value":
                                "({
                                    'QtQuickControlsStyle': 'Imagine',
                                    'QtQuickControlsStyleTheme': ''
                                })"
                            }
                        ]
                    }
                },
                {
                    "name": "UseVirtualKeyboard",
                    "trDisplayName": "Use Qt Virtual Keyboard",
                    "type": "CheckBox",
                    "data":
                    {
                        "checked": "%{UseVirtualKeyboardDefault}"
                    }
                },
                {
                    "name": "EnableCMakeGeneration",
                    "trDisplayName": "Enable CMake Genertion",
                    "type": "CheckBox",
                    "data":
                    {
                        "checked": "%{EnableCMakeGenerationDefault}"
                    }
                },
                {
                    "name": "CustomScreenWidth",
                    "trDisplayName": "Custom screen width:",
                    "mandatory": false,
                    "type": "LineEdit",
                    "data":
                    {
                        "validator": "^[0-9]*$",
                        "trText": ""
                    }
                },
                {
                    "name": "CustomScreenHeight",
                    "trDisplayName": "Custom screen height:",
                    "mandatory": false,
                    "type": "LineEdit",
                    "data":
                    {
                        "validator": "^[0-9]*$",
                        "trText": ""
                    }
                },
                {
                    "name": "TargetQtVersion",
                    "trDisplayName": "Target Qt Version:",
                    "mandatory": true,
                    "type": "ComboBox",
                    "data":
                    {
                        "index": 6,
                        "items":
                            [
                            {
                                "trKey": "Qt 5",
                                "value":
                                "({
                                    'TargetQuickVersion': '2.15'
                                })"
                            },
                            {
                                "trKey": "Qt 6.2",
                                "value":
                                "({
                                    'TargetQuickVersion': '6.2'
                                })"
                            },
                            {
                                "trKey": "Qt 6.3",
                                "value":
                                "({
                                    'TargetQuickVersion': '6.3'
                                })"
                            },
                            {
                                "trKey": "Qt 6.4",
                                "value":
                                "({
                                    'TargetQuickVersion': '6.4'
                                })"
                            },
                            {
                                "trKey": "Qt 6.5",
                                "value":
                                "({
                                    'TargetQuickVersion': '6.5'
                                })"
                            },
                            {
                                "trKey": "Qt 6.6",
                                "value":
                                "({
                                    'TargetQuickVersion': '6.6'
                                })"
                            },
                            {
                                "trKey": "Qt 6.7",
                                "value":
                                "({
                                    'TargetQuickVersion': '6.7'
                                })"
                            },
                            {
                                "trKey": "Qt 6.8",
                                "value":
                                "({
                                    'TargetQuickVersion': '6.8'
                                })"
                            }
                        ]
                    }
                }
            ]
        }

    ],
    "generators":
        [
        {
            "typeId": "File",
            "data":
                [
                {
                    "source": "../common/app.qmlproject.tpl",
                    "target": "%{ProjectDirectory}/%{QmlProjectFileName}",
                    "openAsProject": true
                },
                {
                    "source": "../common/qtquickcontrols2.conf.tpl",
                    "target": "%{ProjectDirectory}/qtquickcontrols2.conf"
                },
                {
                    "source": "../common/App.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ContentDir}/App.qml"
                },
                {
                    "source": "Screen01.ui.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ContentDir}/Screen01.ui.qml"
                },
                {
                    "source": "../common/fonts.txt",
                    "target": "%{ProjectDirectory}/%{ContentDir}/fonts/fonts.txt"
                },
                {
                    "source": "../common/images.txt",
                    "target": "%{ProjectDirectory}/%{ContentDir}/images/images.txt"
                },
                {
                    "source": "../common/asset_imports.txt",
                    "target": "%{ProjectDirectory}/%{AssetDir}/Quick3DAssets.txt"
                },
                {
                    "source": "../shared-plugin/name/importmodule.qmldir.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/qmldir"
                },
                {
                    "source": "../shared-plugin/name/Constants.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/Constants.qml"
                },
                {
                    "source": "../shared-plugin/name/EventListModel.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListModel.qml"
                },
                {
                    "source": "../shared-plugin/name/EventListSimulator.qml.tpl",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/EventListSimulator.qml"
                },
                {
                    "source": "../shared-plugin/name/designer/plugin.metainfo",
                    "target": "%{ProjectDirectory}/%{ImportModuleName}/designer/plugin.metainfo"
                }
            ]
        }
    ]
}
