diff options
Diffstat (limited to 'tools/utils/qtcreator/templates/wizards/classes/qt3d/wizard.json')
-rw-r--r-- | tools/utils/qtcreator/templates/wizards/classes/qt3d/wizard.json | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/tools/utils/qtcreator/templates/wizards/classes/qt3d/wizard.json b/tools/utils/qtcreator/templates/wizards/classes/qt3d/wizard.json new file mode 100644 index 000000000..de7053d08 --- /dev/null +++ b/tools/utils/qtcreator/templates/wizards/classes/qt3d/wizard.json @@ -0,0 +1,138 @@ +{ + "version": 1, + "kind": "file", + "id": "D.Qt3DClass", + "category": "O.C++", + "trDescription": "Creates a Qt3D class consisting of a C++ header, source file and private header for a new component that you can add to a C++ project.", + "trDisplayName": "Qt3D Class", + "trDisplayCategory": "C++", + "icon": "../../global/genericfilewizard.png", + "enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}", + + "options": + [ + { "key": "TargetPath", "value": "%{Path}" }, + { "key": "HdrPath", "value": "%{Path}/%{HdrFileName}" }, + { "key": "PrivateHdrPath", "value": "%{Path}/%{PrivateHdrFileName}" }, + { "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" }, + { "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" }, + { "key": "Base", "value": "%{JS: ( '%{BaseCB}' === '' ) ? '%{BaseEdit}' : '%{BaseCB}'}" }, + { "key": "isQObject", "value": "%{JS: [ 'QNode', 'QComponent', 'QEntity'].indexOf('%{Base}') >= 0 }" }, + { "key": "GUARD", "value": "%{JS: Cpp.classToHeaderGuard('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }, + { "key": "PRIVATEGUARD", "value": "%{JS: Cpp.classToHeaderGuard('%{Class}' + '_P', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" }, + { "key": "SharedDataInit", "value": "%{JS: ('%{IncludeQSharedData}') ? 'data(new %{CN}Data)' : '' }" }, + { "key": "IncludeQNode", "value": "%{JS: '%{BaseCB}' === 'QNode'}" }, + { "key": "IncludeQComponent", "value": "%{JS: '%{BaseCB}' === 'QComponent'}" }, + { "key": "IncludeQEntity", "value": "%{JS: '%{BaseCB}' === 'QEntity'}" }, + { "key": "IncludeQBackendNode", "value": "%{JS: '%{BaseCB}' === 'QBackendNode'}" } + ], + + "pages": + [ + { + "trDisplayName": "Define Qt3D Class", + "trShortTitle": "Details", + "typeId": "Fields", + "data" : + [ + { + "name": "Class", + "trDisplayName": "Class name:", + "mandatory": true, + "type": "LineEdit", + "data": { "validator": "(?:(?:[a-zA-Z_][a-zA-Z_0-9]*::)+[a-zA-Z_][a-zA-Z_0-9]*|)" } + }, + { + "name": "BaseCB", + "trDisplayName": "Base class:", + "type": "ComboBox", + "data": + { + "items": [ { "trKey": "<Custom>", "value": "" }, + "QQNode", "QComponent", "QEntity", "QBackendNode" ] + } + }, + { + "name": "BaseEdit", + "type": "LineEdit", + "enabled": "%{JS: '%{BaseCB}' === ''}", + "mandatory": false, + "data": + { + "trText": "%{BaseCB}", + "trDisabledText": "%{BaseCB}" + } + }, + + { + "name": "Sp1", + "type": "Spacer", + "data": { "factor": 2 } + }, + { + "name": "HdrFileName", + "type": "LineEdit", + "trDisplayName": "Header file:", + "mandatory": true, + "data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" } + }, + { + "name": "PrivateHdrFileName", + "type": "LineEdit", + "trDisplayName": "Private header file:", + "mandatory": true, + "data": { "trText": "%{JS: Cpp.classToFileName('%{Class}' + '_p', '%{JS: Util.preferredSuffix('text/x-c++hdr')}')}" } + }, + { + "name": "SrcFileName", + "type": "LineEdit", + "trDisplayName": "Source file:", + "mandatory": true, + "data": { "trText": "%{JS: Cpp.classToFileName('%{Class}', '%{JS: Util.preferredSuffix('text/x-c++src')}')}" } + }, + { + "name": "Path", + "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.h", + "target": "%{HdrPath}", + "openInEditor": true + }, + { + "source": "file_p.h", + "target": "%{PrivateHdrPath}", + "openInEditor": true + }, + { + "source": "file.cpp", + "target": "%{SrcPath}", + "openInEditor": true + } + ] + } + ] +} |