From 4612cccb080fed62ab7a6acc6b2b3747dcf748dd Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Fri, 10 Oct 2014 10:26:28 +0200 Subject: JsonWizard: Replace FormWizard with JsonWizard Change-Id: Id469ee792e148d83b33002ee8295d15b5175ebbd Reviewed-by: Daniel Teske --- .../qtcreator/templates/wizards/files/form/file.ui | 1 + .../templates/wizards/files/form/wizard.json | 49 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 share/qtcreator/templates/wizards/files/form/file.ui create mode 100644 share/qtcreator/templates/wizards/files/form/wizard.json (limited to 'share/qtcreator') diff --git a/share/qtcreator/templates/wizards/files/form/file.ui b/share/qtcreator/templates/wizards/files/form/file.ui new file mode 100644 index 0000000000..a12c1fffb0 --- /dev/null +++ b/share/qtcreator/templates/wizards/files/form/file.ui @@ -0,0 +1 @@ +%{FormContents}\ diff --git a/share/qtcreator/templates/wizards/files/form/wizard.json b/share/qtcreator/templates/wizards/files/form/wizard.json new file mode 100644 index 0000000000..510f2d0ae1 --- /dev/null +++ b/share/qtcreator/templates/wizards/files/form/wizard.json @@ -0,0 +1,49 @@ +{ + "version": 1, + "kind": "file", + "id": "D.Form", + "category": "R.Qt", + "trDescription": "Creates a Qt Designer form that you can add to a Qt Widget Project. This is useful if you already have an existing class for the UI business logic.", + "trDisplayName": "Qt Designer Form", + "trDisplayCategory": "Qt", + "icon": "../../global/genericfilewizard.png", + "featuresRequired": [ "Plugin.Designer" ], + + "options": [ + { "key": "UiClass", "value": "%{JS: QtSupport.uiClassName('%{FormContents}') }" }, + { "key": "Extension", "value": "%{JS: Util.preferredSuffix('application/x-designer')}"}, + { "key": "InitialFileName", "value": "%{JS: Cpp.classToFileName('%{UiClass}', '%{Extension}') }" } + ], + + "pages": + [ + { + "trDisplayName": "Choose a Form Template", + "trShortTitle": "Form Template", + "typeId": "Form" + }, + { + "trDisplayName": "Location", + "trShortTitle": "Location", + "typeId": "File" + }, + { + "trDisplayName": "Project Management", + "trShortTitle": "Summary", + "typeId": "Summary" + } + ], + + "generators": + [ + { + "typeId": "File", + "data": + { + "source": "file.ui", + "target": "%{JS: Cpp.fileName('%{TargetPath}', '%{Extension}')}", + "openInEditor": true + } + } + ] +} -- cgit v1.2.1