-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:qgis/QGIS
- Loading branch information
Showing
6 changed files
with
142 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@ECHO OFF | ||
SET CREATOR=%APPDATA%\QtProject\qtcreator | ||
SET WIZARDS=%CREATOR%\templates\wizards | ||
SET CODESTYLES=%CREATOR%\codestyles\cpp | ||
IF NOT EXIST "%WIZARDS%" ( | ||
mkdir "%WIZARDS%" | ||
) | ||
|
||
IF NOT EXIST "%WIZARDS%\qgis" ( | ||
mklink /J "%WIZARDS%\qgis" %CD%\templates\wizards\qgis | ||
) | ||
|
||
IF NOT EXIST "%CODESTYLES%" ( | ||
mkdir "%CODESTYLES%" | ||
) | ||
|
||
IF NOT EXIST "%CODESTYLES%\qgis_code_style.xml" ( | ||
mklink "%CODESTYLES%\qgis_code_style.xml" %CD%\qgis_code_style.xml | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
197 changes: 111 additions & 86 deletions
197
editors/QtCreator/templates/wizards/qgis/qgis_test/wizard.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,111 @@ | ||
{ | ||
"version": 1, | ||
"supportedProjectTypes": [ ], | ||
"id": "B.QGISTest", | ||
"category": "O.QGIS", | ||
"trDescription": "Creates a C++ QGIS Test", | ||
"trDisplayName": "QGIS C++ Test", | ||
"trDisplayCategory": "QGIS", | ||
"icon": "../qgis_icon.svg", | ||
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}", | ||
"platformIndependent" : true, | ||
|
||
"options": | ||
[ | ||
{ "key": "TargetPath", "value": "Test%{Path}" }, | ||
{ "key": "SrcPath", "value": "%{Path}/%{SrcFileName}" }, | ||
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" } | ||
], | ||
|
||
"pages": | ||
[ | ||
{ | ||
"trDisplayName": "Define Tests", | ||
"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": "Sp1", | ||
"type": "Spacer", | ||
"data": { "factor": 2 } | ||
}, | ||
{ | ||
"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": "%{CurrentProject:Path}\\tests\\src\\", | ||
"path": "%{CurrentProject:Path}\\tests\\src\\" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"trDisplayName": "Project Management", | ||
"trShortTitle": "Summary", | ||
"typeId": "Summary" | ||
} | ||
], | ||
|
||
"generators": | ||
[ | ||
{ | ||
"typeId": "File", | ||
"data": | ||
[ | ||
{ | ||
"source": "file.cpp", | ||
"target": "%{SrcPath}", | ||
"openInEditor": true, | ||
"options": [ | ||
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" }, | ||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" } | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
{ | ||
"version": 1, | ||
"supportedProjectTypes": [ ], | ||
"id": "B.QGISTest", | ||
"category": "O.QGIS", | ||
"trDescription": "Creates a C++ QGIS Test", | ||
"trDisplayName": "QGIS C++ Test", | ||
"trDisplayCategory": "QGIS", | ||
"icon": "../qgis_icon.svg", | ||
"enabled": "%{JS: [ %{Plugins} ].indexOf('CppEditor') >= 0}", | ||
"platformIndependent" : true, | ||
|
||
"options": | ||
[ | ||
{ "key": "TargetPath", "value": "Test%{Path}" }, | ||
{ "key": "SrcPath", "value": "%{Path}/%{Area}/%{SrcFileName}" }, | ||
{ "key": "CN", "value": "%{JS: Cpp.className('%{Class}')}" } | ||
], | ||
|
||
"pages": | ||
[ | ||
{ | ||
"trDisplayName": "Define Tests", | ||
"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": "Area", | ||
"trDisplayName": "API Area", | ||
"type": "ComboBox", | ||
"data": | ||
{ | ||
"items": [ | ||
"analysis", | ||
"app", | ||
"core", | ||
"gui", | ||
"providers" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "Sp1", | ||
"type": "Spacer", | ||
"data": { "factor": 2 } | ||
}, | ||
{ | ||
"name": "LabelQQC_1_0", | ||
"type": "Label", | ||
"span": true, | ||
"data": | ||
{ | ||
"wordWrap": true, | ||
"trText": "Area selected above will be added to the final path to put the test in the correct location. You shouldn't need to change anything in here generally." | ||
} | ||
}, | ||
{ | ||
"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": "%{CurrentProject:Path}/tests/src/", | ||
"path": "%{CurrentProject:Path}/tests/src/" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"trDisplayName": "Project Management", | ||
"trShortTitle": "Summary", | ||
"typeId": "Summary" | ||
} | ||
], | ||
|
||
"generators": | ||
[ | ||
{ | ||
"typeId": "File", | ||
"data": | ||
[ | ||
{ | ||
"source": "file.cpp", | ||
"target": "%{SrcPath}", | ||
"openInEditor": true, | ||
"options": [ | ||
{ "key": "Cpp:License:FileName", "value": "%{SrcFileName}" }, | ||
{ "key": "Cpp:License:ClassName", "value": "%{CN}" } | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters