aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json
blob: 295c85aa63ac880c56bf0e2eeaf95cd16718eb73 (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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
{
    "version": 1,
    "supportedProjectTypes": [ "QmlProjectManager.QmlProject" ],
    "id": "QA.QtStudioUiSwipe",
    "category": "H.StudioMobileProject",
    "trDescription": "Creates an application that uses Qt Quick controls to implement a swipable screen.",
    "trDisplayName": "Swipe",
    "trDisplayCategory": "Mobile",
    "icon": "mobile_swipe.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": "ImportModuleName", "value": "%{ProjectName}" },
        { "key": "IsQt6Project", "value": "%{JS: value('QtQuickVersion') !== '2.15' }" },
        { "key": "QtQuickVersion", "value": "%{JS: %{TargetQtVersion}.TargetQuickVersion}" },
        { "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
        { "key": "QtQuickControlsStyle", "value": "Basic" },
        { "key": "QtQuickControlsStyleTheme", "value": "%{JS: %{ControlsStyle}.QtQuickControlsStyleTheme}" },
        { "key": "ApplicationImport", "value": "%{JS: value('IsQt6Project') === 'true' ? '%{ImportModuleName}' : '%{ImportModuleName} 1.0'}" },
        { "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": "ImportModuleVersion", "value": "%{JS: value('IsQt6Project') === 'true' ? '' : '1.0'}" }
    ],

    "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": 4,
                        "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'
                                })"
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "generators":
        [
        {
            "typeId": "File",
            "data":
                [
                {
                    "source": "../common/app.qmlproject.tpl",
                    "target": "%{ProjectDirectory}/%{QmlProjectFileName}",
                    "openAsProject": true
                },
                {
                    "source": "../common/CMakeLists.main.txt.tpl",
                    "target": "%{ProjectDirectory}/CMakeLists.txt"
                },
                {
                    "source": "../common/qmlmodules.tpl",
                    "target": "%{ProjectDirectory}/qmlmodules"
                },
                {
                    "source": "../common/qmlcomponents.tpl",
                    "target": "%{ProjectDirectory}/qmlcomponents"
                },
                {
                    "source": "../common/insight.tpl",
                    "target": "%{ProjectDirectory}/insight"
                },
                {
                    "source": "../common/main.qml",
                    "target": "%{ProjectDirectory}/main.qml"
                },
                {
                    "source": "../common/qtquickcontrols2.conf.tpl",
                    "target": "%{ProjectDirectory}/qtquickcontrols2.conf"
                },
                {
                    "source": "../common/main.cpp.tpl",
                    "target": "%{ProjectDirectory}/src/main.cpp"
                },
                {
                    "source": "../common/app_environment.h.tpl",
                    "target": "%{ProjectDirectory}/src/app_environment.h"
                },
                {
                    "source": "../common/import_qml_plugins.h.tpl",
                    "target": "%{ProjectDirectory}/src/import_qml_plugins.h"
                },
                {
                    "source": "../common/import_qml_components_plugins.h.tpl",
                    "target": "%{ProjectDirectory}/src/import_qml_components_plugins.h"
                },
                {
                    "source": "CMakeLists.content.txt.tpl",
                    "target": "%{ProjectDirectory}/content/CMakeLists.txt"
                },
                {
                    "source": "App.qml.tpl",
                    "target": "%{ProjectDirectory}/content/App.qml"
                },
                {
                    "source": "Screen01.ui.qml.tpl",
                    "target": "%{ProjectDirectory}/content/Screen01.ui.qml",
                    "openInEditor": true
                },
                {
                    "source": "Screen02.ui.qml.tpl",
                    "target": "%{ProjectDirectory}/content/Screen02.ui.qml",
                    "openInEditor": true
                },
                {
                    "source": "../common/fonts.txt",
                    "target": "%{ProjectDirectory}/content/fonts/fonts.txt"
                },
                {
                    "source": "../common/asset_imports.txt",
                    "target": "%{ProjectDirectory}/asset_imports/asset_imports.txt"
                },
                {
                    "source": "../common/CMakeLists.imports.txt.tpl",
                    "target": "%{ProjectDirectory}/imports/CMakeLists.txt"
                },
                {
                    "source": "../shared-plugin/name/CMakeLists.importmodule.txt.tpl",
                    "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/CMakeLists.txt"
                },
                {
                    "source": "../shared-plugin/name/importmodule.qmldir.tpl",
                    "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/qmldir"
                },
                {
                    "source": "../shared-plugin/name/Constants.qml.tpl",
                    "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/Constants.qml"
                },
                {
                    "source": "../shared-plugin/name/DirectoryFontLoader.qml.tpl",
                    "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/DirectoryFontLoader.qml"
                },
                {
                    "source": "../shared-plugin/name/EventListModel.qml.tpl",
                    "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListModel.qml"
                },
                {
                    "source": "../shared-plugin/name/EventListSimulator.qml.tpl",
                    "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/EventListSimulator.qml"
                },
                {
                    "source": "../shared-plugin/name/designer/plugin.metainfo",
                    "target": "%{ProjectDirectory}/imports/%{ImportModuleName}/designer/plugin.metainfo"
                }
            ]
        }
    ]
}