wizard.json 5.93 KB
Newer Older
1 2 3
{
    "version": 1,
    "kind": "project",
4
    "id": "V.QtQuickControlsApplication",
5 6 7 8
    "category": "F.Application",
    "trDescription": "Creates a deployable Qt Quick 2 application using Qt Quick Controls.",
    "trDisplayName": "Qt Quick Controls Application",
    "trDisplayCategory": "Application",
9
    "icon": "../qtquickapplication/qml_wizard.png",
10
    "featuresRequired": [ "QtSupport.Wizards.FeatureQt" ],
11
    "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0 && [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0 }",
12 13 14 15 16 17 18 19

    "options":
    [
        { "key": "ProFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'pro')}" },
        { "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
        { "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.qtQuickVersion}" },
        { "key": "QtQuickControlsVersion", "value": "%{JS: %{QtVersion}.qtQuickControlsVersion}" },
        { "key": "QtQuickDialogsVersion", "value": "%{JS: %{QtVersion}.qtQuickDialogsVersion}" },
20 21
        { "key": "QtQuickLayoutsVersion", "value": "%{JS: %{QtVersion}.qtQuickLayoutsVersion}" },
        { "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" }
22 23 24 25 26 27 28
    ],

    "pages":
    [
        {
            "trDisplayName": "Project Location",
            "trShortTitle": "Location",
29
            "typeId": "Project"
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
        },
        {
            "trDisplayName": "Define Project Details",
            "trShortTitle": "Details",
            "typeId": "Fields",
            "data":
            [
                {
                    "name": "QtVersion",
                    "trDisplayName": "Minimal required Qt version:",
                    "type": "ComboBox",
                    "data":
                    {
                        "items":
                        [
                            {
                                "trKey": "Qt 5.5",
                                "value":
                                "{
                                    'qtQuickVersion': '2.5',
50
                                    'qtQuickControlsVersion': '1.4',
51 52
                                    'qtQuickDialogsVersion': '1.2',
                                    'qtQuickLayoutsVersion': '1.2'
53 54
                                }",
                                "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.5') >= 0}"
55 56 57 58 59 60
                            },
                            {
                                "trKey": "Qt 5.4",
                                "value":
                                "{
                                    'qtQuickVersion': '2.4',
61
                                    'qtQuickControlsVersion': '1.3',
62 63
                                    'qtQuickDialogsVersion': '1.2',
                                    'qtQuickLayoutsVersion': '1.1'
64 65
                                }",
                                "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.4') >= 0}"
66 67 68 69 70 71 72 73 74
                            },
                            {
                                "trKey": "Qt 5.3",
                                "value":
                                "{
                                    'qtQuickVersion': '2.3',
                                    'qtQuickControlsVersion': '1.2',
                                    'qtQuickDialogsVersion': '1.2',
                                    'qtQuickLayoutsVersion': '1.1'
75 76
                                }",
                                "condition": "%{JS: [ %{Features} ].indexOf('QtSupport.Wizards.FeatureQt5.3') >= 0}"
77 78 79 80 81 82 83 84 85 86 87 88
                            }
                        ]
                    }
                },
                {
                    "name": "QmlUISplit",
                    "trDisplayName": "With ui.qml file",
                    "type": "CheckBox",
                    "data":
                    {
                        "checked": true
                    }
89 90 91 92 93 94 95 96 97
                },
                {
                    "name": "UseQApplication",
                    "trDisplayName": "Enable native styling. Requires dependency on the QtWidgets module.",
                    "type": "CheckBox",
                    "data":
                    {
                        "checked": true
                    }
98 99 100 101 102 103 104
                }
            ]
        },
        {
            "trDisplayName": "Kit Selection",
            "trShortTitle": "Kits",
            "typeId": "Kits",
105 106
            "data": {
                "projectFilePath": "%{ProFileName}",
107
                "requiredFeatures": [ "QtSupport.Wizards.FeatureQt", "%{QtQuickFeature}" ]
108
            }
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
        },
        {
            "trDisplayName": "Project Management",
            "trShortTitle": "Summary",
            "typeId": "Summary"
        }
    ],
    "generators":
    [
        {
            "typeId": "File",
            "data":
            [
                {
                    "source": "app.pro",
                    "target": "%{ProFileName}",
                    "openAsProject": true
                },
                {
                    "source": "main.cpp",
                    "target": "%{MainCppFileName}"
                },
                {
                    "source": "main.qml",
                    "openInEditor": true
                },
                {
                    "source": "MainForm.ui.qml",
                    "condition": "%{QmlUISplit}"
                },
                {
                    "source": "qml.qrc"
                },
                {
                    "source": "../../../../shared/qrcdeployment.pri",
                    "target": "%{ProjectDirectory}/deployment.pri"
                },
                {
147
                    "source": "../../git.ignore",
148 149 150 151 152 153 154
                    "target": "%{ProjectDirectory}/.gitignore",
                    "condition": "%{JS: !%{IsSubproject} && '%{VersionControl}' === 'G.Git'}"
                }
            ]
        }
    ]
}