Commit 73158461 authored by Thomas Hartmann's avatar Thomas Hartmann Committed by Tobias Hunger

Add file wizard for .ui.qml forms

This wizard creates a .qml file that uses the pure form
.ui.qml file.

Change-Id: I1076ae4876002b2b726404c309d399c5268979ee
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 04a8cf5d
import QtQuick 2.4
Item {
width: 400
height: 400
}
{
"version": 1,
"kind": "file",
"id": "R.QtQuickUi",
"category": "R.Qt",
"trDescription": "Creates a QML file with boilerplate code, starting with \"import QtQuick 2.4\".",
"trDisplayName": "QtQuick UI File",
"trDisplayCategory": "Qt",
"icon": "../../global/genericfilewizard.png",
"featuresRequired": [ "Plugin.QmlJSEditor", "QtSupport.Wizards.FeatureQtQuick.UiFiles" ],
"options" : [
{ "key": "QmlFile", "value": "%{Class}.%{JS: Util.preferredSuffix('application/x-qml')}" },
{ "key": "UiFile", "value": "%{FormClass}.%{JS: Util.preferredSuffix('application/x-qt.ui+qml')}" }
],
"pages" :
[
{
"trDisplayName": "Define Class",
"trShortTitle": "Details",
"typeId": "Fields",
"data" :
[
{
"name": "Class",
"trDisplayName": "Class name:",
"mandatory": true,
"type": "LineEdit",
"data": { "validator": "(?:[A-Z_][a-zA-Z_0-9]*|)" }
},
{
"name": "Sp1",
"type": "Spacer",
"data": { "factor": 2 }
},
{
"name": "FormClass",
"trDisplayName": "Ui Class name:",
"mandatory": true,
"type": "LineEdit",
"data": {
"validator": "(?:[A-Z_][a-zA-Z_0-9]*|)",
"trText": "%{Class}Form"
}
},
{
"name": "TargetPath",
"type": "PathChooser",
"trDisplayName": "Path:",
"mandatory": true,
"data":
{
"kind": "existingDirectory",
"basePath": "%{InitialPath}",
"path": "%{InitialPath}"
}
}
]
},
{
"trDisplayName": "Project Management",
"trShortTitle": "Summary",
"typeId": "Summary"
}
],
"generators" :
[
{
"typeId": "File",
"data": [
{
"source": "file.qml",
"target": "%{TargetPath}/%{QmlFile}",
"openInEditor": true
},
{
"source": "fileForm.ui.qml",
"target": "%{TargetPath}/%{UiFile}",
"openInEditor": true
}
]
}
]
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment