258 Commits

Author SHA1 Message Date
Evan Derickson
0e63799012 Reduce appends 2021-02-20 12:26:00 +10:00
Andrea Giudiceandrea
40569f414e Fix importlib util module import
to avoid "module 'importlib' has no attribute 'util'" error that prevent the load of user scripts in some circumstances
2020-11-12 10:18:04 +10:00
Denis Rouzaud
eddf6feb45 modernize CMakeLists.txt files 2020-11-12 07:14:46 +10:00
Nyall Dawson
011f773d49 Use standard QgsCodeEditorPython widget in Processing script editor 2020-10-06 03:57:50 +10:00
Richard Duivenvoorde
c1d1a72fdc Moving away from the console-'ColorEDIT' scheme in favour of the console-'Color'-one 2020-07-07 22:18:27 +02:00
Nyall Dawson
92ebf7bc8d [processing] Fix running script algorithm from editor dialog
We have to keep a local reference to the dialog, otherwise sip suddenly
"forgets" about the python subclass and treats the dialog as just
the parent c++ class. Really weird, thanks sip.

Fixes #36436
2020-05-20 18:21:02 +10:00
Nyall Dawson
c6690c2ee8 Create runtime profiles for various startup/provider initialisation
tasks in processing

Attempting to diagnose occasional very slow QGIS startup times
2020-05-19 04:35:34 +10:00
Nyall Dawson
b6a7a10703 Fix some more python formatting issues, remove more flake exceptions 2020-05-11 11:41:50 +10:00
Nyall Dawson
872b4640c1 Revert "fix script path on windows"
This reverts commit aa1c3e11e84f77584e7cd835d896379aad81b284.

The change breaks a test
2020-04-06 10:42:43 +10:00
Juergen E. Fischer
aa1c3e11e8 fix script path on windows 2020-04-05 18:26:33 +02:00
Radoslaw Guzinski
7771c6cea9 [processing] Looks for script algorithm files also in subfolders. 2020-01-30 08:48:54 +10:00
Radoslaw Guzinski
ea0a701d7a [processing] Catch AttributeError and TypeError when loading Processing script algorithms.
Otherwise an error in decorator of one script prevents all scripts from loading.
2020-01-30 08:48:54 +10:00
Bas Couwenberg
2628c480c5 Don't include revision in sources.
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
Luigi Pirelli
c0ec79ef05
Merge pull request #9172 from luipir/fix_19731
try to reset script path pointing to the current setting path
2019-04-29 10:48:24 +02:00
Nyall Dawson
7aca208522 Update processing script template 2019-03-28 11:47:23 +10:00
Etienne Trimaille
2076ca4fe0
replace some PyQt5 to qgis.PyQt 2019-03-09 22:45:51 -04:00
Bas Couwenberg
371176357b Fix spelling errors.
* cancelation -> cancellation
 * overal      -> overall
2019-02-24 22:39:40 +01:00
Luigi Pirelli
a2bf5ccefd try to reset script path pointing to the current setting path 2019-02-13 18:52:18 +01:00
Nyall Dawson
f77cf4fae4 [processing] Formalise object design for ContextAction, allow icons to be set 2019-02-01 17:54:28 +11:00
Nathan Woodrow
87d2da13fb
[FEATURE][needs-docs] Add new @alg decorator for nicer python processing scripts. (#8586)
@alg()
@alg.help()
@alg.input()
@alg.output()
2018-12-10 16:35:52 +10:00
Nyall Dawson
0e928e8191 [processing] Correctly set parent widgets for algorithm dialogs
to avoid dialogs immediately going out of scope and being garbage
collected
2018-11-23 20:32:16 +11:00
Nyall Dawson
ea9d5bb363 Fix mangled fonts in script editors
Don't override default font letter spacing or stretch -- it's not
safe to do because the results are very dependent on the individual
font's appearance and rendering hints.

Fixes #20349
2018-11-05 10:35:18 +10:00
Nyall Dawson
a0292c3ff3 [processing] Reload scripts after a script has been saved in the editor
Fixes #19934
2018-09-30 08:31:06 +10:00
Luigi Pirelli
33f83d68f0 revert crs to sourceCrs for feature sources 2018-09-03 10:58:37 +02:00
Luigi Pirelli
ddc5e52ab3 update template to current api (3.4) 2018-08-31 10:41:22 +02:00
Nyall Dawson
a0b4e024bb [processing] Respect application stylesheet in modeler/script editor dialogs 2018-08-16 09:12:22 +10:00
Alexander Bruy
65ae32aadd [processing] homogenize filter strings for models and scripts 2018-08-03 08:34:05 +03:00
Etienne Trimaille
0685197b6c
add hint about pushing information to the user in script template 2018-07-03 16:45:55 -04:00
Nyall Dawson
1395dc0e9c Add missing license headers 2018-06-04 11:30:32 +10:00
nirvn
45aca2f942 fix unclosed strings not style in python console & script editor 2018-05-23 10:08:02 +07:00
nirvn
9cf6bbf424 Improve default color scheme for python console & script editor 2018-05-22 17:56:25 +07:00
nirvn
45b045d212 Fix missing color settings for python console / script editor 2018-05-22 13:31:29 +07:00
Nyall Dawson
c0d9528090 Silence python warnings from 3rd party libraries on startup 2018-05-22 06:02:55 +10:00
Nyall Dawson
84163841df [processing] Improved script editor dialog title
- show filename in title, or 'Untitled Script' for new
scripts
- show unsaved ('*') indicator when unsaved changes present
2018-05-21 14:28:37 +10:00
nirvn
fb882494d5 [needs-docs][processing] reword add model/script to toolbox actions 2018-05-21 10:58:40 +07:00
nirvn
05beaa73b3 [needs-docs][processing] open existing script toolbar action 2018-05-21 10:58:40 +07:00
nirvn
310bfb1e3e [processing] show indentation guides in script editor 2018-05-20 15:50:31 +07:00
nirvn
6b3ebfc019 harmonize open script icons 2018-05-20 15:50:31 +07:00
nirvn
af45b84c1f [processing] do no wrap line in script editor
(harmonize behavior with python console)
2018-05-20 15:50:31 +07:00
nirvn
2ad74b9d97 [processing] better unsaved change dialog upon closing script editor 2018-05-20 15:50:31 +07:00
nirvn
5a4d33f351 [processing] use python console color/font settings for the script editor 2018-05-20 15:50:31 +07:00
nirvn
6d067ba9e0 [processing] tiny improvements to the script editor
- add a keyboard shortcut to toggle the find panel
- focus on the find text box when opening panel
- find text when hitting return
2018-05-19 18:22:27 +07:00
Nyall Dawson
249dca7830 [processing] Consist helpful error messages when sinks cannot be created
And throw exceptions always when sinks are not created to avoid
generic errors
2018-04-28 05:50:47 +10:00
Nyall Dawson
5339d62715 [processing] More helpful errors when sources cannot be loaded
Include descriptive text with the specified parameter value
in error, and always check that sources were loaded to avoid
raw Python exceptions when they are not
2018-04-28 05:50:47 +10:00
Nyall Dawson
9ce21e4a82 [processing] Add an example of running a sub-algorithm correctly
to script template file
2018-04-27 17:04:57 +10:00
matteo
b6242b4a58 rename algorithm name in template script 2018-04-13 06:47:56 +10:00
Nyall Dawson
ad3f1781d7 [processing][needs-docs] Rename "Add Script from Template" to
"Create New Script from Template"
2018-04-02 17:57:03 +10:00
matteo
11c0e562bf fix indentation 2018-03-31 18:30:40 +11:00
matteo
925d45dffb new LoadFromTemplate action in toolbar dropdown 2018-03-31 18:30:40 +11:00
matteo
deaeaa6e97 remove useless action from script editor 2018-03-31 18:30:40 +11:00