62 Commits

Author SHA1 Message Date
luz.paz
604e66ba75 sipify_all 2019-07-16 11:29:42 +10:00
Nyall Dawson
7833162ca0 [processing] Fix occasional crash in Processing gui unit test cleanup 2019-07-11 10:36:59 +10:00
Nyall Dawson
164f6aec6b Spelling 2019-07-01 17:01:34 +10:00
Nyall Dawson
074c584c54 Don't allow name-less parameters 2019-07-01 17:01:34 +10:00
Nyall Dawson
10d6a8a122 [processing][API] Add API to QgsProcessingGuiRegistry and QgsProcessingParameterWidgetFactoryInterface
to handle creation of parameter definition widgets

Previously, these configuration widgets were all hardcoded into the Python modeler
dialog. This prevented 3rd party, plugin provided, parameters from ever being full
first class citizens in QGIS, as there was no way to allow their use as inputs to
user created models to be customised.

Now, the registry is responsible for creating the configuration widget, allowing
for 3rd party parameter types to provide their own customised configuration
widgets.

Refs #26493
2019-07-01 17:01:34 +10:00
Nyall Dawson
fbd243be65 [processing] Port map layer selection combobox widget to c++
And:

- fix enable state of selected features only after changing between
map layers with/without selections
- fix state of selected features only when running an algorithm
from the history list, e.g. respect original setting for
selected features only (or not)
- ensure no duplicate changed signals are sent, and correctly
emit changed signals in all applicable circumstances
- handle drag and dropped layers from browser panel (UX fix)
- soak with unit tests
2019-06-15 15:05:48 +10:00
Nyall Dawson
719a225bca [processing] Port point widget wrapper to new API
And switch to a snapping canvas tool when selecting points from canvas
2019-03-17 16:19:40 +10:00
Nyall Dawson
5ec43cfdc1 [processing] Add project to QgsProcessingParameterWidgetContext 2019-03-12 08:16:52 +10:00
Nyall Dawson
cccf974211 [processing] Port enum widget wrapper to new API
Fixes:
- enum parameters set to "allow multiple" only allow a single
value selection when used in modeler
- optional enum parameters cannot be set to no value when
used outside of modeler

Fixes #20406
2019-03-08 15:46:59 +10:00
Nyall Dawson
63d648738d [processing][needs-docs] By default, hide algorithms with known issues from toolbox
And add a Processing setting to allow these to be shown. When shown, they
are highlighted in red with a tooltip explaining that the algorithm
has known issues
2019-03-06 06:33:06 +10:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Nyall Dawson
b06f00d01b Fix dox test 2019-02-20 05:39:04 +10:00
Nyall Dawson
24529b1963 [processing] Add API to set contexts for QgsProcessingAlgorithmConfigurationWidgets 2019-02-20 05:39:04 +10:00
Nyall Dawson
9a75976ca4 API tweaks 2019-02-12 07:18:02 +10:00
Nyall Dawson
6fff62e668 Fix confusing override of accept method for non-dialog acceptance 2018-11-23 20:32:16 +11:00
Nyall Dawson
47bf1f49d8 Fix ownership of algorithm instance used by processing dialog 2018-11-23 20:32:16 +11:00
Nyall Dawson
4d97d20635 Fix incorrect ownership of processing algorithm dialog 2018-11-23 20:32:16 +11:00
Nyall Dawson
eb24bdb484 Dox 2018-09-22 05:26:29 +10:00
Nyall Dawson
6c35c8b308 Fix broken doxygen link 2018-09-22 05:26:29 +10:00
Nyall Dawson
4a0a48fe47 [processing] Also expose complete expression context inside
data defined buttons for model child algorithms

The context was not previously exposed, so users would not have
been aware that they can utilise all the variables and functions
available to parameters within child algorithms.
2018-09-22 05:26:29 +10:00
Nyall Dawson
8f9f975ed6 [processing] Show complete expression context in expression builder
for pre-calculated expressions

Correctly exposes ALL the variables and functions available for use
in pre-calculated expressions so that users actually know they can
use these in their models!
2018-09-22 05:26:29 +10:00
Nyall Dawson
7af13f62c0 Set widget context for widget wrappers 2018-09-22 05:26:29 +10:00
Nyall Dawson
55e22b9de9 Allow setting the context for widget wrappers
The context contains settings which reflect the context ini
which a Processing parameter widget is shown, e.g., the
parent model algorithm, a linked map canvas, and other relevant
information which allows the widget to fine-tune its behavior.
2018-09-22 05:26:29 +10:00
Nyall Dawson
11667683b4 Distance 2018-09-22 05:26:29 +10:00
Alessandro Pasotti
84368131e2 Update dox 2018-09-14 18:23:03 +10:00
Alessandro Pasotti
c05aa149b0 Test supportInPlace for all polygon algorithms 2018-09-14 18:23:03 +10:00
Alessandro Pasotti
4549ee5fff In-place moved check logic into QgsAlgorithm
+ new tests
+ fixed fixer function
+ drop z/m
2018-09-14 18:23:03 +10:00
Alessandro Pasotti
123905a17a Fix doc string 2018-09-14 18:23:03 +10:00
Nyall Dawson
681d44f11f Messy mockup of feature 2018-09-14 18:23:03 +10:00
Nyall Dawson
6935027ead [processing] Fix API break in widget wrapper
Fixes #19820
2018-09-13 05:40:39 +10:00
Nyall Dawson
f83b3ecc84 Show helper text in expression builder for CRS values in modeler 2018-09-06 18:11:24 +10:00
Nyall Dawson
06d37fced4 [processing] Port CRS widget wrapper to c++ classes 2018-09-06 18:11:24 +10:00
Nyall Dawson
d563034583 Address review comments 2018-09-04 19:06:07 +10:00
Nyall Dawson
e76b761dd0 Correctly associate layer with dynamic properties 2018-09-04 19:06:07 +10:00
Nyall Dawson
70c1680754 Automatically handle adding data defined button for dynamic properties
Also exposes this capability to modeler - so that model algorithms
can use data defined parameters within their child algorithms.

TODO:
- tests
- setting the associated vector layer
2018-09-04 19:06:07 +10:00
Nyall Dawson
a717b85e2e [FEATURE][processing] New modeler parameter widget
A new widget which handles parameter values for child algorithms
within a model. Instead of the previous approach of requiring
individual widget wrappers to handle creation of a suitable
model widget, we do all this automatically for them.

This widget uses a stacked widget with a toolbutton to select
the parameter's source, instead of the previous combo box approach
(which didn't scale well for large models). I.e. users select
first whether the value is taken from a static value, a
model input, or an output from a different child algorithm. The
widget then changes appearance and behavior based on this
choice.

Additionally, a new option is present for all parameters
of using a "precalculated expression". This expression is
evaluated once before the child algorithm is executed
and used during the execution of that algorithm.
2018-09-04 19:06:07 +10:00
Nyall Dawson
644ef6a752 [processing] Initial work on porting base GUI classes to c++
- Add abstract base class for Processing widget wrappers to c++
- Add wrapper factory interface to c++
- Make QgsProcessingGuiRegistry also register widget wrapper
factories, and be responsible for creation of new c++
processing widget wrapper instances
- Start on private c++ implementation of boolean widget wrapper,
including unit tests
2018-09-04 19:06:07 +10:00
Nyall Dawson
f57c548ec3 Fix documentation test failures 2018-07-16 11:38:13 +10:00
Nyall Dawson
7f9b0f8b01 Fix version added string 2018-07-16 11:38:13 +10:00
Nyall Dawson
68aae3a0e6 Replace processing modeler toolbox with common widget/model 2018-07-16 11:38:13 +10:00
Nyall Dawson
45d856e903 Dox 2018-07-16 11:38:13 +10:00
Nyall Dawson
8caecbb85c Fix some dox 2018-07-16 11:38:13 +10:00
Nyall Dawson
101c98fd17 Move toolbox tree view to c++ class 2018-07-16 11:38:13 +10:00
Nyall Dawson
810cb9c0f7 Start replacing python model 2018-07-16 11:38:13 +10:00
Nyall Dawson
e304539dd8 Fix sorting of recently used algorithms 2018-07-16 11:38:13 +10:00
Nyall Dawson
ba410624db Faster model 2018-07-16 11:38:13 +10:00
Nyall Dawson
670f408807 Work on recent item - todo sort by use, test filter, update on change 2018-07-16 11:38:13 +10:00
Nyall Dawson
3e9648fcda Safer node handling, allow specification of recent algorithm log 2018-07-16 11:38:13 +10:00