174 Commits

Author SHA1 Message Date
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
Nyall Dawson
60f40f066a [processing] Fix crashes when running algs in "in place" mode
Fixes #35844
2020-04-20 12:01:46 +10:00
Nyall Dawson
d69519a91e Move parameter retrieval logic from dialog to ParametersPanel
This is cleaner, because the panel owns all the wrappers required
to evaluate the parameter values
2020-04-04 17:58:55 +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
a7610c5682 Give up on enum class
Python says no.
2020-04-02 19:20:40 +10:00
Nyall Dawson
579ef1c5c1 Fix use of enum flags in older python/sip versions 2020-04-02 19:20:40 +10:00
Nyall Dawson
c98cd8d1a8 Partial port of destination wrappers to c++ API 2020-04-02 02:29:54 +10:00
Nyall Dawson
3dfc931fad Hide internal results from log 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
Nyall Dawson
6e2c21eb55 [processing] Cleanup handling of "iterate over source" buttons, move
creation completely to widget wrapper
2020-03-25 09:42:17 +10:00
Matthias Kuhn
01c7cb1814
Merge pull request #34928 from gacarrillor/adjust_run_button_status_in_alg_dialog
[processing][needs-docs] Adjust status of controls executing an algorithm dialog
2020-03-18 14:42:52 +01:00
Nyall Dawson
517aa9667b [processing] Port DestinationSelectionPanel to c++
This is basically a 1:1 port (+some fixes relating to incorrect signal
emissions and many more tests)
2020-03-17 07:24:40 +10:00
gacarrillor
0153dc805e [processing] Disable runAsBatch/runAsSingle buttons during algorithm execution 2020-03-07 17:16:03 -05:00
gacarrillor
237f1f7e2d [processing][needs-docs] Adjust status of controls in algorithm dialog
+ Run button is not shown anymore in the Log tab, therefore, you can only run algorithms from the Parameters tab.
  + While running an algorithm, the Parameters tab is now blocked.
  + When an algorithm execution finishes (either successfully or not), a new button Change Parameters is shown in the Log tab.
  + The Batch Algorithm Dialog is now consistent with the described behavior (before, it blocked the Parameters panel, but not the tab; and it was the only dialog blocking parameters widgets).

These changes were applied to the Algorithm Dialog and Batch Algorithm Dialog, and work on Edit in place dialogs as well.
2020-03-07 14:23:51 -05:00
Nyall Dawson
bc3077e52e [processing] When running an algorithm in place mode, don't auto close
the dialog after changing features

Otherwise it can be a real pain to iteratively change/undo/tweak parameter
value
2020-03-06 18:24:01 +10:00
Nyall Dawson
61454c67cd [processing] Add api to allow providers to report warnings which should
be shown to users when using that provider

This can be used to return a translated warning message which should be
shown to users of this provider. It's intended for use in cases such as
a provider which relies on a 3rd-party backend, where the version of the
backend software is not officially supported, or for alerting users to
providers in a "beta" or "untrustworthy" state.
2019-12-06 17:35:41 +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
Nyall Dawson
933559b655 [processing] Report provider version string alongside QGIS version in log
Helpful for debugging and reproducability of results
2019-04-08 16:59:15 +10:00
Nyall Dawson
7674e1657b [processing] Include version information at start of log
Start the log text with QGIS/Qt/GEOS/GDAL version information strings.
This is helpful for debugging and accountability.
2019-04-02 06:16:45 +10:00
Rashad Kanavath
46da10a1e8 Revert "fixes #21374: ignore optional output parameters"
This reverts commit af2421541c78742a233b3c5a00cbbd6c11ceaaab.
2019-03-21 04:44:59 +10:00
Rashad Kanavath
f6ad4745bd fixes #21374: ignore optional output parameters 2019-03-21 04:44:59 +10:00
Víctor Olaya
13bff9620c [processing] do not allow using unsupported file formats
Show warning message if user selects incompatible output file format

fixes #21089
2019-02-23 05:24:56 +10:00
Nyall Dawson
7acfefadad Fix infinite progress when an algorithm could not be created 2019-02-20 13:05:13 +10:00
Nyall Dawson
29fa7b6e7b Fix build, indentation 2019-02-13 07:59:30 +10:00
volaya
eb47288fac [processing] correctly set output styles for models
fixes #20573
2019-01-23 08:02:19 +01:00
Nyall Dawson
f10b62c380 [processing] Fix crash on closing batch processing dialog
Refs #20650
2018-11-29 10:57:07 +10:00
Nyall Dawson
2c425c7bf0 Fix unit test 2018-11-23 20:32:16 +11:00
Nyall Dawson
2617fd56f7 Fix context going out of scope 2018-11-23 20:32:16 +11:00
Nyall Dawson
6fff62e668 Fix confusing override of accept method for non-dialog acceptance 2018-11-23 20:32:16 +11:00
Alessandro Pasotti
cdf5bb630f Fix test 2018-10-05 11:03:49 +02:00
Alessandro Pasotti
29c4970f8a [processing] In-place add layer name to dlg title and store active layer 2018-10-05 10:10:20 +02:00
Alessandro Pasotti
0782b9d869 Dynamically change button text for in-place editing
The button title changes if there are selected features
2018-10-05 09:21:28 +02:00
Nyall Dawson
6d1a9295f7 Use correct stylesheet for processing dialogs 2018-09-26 04:26:27 +10:00
Alessandro Pasotti
c7ac4fe7fd Fix widget (broken by rebase) 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
Nyall Dawson
681d44f11f Messy mockup of feature 2018-09-14 18:23:03 +10:00
Nyall Dawson
3c2499ba95 Add some notes on deprecated class handling 2018-09-04 19:06:07 +10:00
Nyall Dawson
8082497724 Fix evaluation of Python wrapper values 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
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
Juergen E. Fischer
1cc1f16501 Fix translation string
(caused "tx ERROR: Error received from server: Qt Linguist variants are
not yet supported." on vanish)
2018-08-22 10:40:23 +02:00
nirvn
94300eab7c Add proxy progress task for non-background algorithms 2018-08-16 06:22:16 +10:00
Nyall Dawson
6c014b46ba [processing] Use c++ recent algorithm log, remove python log
Indirectly fixes #19218
2018-07-05 02:37:03 +10:00
Martin Dobias
80b0c72c50 Fix a Python error in Processing GUI
It turns out that an empty QComboBox evaluates to False:

>>> t=QLineEdit()
>>> bool(t)
True
>>> c=QComboBox()
>>> bool(c)
False

Due to that, the 'TABLE' parameter was missing if its (editable) combo box was empty.

Original error - while updating an algorithm's parameters (gdal:importvectorintopostgisdatabaseavailableconnections)

Traceback (most recent call last):
  File "/home/martin/qgis/git-master/build-debug/output/python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py", line 121, in parametersHaveChanged
    or (not p.checkValueIsAcceptable(parameters[p.name()])):
KeyError: 'TABLE'
2018-06-22 13:30:26 +02:00
Nyall Dawson
870d20740c [processing] Tweaks and checks for checkParameterValues 2018-05-28 16:02:38 +10:00
arnaud.morvan@camptocamp.com
81dabd185c [processing] Finish default values in model for destination parameters 2018-05-14 22:12:32 +10:00
arnaud.morvan@camptocamp.com
4ccd4446fe [processing] Add default values in model for destination parameters 2018-05-14 22:12:32 +10:00
Nyall Dawson
c32611b2c4 [processing] Remove unused code 2018-05-02 04:55:01 +10:00
Nyall Dawson
6358daad91 Fix broken translation string 2018-04-20 20:08:28 +10:00
Nyall Dawson
08d30c3b9f [processing] Add method for algorithms to preprocess parameter values
Allows algorithms to pre-processes a set of parameters, allowing the
algorithm to clean their values.

This method is automatically called after users enter parameters, e.g.
via the algorithm dialog. This method should NOT be called manually
by algorithms.
2018-04-03 18:36:39 +10:00