diff options
author | Jochen Becher <jochen_becher@gmx.de> | 2018-01-05 14:21:40 +0100 |
---|---|---|
committer | Jochen Becher <jochen_becher@gmx.de> | 2018-01-09 14:23:53 +0000 |
commit | 58a164832645589b745d2ce47fdbadc0e7e46d91 (patch) | |
tree | c0db8a3db740e5a827b93887acde00bb66ec64f1 /share | |
parent | 6bb2c1196d5ae784b4b00d02963e0f61894b9c08 (diff) |
ModelEditor: add wizard for scratch models
Change-Id: Idc6841984aa258ab668416f891ecbaf7bd32164e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/templates/wizards/files/modeling/model/file.qmodel (renamed from share/qtcreator/templates/wizards/files/modeling/file.qmodel) | 0 | ||||
-rw-r--r-- | share/qtcreator/templates/wizards/files/modeling/model/wizard.json (renamed from share/qtcreator/templates/wizards/files/modeling/wizard.json) | 0 | ||||
-rw-r--r-- | share/qtcreator/templates/wizards/files/modeling/scratch/file.qmodel | 55 | ||||
-rw-r--r-- | share/qtcreator/templates/wizards/files/modeling/scratch/wizard.json | 35 |
4 files changed, 90 insertions, 0 deletions
diff --git a/share/qtcreator/templates/wizards/files/modeling/file.qmodel b/share/qtcreator/templates/wizards/files/modeling/model/file.qmodel index 5a4645df0a4..5a4645df0a4 100644 --- a/share/qtcreator/templates/wizards/files/modeling/file.qmodel +++ b/share/qtcreator/templates/wizards/files/modeling/model/file.qmodel diff --git a/share/qtcreator/templates/wizards/files/modeling/wizard.json b/share/qtcreator/templates/wizards/files/modeling/model/wizard.json index 2f8cff689a1..2f8cff689a1 100644 --- a/share/qtcreator/templates/wizards/files/modeling/wizard.json +++ b/share/qtcreator/templates/wizards/files/modeling/model/wizard.json diff --git a/share/qtcreator/templates/wizards/files/modeling/scratch/file.qmodel b/share/qtcreator/templates/wizards/files/modeling/scratch/file.qmodel new file mode 100644 index 00000000000..5a4645df0a4 --- /dev/null +++ b/share/qtcreator/templates/wizards/files/modeling/scratch/file.qmodel @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<qmt> + <project> + <uid>%{UUID1}</uid> + <root-package> + <instance> + <MPackage> + <base-MObject> + <MObject> + <base-MElement> + <MElement> + <uid>%{UUID2}</uid> + </MElement> + </base-MElement> + <name>%{Name}</name> + <children> + <handles> + <handles> + <qlist> + <item> + <handle> + <uid>%{UUID3}</uid> + <target> + <instance type="MCanvasDiagram"> + <MCanvasDiagram> + <base-MDiagram> + <MDiagram> + <base-MObject> + <MObject> + <base-MElement> + <MElement> + <uid>%{UUID3}</uid> + </MElement> + </base-MElement> + <name>%{Name}</name> + </MObject> + </base-MObject> + </MDiagram> + </base-MDiagram> + </MCanvasDiagram> + </instance> + </target> + </handle> + </item> + </qlist> + </handles> + </handles> + </children> + </MObject> + </base-MObject> + </MPackage> + </instance> + </root-package> + </project> +</qmt> diff --git a/share/qtcreator/templates/wizards/files/modeling/scratch/wizard.json b/share/qtcreator/templates/wizards/files/modeling/scratch/wizard.json new file mode 100644 index 00000000000..7f3f4219561 --- /dev/null +++ b/share/qtcreator/templates/wizards/files/modeling/scratch/wizard.json @@ -0,0 +1,35 @@ +{ + "version": 1, + "supportedProjectTypes": [ ], + "id": "SA.ModelScratch", + "category": "O.Model", + "trDescription": "Creates a scratch model using a temporary file.", + "trDisplayName": "Scratch Model", + "trDisplayCategory": "Modeling", + "platformIndependent": true, + "enabled": "%{JS: [ %{Plugins} ].indexOf('ModelEditor') >= 0}", + + "options": [ { "key": "TargetPath", "value": "%{JS: Util.mktemp('model-XXXXXX.qmodel')}" } ], + + "pages" : [], + "generators" : + [ + { + "typeId": "File", + "data": + { + "source": "file.qmodel", + "target": "%{TargetPath}", + "overwrite": true, + "openInEditor": true, + "options": + [ + { "key": "Name", "value": "Scratch", "evaluate": false }, + { "key": "UUID1", "value": "%{UUID}", "evaluate": true }, + { "key": "UUID2", "value": "%{UUID}", "evaluate": true }, + { "key": "UUID3", "value": "%{UUID}", "evaluate": true } + ] + } + } + ] +} |