644 Commits

Author SHA1 Message Date
Andrea Giudiceandrea
d7e819de38 [Modeler] Fix algorithms help URL 2024-12-17 02:33:45 +01:00
Denis Rouzaud
0f032e5f2d run pre-commit on all files 2024-11-29 15:38:02 +01:00
Andrea Giudiceandrea
e688fb104e [gui][pocessing][modeler] Fix window's title 2024-09-24 06:40:50 +10:00
Harrissou Sant-anna
bb275d1188
Modeler - Show group in the algorithm dialog title 2024-08-27 18:41:52 +02:00
Nyall Dawson
133bad76ee Move some model designer code to c++ 2024-04-21 06:46:35 +10:00
Nyall Dawson
763278f8ef Don't use removed QDesktopWidget 2024-02-13 08:13:43 +10:00
Nyall Dawson
e42abf7dc5 Update python files 2024-01-22 05:46:15 +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
cb5fbaf026 Avoid double loading model algorithms when starting provider 2023-12-07 16:20:25 +10:00
Nyall Dawson
440cac298f Promote QgsProcessingModelChildParameterSource source to enum class and move to Qgis
This wasn't marked as stable API, so we don't need any of the usual monkey patching code
2023-08-25 15:44:05 +10:00
Nyall Dawson
8df81beff0 Add a new processing log level for debugging models
At model debug log level we'll show all the generic
logs for step preparation, inputs and outputs for every
child algorithm, including those which we normally skip
(eg raise warnings/outputs, string concatenation, etc).
This gives model designers more useful information to
debug their models.

Use this new log level when running models through the
model designer window.
2023-08-25 15:02:52 +10:00
Etienne Trimaille
9e8364a271
Python - Use some format function for translations 2023-04-25 09:43:54 +02:00
Etienne Trimaille
3cab3c43a2
Python - Run pyupgrade on the processing plugin 2023-04-24 10:03:57 +02:00
Nyall Dawson
f3132a8e10 [processing] Fix python script editor windows can get garbage collected
Fixes #52304
2023-03-20 16:06:24 +10:00
Nyall Dawson
dd89f3779a [processing] Always use the same method to launder names
Ultimately avoids forced removal of _ characters in model
parameter names
2022-03-30 15:41:23 +10:00
Nyall Dawson
5df4882380 Fix exception when editing outputs in models 2022-02-28 19:57:15 +10:00
Nyall Dawson
d62d0b82e3 Port model help editor dialog to c++ 2022-02-28 17:33:49 +10:00
Nyall Dawson
fffc3a768b Don't show 'model was correctly saved' notification when saving models
We don't do this elsewhere (e.g. saving QGIS projects), and it makes
it sound like it's suprising that the save worked correctly..!
2022-02-28 17:33:36 +10:00
Nyall Dawson
817895d6d3 [processing] When an input parameter is renamed in the model designer,
also update the internal name of that parameter and all child algorithms
in the model accordingly

Before we just "faked" this by changing the parameter's description
only, but that meant that the old name was permenantly stuck and
had to be used in qgis_process or when calling the model via
python.
2022-02-28 17:33:19 +10:00
Nyall Dawson
8f34557037 [processing] When closing a model with unsaved changes, if the user
accepts the prompt to save the changes BUT then cancels the file dialog
asking for the destination file name, don't treat this as though the
user has opted to discard the model
2022-02-07 12:01:07 +10:00
Nyall Dawson
d899da1ed2 [processing] Fix issues with edits to model outputs getting discarded
Specifically, this fixes two issues

1. If a user edits a dark green output block in a model and changes the
name of the output, that new name was always discarded and the only
way to change it was by editing the algorithm it was attached to

2. If an output was renamed through the algorithm properties dialog,
then any properties previously associated with that output (like
comments, coloring, placement, default value, mandatory flag)
would get reset back to their default settings
2022-02-07 10:04:00 +10:00
Nyall Dawson
91ca892c34 Fix translation string 2022-02-05 11:05:51 +10:00
Nyall Dawson
7b9b486096 [processing] When "saving as" a model, if the model name originally
was a complete match for the old file name, then update the model
name for the saved as model to also match the NEW file name

E.g.

Scenario 1
- user has a model stored as "Save features.model3", named "Save
  features"
- user 'saves as' this model as "Delete features.model3"
- the model name is automatically updated to match the new file
name, i.e. "Delete features"

Scenario 2
- user has a model stored as "Save features.model3", named "Process
incoming features from API"
- user 'saves as' this model as "Save features v2.model3"
- the model name is NOT changed, and is left at the original
"Process incoming features from API" name
2022-02-05 11:05:51 +10:00
Nyall Dawson
a169055277 [processing] Improve UX when saving models
- When saving a model to a file, don't require that the model already
has a name entered. Instead, if no model name has been entered then
set the model name automatically to match the selected save filename.
E.g. if the user saves the model as "Process incoming features.model3",
then the model name will be set to "Process incoming features".
- When first saving a model, IF the user HAS already entered a model
name then make the default file name suggested by the dialog match
this model name
2022-02-05 11:05:51 +10:00
Nyall Dawson
e748877a59 [processing] Fix initial directory shown in model open file dialogs
should be the users home file, or the last used model directory
2022-02-04 16:34:53 +10:00
Nyall Dawson
8486afbdd1 [processing] Fix model designer sometimes opens behind other windows 2022-02-04 16:34:53 +10:00
Nyall Dawson
86794dabdc Fix interface for QgsProcessingParametersGenerator was modified for
the python subclasses only and no longer correctly overrides the
base class method
2021-12-16 11:15:34 +10:00
Antoine
9272035c4e copy model only when no error 2021-11-03 06:53:03 +11:00
Antoine
d2425f51b8 remove model validity condition 2021-11-03 06:41:45 +11:00
Antoine
030bfd96b5 change the var with another 2021-09-27 16:13:20 +10:00
Alexander Bruy
9098f2c6f9 warn when adding model with the same name as the existing one (fix #42184)
confirm model overwrite if model file has the same name as the existing
one
2021-07-21 20:47:57 +10:00
Alexander Bruy
82ad2051e6 fix file permissions
remove duplicated short help file
2021-06-21 07:17:36 +03:00
Nyall Dawson
c8d61499ff [processing] Instead of a hidden parameter for verbose model logging,
add an explicit log level getter/setter to QgsProcessingContext which
algorithms can use to determine an appropriate level of feedback
to push to users.

Initially the verbose log only triggers the full verbose output
of model executions (which is also used when running models through
the model designer), but the intention is that more algorithms
will fine tune their output based on the logging level.

qgis_process also gains a new --verbose switch to enable verbose
log output.
2021-02-20 05:04:00 +10:00
Luigi Pirelli
2f7d6defee Added sanity check of links between graphicitems showing error in dialog. Fixes #40724 #39260 2021-02-11 11:47:28 +10:00
Nyall Dawson
814b65ba1c Cleaner approach -- create expression contexts in modeler parameter
definition dialogs using expression context and processing context
generators
2021-01-14 16:15:06 +10:00
roya0045
5920ded609 invert logic 2021-01-05 18:24:06 +10:00
roya0045
d45b6144e4 add skip kwarg 2021-01-05 18:24:06 +10:00
Alex
50696f9936
[processing] fix exception when clicking help button in modeler
Fixes #40453
2020-12-07 09:26:17 +10:00
Denis Rouzaud
eddf6feb45 modernize CMakeLists.txt files 2020-11-12 07:14:46 +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
e89b7283fe Fix exception when editing certain model algorithms
Fixes #36036
2020-04-28 19:21:24 +10:00
Juergen E. Fischer
067e9254e7 translation string fixes 2020-04-24 16:30:45 +02:00
Nyall Dawson
05bc716827 Move model child algorithm dependencies selection widget to c++, make inline panel 2020-04-16 16:02:53 +10:00
Nyall Dawson
acc68447c3 Validate models before running from designer, showing a summary of issues 2020-04-14 20:27:21 +10:00
Nyall Dawson
2dc07ee8f7 [processing] Show warnings in model designer message bar if algorithm
definition is incomplete/invalid after editing a child algorithm
2020-04-14 20:27:21 +10:00
Nyall Dawson
f476fe7fc4 [processing] Don't force a child algorithm in a model to have all valid values upfront
This allows defered setting of parameter values, e.g. if you add an algorithm, fill in
half the parameter values, then realise you need to add a new input to the model, you
don't have to lose all your filled in values...
2020-04-14 20:27:21 +10:00
Alexander Bruy
076a0268ab cleanup imports 2020-04-05 05:23:29 +10:00
Alexander Bruy
91229e366a [processing] port map layer parameter definition widget to C++ 2020-04-05 05:23:29 +10:00