176 Commits

Author SHA1 Message Date
Nyall Dawson
8486afbdd1 [processing] Fix model designer sometimes opens behind other windows 2022-02-04 16:34:53 +10:00
Nyall Dawson
5e5540c890 [processing] Port algorithm log to new history provider API
No user visible changes, but we gain the flexibility for better
history storage, including the ability to store the outputs
calculated by the algorithm execution...!
2021-12-21 15:32:57 +10:00
Nyall Dawson
86e94aed42 [feature] Add action to processing algorithm advanced menu to copy the
current settings as JSON and paste json settings from clipboard

The utility of this is two fold:

1. It provides a way for users to copy the settings defined in the
dialog in a text format, so they can store these easily and then
restore later by pasting the value

2. It provides an easy way for users to copy the settings into
the json format consumed by qgis_process (following
https://github.com/qgis/QGIS/pull/46497), so that it is easy
for users to see the expected format even for complex parameters
(like tin interpolation parameters)
2021-12-17 08:29:31 +10:00
Nyall Dawson
132294b3c9 Spelling 2021-12-16 11:15:34 +10:00
Nyall Dawson
eea2ba3d93 QgsProcessingAlgorithmDialogBase subclasses should also implement
the QgsProcessingContextGenerator interface
2021-12-16 11:15:34 +10:00
Nyall Dawson
03d0c573c4 Add mode enum for processing algorithm dialogs so that code can
determine if the single execution or batch execution dialog is shown
2021-12-16 11:15:34 +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
Nyall Dawson
dcf0cfe5a3 Fix API issues causing malformed python stub files
Fixes #46240
2021-11-29 11:54:06 +10:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
a6645d9cba fix test + rebase 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
nirvn
7a0fb2acdd [ui] Fix unmet expectation: when navigating the processing toolbox panel via keyboard, hitting return/enter should launch focused algorithm 2021-10-10 23:36:37 -07:00
Nyall Dawson
02266ef8e6 Rename Qgis::MessageLevel::None to NoLevel. None is a reserved
keyword in Python, so this value was previously inaccessible to PyQGIS
scripts

Also change all references to Qgis::MessageLevel values to their
fully qualified names, to ease a future transition to an enum
class (when sip bugs are fixed)

Fixes #42996
2021-05-30 10:36:01 +10:00
Nyall Dawson
eaf70803b0
Cleanup auto generated sip files and remove orphaned files (#43240) 2021-05-17 08:09:27 +02:00
Nyall Dawson
615b63e76d [processing] When configurating a field calculator algorithm in a model,
ensure that the correct expression context is set for the widget

Otherwise we don't see any of the available variables ready for
use in the calculation.

We need to do this manually after creating the widget, because the
context generator isn't set till after the widget is created, and
this particular widget configuration doesn't fetch the expression
context on demand.
2021-04-02 06:30:27 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01: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
Alessandro Pasotti
7b2fc4c1f8 More doxy nonsense, pt 2 2021-02-19 08:15:29 +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
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +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
nirvn
04b9c6ab00 [processing] Add a warning-level information message feedback 2020-12-07 14:15:35 +07:00
Nyall Dawson
cc0cfbe02b [processing] Also fix expression preview results in Aggregate algorithm 2020-07-24 10:26:17 +10:00
Nyall Dawson
1219f55378 [processing] Fix and improve how in place algorithm parameter widget
handles the input layer by creating a new QgsProcessingHiddenWidgetWrapper
wrapper subclass

Fixes #37424
2020-07-10 04:44:30 +10:00
Denis Rouzaud
044a05d828 run sipify 2020-06-19 08:47:23 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
d5a340f886 [processing] Port aggregates widget wrapper to c++
And add a TON of tests

Fixes #36843
2020-06-03 15:17:56 +10:00
Nyall Dawson
f0bb647c61 [processing] Add a stable way to get processing widgets to stretch vertically 2020-06-02 08:43:54 +10:00
Nyall Dawson
251dec51e8 [processing] Correctly close algorithm dialog when escape key pressed
Fixes #36777
2020-05-29 18:31:01 +10:00
gacarrillor
8a7feeddbb [processing] Destroy widgets from an algorithm dialog as soon as it is rejected 2020-05-18 09:28:55 +10:00
Martin Dobias
49f832a24d Added widget wrapper, added two separate algorithms (xyz + mbtiles) 2020-05-08 12:55:08 +02:00
olivierdalang
915b67ddb2
[processing modeler] Show arrowheads for parent/child relations 2020-04-17 08:49:46 +10: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
0558d64198 Add mechanism to show warning messages in modeler designer 2020-04-14 20:27:21 +10:00
Nyall Dawson
d24ae53e0f Tweak model component clipboard logic -- only copy comments and outputs
connected to algorithms when they have been explicitly selected by the user
2020-04-14 14:36:02 +10:00
Nyall Dawson
47f96e2466 [FEATURE][processing] Allow copying/cut/paste of model components
This commit allows users to copy and paste model components, both
within the same model and between different models
2020-04-14 14:36:02 +10:00
Nyall Dawson
0396162d1f [processing] De-emphasise SAGA results when searching in toolbox
This change "dims" the results from the SAGA provider when a search
is made in the toolbox, to visually push users towards picking alternative
algorithms instead.

The Processing implementation of SAGA algorithms are a constant source
of critical bugs for users, causing incorrect analysis results. There's
zero community interest in actively maintaining this provider, so we
need to take steps to push users to stop picking these algorithms
wherever alternative (QGIS/GRASS/GDAL based) equivalents exist.

And for 4.0, seriously re-consider dropping this provider from the
out of the box install. We are causing more harm then good by offering
it to users.
2020-04-13 17:12:14 +10:00
Nyall Dawson
6326ac6b5e Silly sip nonsense 2020-04-07 17:05:44 +10:00
Nyall Dawson
a80bdc47e5 [processing] Add API and interfaces so that widget wrappers can retrieve the
current set of parameters for other parameters when required
2020-04-04 17:58:55 +10:00
Nyall Dawson
740be229cb Typo 2020-04-02 02:29:54 +10:00
Nyall Dawson
d20a3bddc0 [FEATURE][processing] Port output parameter wrappers to new c++ API for modeler
This allows a range of new possibilities, including:
- models with static outputs for child algorithms, e.g. always saving
a child algorithm's output to a geopackage or postgres layer
- models with expression based output values for child algorithms, e.g.
generating an automatic file name based on today's date and saving
outputs to that file
2020-04-02 02:29:54 +10:00
Nyall Dawson
3976e14ae8 Refine arrow API to allow control over whether arrows join to incoming or outgoing sides 2020-04-02 02:29:54 +10:00
Nyall Dawson
c98cd8d1a8 Partial port of destination wrappers to c++ API 2020-04-02 02:29:54 +10:00
Nyall Dawson
50b723ce7b [FEATURE][processing] Add menu to the Model Designer "View" menu
allowing users to zoom direct to any group box present in the model

Allows for simplified navigation of complex models
2020-04-01 18:20:09 +10:00
Nyall Dawson
4fa9083cf6 [FEATURE][processing] Allow creation of group boxes in models
These are a visual guide, allowing designers to create logical groups
of algorithms relating to a single task ("eg 'Prepare data')

The title and color of the group boxes can be customized
2020-04-01 18:20:09 +10:00
Nyall Dawson
e788be93fa [processing][FEATURE] Add api for setting model component colors, and expose
the option to set manual colors for individual model comments
2020-04-01 18:20:09 +10:00
Nyall Dawson
f268b09d1b Also show child input values 2020-03-31 19:35:51 +10:00
Nyall Dawson
5963b90f2c [processing][FEATURE] After running a model through the model designer,
show the obtained values for all child algorithm outputs within the designer
canvas

This gives users better tools for debugging models - they can see exactly
what values were output by the child algorithms and flowed into other
parts of their model
2020-03-31 19:35:51 +10:00
Nyall Dawson
cb990c69c2 Setup framework for receiving model child results after running through model designer 2020-03-31 19:35:51 +10:00