aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json
blob: 5c27a2944673eb2cca3fc24f236be81d7aebf233 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{
    "version": 1,
    "supportedProjectTypes": [ "QmlProjectManager.QmlProject" ],
    "id": "QA.QtStudioUiMCU",
    "category": "D.StudioMCUProject",
    "trDescription": "Creates an application that uses a subset of default components (as supported by Qt for MCUs) that you can deploy, run, and debug on MCU boards.",
    "trDisplayName": "MCU",
    "trDisplayCategory": "Qt for MCUs",
    "icon": "desktop_blank.png",
    "fontIconName": "wizardsMcuEmpty",
    "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
    "platformIndependent": true,

    "options":
        [
        { "key": "QmlProjectFileName", "value": "%{JS: Util.fileName('%{ProjectDirectory}/%{ProjectName}', 'qmlproject')}" },
        { "key": "RootItemName", "value": "%{ProjectName}" },
        { "key": "MainQmlFileName", "value": "%{JS: Util.fileName('%{ProjectName}', 'qml')}" },
        { "key": "ScreenWidth", "value": "%{JS: %{ScreenFactor}.ScreenWidth}" },
        { "key": "ScreenHeight","value": "%{JS: %{ScreenFactor}.ScreenHeight}" },
        { "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')}" }
    ],

    "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": "390 x 390",
                                "value":
                                "({
                                    'ScreenWidth': '390',
                                    'ScreenHeight': '390'
                                })"
                            },
                            {
                                "trKey": "480 x 272",
                                "value":
                                "({
                                    'ScreenWidth': '480',
                                    'ScreenHeight': '272'
                                })"
                            },
                            {
                                "trKey": "640 x 480",
                                "value":
                                "({
                                    'ScreenWidth': '640',
                                    'ScreenHeight': '480'
                                })"
                            },
                            {
                                "trKey": "720 x 1280",
                                "value":
                                "({
                                    'ScreenWidth': '720',
                                    'ScreenHeight': '1280'
                                })"
                            },
                            {
                                "trKey": "1280 x 720",
                                "value":
                                "({
                                    'ScreenWidth': '1280',
                                    'ScreenHeight': '720'
                                })"
                            },
                            {
                                "trKey": "800 x 480",
                                "value":
                                "({
                                    'ScreenWidth': '800',
                                    'ScreenHeight': '480'
                                })"
                            },
                            {
                                "trKey": "960 x 1280",
                                "value":
                                "({
                                    'ScreenWidth': '960',
                                    'ScreenHeight': '1280'
                                })"
                            },
                            {
                                "trKey": "1024 x 768",
                                "value":
                                "({
                                    'ScreenWidth': '1024',
                                    'ScreenHeight': '768'
                                })"
                            }
                        ]
                    }
                },
                {
                    "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": ""
                    }
                }
            ]
        }

    ],
    "generators":
        [
        {
            "typeId": "File",
            "data":
                [
                {
                    "source": "app_mcu.qmlproject.tpl",
                    "target": "%{QmlProjectFileName}",
                    "openAsProject": true
                },
                {
                    "source": "main.qml.tpl",
                    "target": "%{ProjectDirectory}/%{MainQmlFileName}"
                },
                {
                    "source": "qmldir",
                    "target": "%{ProjectDirectory}/imports/Constants/qmldir"
                },
                {
                    "source": "Constants.qml.tpl",
                    "target": "%{ProjectDirectory}/imports/Constants/Constants.qml"
                },
                {
                    "source": "constants_module.qmlproject.tpl",
                    "target": "%{ProjectDirectory}/imports/Constants/constants_module.qmlproject"
                },
                {
                    "source": "Screen01.ui.qml.tpl",
                    "target": "%{ProjectDirectory}/Screen01.ui.qml",
                    "openInEditor": true
                },
                {
                    "source": "CMakeLists.txt",
                    "target": "%{ProjectDirectory}/CMakeLists.txt"
                },
                {
                    "source": "../fonts.txt",
                    "target": "%{ProjectDirectory}/fonts/fonts.txt"
                },
                {
                    "source": "mcuqtquickcontrols2.conf",
                    "target": "%{ProjectDirectory}/qtquickcontrols2.conf"
                },
                {
                    "source": "MCUDefaultStyle",
                    "target": "%{ProjectDirectory}/imports/MCUDefaultStyle"
                },
                {
                    "isBinary": true,
                    "source": "MCUDefaultStyle/images",
                    "target": "%{ProjectDirectory}/MCUDefaultStyle/images"
                }
            ]
        }
    ]
}