{
    "version": 1,
    "supportedProjectTypes": [ "QmlProjectManager.QmlProject" ],
    "id": "QA.QtStudioUiScroll",
    "category": "H.StudioMobileProject",
    "trDescription": "Creates an application that uses Qt Quick controls to implement a scrollable list.",
    "trDisplayName": "Scroll",
    "trDisplayCategory": "Mobile",
    "icon": "mobile_scroll.png",
    "fontIconName": "wizardsMobile",
    "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": "UseVirtualKeyboard", "value": "%{JS: false}" },
        { "key": "EnableCMakeGeneration", "value": "%{JS: false}" }
    ],

    "pages":
        [
        {
            "defaultValues": "qmlapplication-project-page"
        },
        {
            "trDisplayName": "Define Project Details",
            "trShortTitle": "Details",
            "typeId": "Fields",
            "data":
                [
                {
                    "name": "ScreenFactor",
                    "trDisplayName": "Screen Resolution:",
                    "type": "ComboBox",
                    "data":
                    {
                        "index": 0,
                        "items":
                            [
                            {
                                "trKey": "1080 x 1920",
                                "value":
                                "({
                                    'ScreenWidth': '1080',
                                    'ScreenHeight': '1920'
                                })"
                            },
                            {
                                "trKey": "960 x 1280",
                                "value":
                                "({
                                    'ScreenWidth': '960',
                                    'ScreenHeight': '1280'
                                })"
                            },
                            {
                                "trKey": "750 x 1334",
                                "value":
                                "({
                                    'ScreenWidth': '750',
                                    'ScreenHeight': '1334'
                                })"
                            },
                            {
                                "trKey": "720 x 1280",
                                "value":
                                "({
                                    'ScreenWidth': '720',
                                    'ScreenHeight': '1280'
                                })"
                            }
                        ]
                    }
                },
                {
                    "name": "ControlsStyle",
                    "trDisplayName": "Qt Quick Controls Style:",
                    "type": "ComboBox",
                    "data":
                    {
                        "index": 1,
                        "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": "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",
                    "openInEditor": true
                },
                {
                    "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}/%{AssetDir}.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"
                }
            ]
        }
    ]
}
