280 Commits

Author SHA1 Message Date
Alexander Bruy
b6d1d7e8d6 add missed import and fix getThemeIcon() call (follow-up #60261) 2025-02-06 09:54:48 +00:00
Mathieu Pellerin
b4b2dfdd21 Address review 2025-01-30 08:47:29 +10:00
Alexander Bruy
5c67214a4d make use of QKeySququence in Processing script editor compatible with
PyQt6 (fix #60063)
2025-01-28 08:37:16 +10:00
Etienne Trimaille
6f4304bc0e Review the Processing script template : add annotations, remove self.tr 2024-12-11 10:59:00 +10:00
Denis Rouzaud
0f032e5f2d run pre-commit on all files 2024-11-29 15:38:02 +01:00
Mathieu Pellerin
26b7c1ed7d [processing] Fix script editor dialog flagging opened files as immediately modified 2024-08-16 15:05:37 +07:00
Mathieu Pellerin
26308050c4 [processing] Fix script editor dialog wrongly jumping back to line 1 and setting changed to true after saving file 2024-08-16 14:53:53 +07:00
Nyall Dawson
b1947bfa8a Fix console script editor tries to save as ".py.py" 2024-06-18 05:23:57 +10:00
Nyall Dawson
d345c68c5a Move responsibility for loading scripts to QgsCodeEditorWidget 2024-06-18 05:23:57 +10:00
Nyall Dawson
8e88d4842b Use QgsCodeEditorWidget in processing script editor
And remove custom search/replace functionality, it's now replaced
by the standard QgsCodeEditorWidget implementation
2024-05-16 08:44:14 +10:00
Nyall Dawson
c16a1e2b3d Update enums 2024-01-19 19:44:48 +10:00
Julien Cabieces
9d12ae8e6d [PyQt6] Add scope for enums and get rid of PyQt5.XXX import
this has been done automatically with the following comand line

./scripts/3to4/3to4.py --only-qgis3-compatible-changes ./python/plugins/
./scripts/3to4/3to4.py --only-qgis3-compatible-changes ./tests/src/python/
2024-01-10 21:15:27 +10:00
Nyall Dawson
83bc6be01c Fix broken processing script editor actions
SIP is totally messed up here -- the dialog wrapper or something
is always prematurely cleaned which results in broken QObject
connections throughout.
Hack around this by storing dialog instances in a global list to
prevent too early wrapper garbage collection
2023-07-24 19:44:04 +10:00
Etienne Trimaille
3cab3c43a2
Python - Run pyupgrade on the processing plugin 2023-04-24 10:03:57 +02:00
Nyall Dawson
6c8bda7bab Fix crash in processing script editor when text is changed programatically 2023-03-20 16:06:24 +10:00
Nyall Dawson
8a3ab39bd3 Fix invalid base class used in processing ui file 2023-03-20 16:06:24 +10:00
Nyall Dawson
f3132a8e10 [processing] Fix python script editor windows can get garbage collected
Fixes #52304
2023-03-20 16:06:24 +10:00
Yoann Quenach de Quivillic
1c79b4927d
[feature][console] Add toggle comment action in the python console (#50341)
Adds a toggle comment action in the Python Console and script editors
2023-01-07 09:27:08 +10:00
Juergen E. Fischer
4fb5e0a11d processing: fix scripts directory reset on windows 2022-04-11 09:50:16 +10:00
Nyall Dawson
385c67aaa7 Revert "processing: fix scripts folder reset on windows"
This reverts commit efea53f51227189275df4067b4fc05bb781e8158.
2022-03-07 08:33:06 +10:00
Juergen E. Fischer
efea53f512 processing: fix scripts folder reset on windows 2022-03-05 19:42:48 +01:00
Nyall Dawson
d0718cbffe [feature] qgis_process now supports running a Python script algorithm
directly by specifying the path to the .py file in place of
an algorithm ID or model file path
2021-12-15 15:24:23 +10:00
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