3839 Commits

Author SHA1 Message Date
nirvn
4131714907 [feature][api] Add a map settings / render context flag to skip symbol rendering 2021-12-28 20:04:49 +07:00
nirvn
4dbcd389fc [feature][api] Allow a custom label sink to be used with map renderer jobs 2021-12-28 20:04:49 +07:00
Marco Hugentobler
7fbabb6744 Re-add accidentally removed white-space 2021-12-23 13:25:57 +10:00
Marco Hugentobler
be6d9b5f61 Add bracket (in case %2 is an arithmetic expression) and add unit test 2021-12-23 13:25:57 +10:00
Nyall Dawson
6783347896 Implement framework for history providers
As per https://github.com/qgis/QGIS-Enhancement-Proposals/issues/130
2021-12-21 15:32:57 +10:00
Nyall Dawson
5fd9b209ac [feature] Allow input parameter values for qgis_process to be
specified as a JSON object passed via stdin to qgis_process

This provides a mechanism to support complex input parameters
for algorithms, and a way for qgis_process to gain support
for parameter types which are themselves specified as a dictionary
type object.

To indicate that parameters will be specified via stdin then
the qgis_process command must follow the format

    qgis_process run algid -

(with a trailing - in place of the usual arguments list).

The JSON object must contain an "inputs" key, which is a map
of the input parameter values.

E.g.

    echo "{"inputs": {\"INPUT\": \"my_shape.shp\", DISTANCE: 5}}" | qgis_process run native:buffer -

Specifying input parameters via stdin implies automatically
the --json output format for results.

One big motivation behind this enhancement is to provide a way for
the qgisprocess R libraries to support parameter types such as
aggregates.

Refs https://github.com/paleolimbot/qgisprocess/issues/56
Refs https://github.com/paleolimbot/qgisprocess/issues/44

Sponsored by the Research Institute for Nature and Forest, Flemish Govt
2021-12-20 11:33:50 +10:00
Nyall Dawson
e0dfc46916 Fix typos 2021-12-17 08:29:31 +10:00
Nyall Dawson
53d08d73e6 Add method to convert parameters for a processing algorithm to a JSON
serializable map
2021-12-17 08:29:31 +10:00
Nyall Dawson
84cf46a629 Add method to copy QgsProcessingContext settings as a json map 2021-12-17 08:29:31 +10:00
Nyall Dawson
fe471eacce Add method to QgsProcessingAlgorithm to create equivalent qgis_process command 2021-12-17 08:29:31 +10:00
Nyall Dawson
6315133c8b Add method to convert parameter value to a list of strings 2021-12-17 08:29:31 +10:00
Nyall Dawson
4e71e45ae2 Add method to convert QgsProcessingContext settings to equivalent
qgis_process arguments
2021-12-17 08:29:31 +10:00
Nyall Dawson
ee3257b8e9 Add api to convert a processing parameter value to a string, if possible
Designed for use in converting an algorithm's parameters for
representation as a qgis_process command line
2021-12-17 08:29:31 +10:00
Nyall Dawson
e73d51d660 Add api to convert a processing parameter value to a value which
is compatible with storage in a JSON object
2021-12-17 08:29:31 +10:00
Julien Cabieces
93399e33a3
Merge pull request #46037 from Koyaani/doc_generation
[Doc] Add folders for documentation generation
2021-12-16 15:09:01 +01:00
Matthias Kuhn
9500bfba6d
Merge pull request #46504 from kadas-albireo/master
Automatically remove attached files used as layer sources when layer is deleted
2021-12-16 06:24:04 +01:00
Alessandro Pasotti
25337c25b2
Merge pull request #46471 from nyalldawson/fix_44871
Fix setting manual table content through PyQGIS
2021-12-15 21:52:38 +01:00
Sandro Mani
792ce7f962 Automatically removed attached layer sources when layer is deleted 2021-12-15 13:20:14 +01:00
Matthias Kuhn
fab5d8a84e
Merge pull request #46493 from suricactus/fix_misleading_docs
Fix misleading docs that is only valid if edit buffer is used (so does not work in transaction mode)
2021-12-15 11:49:02 +01:00
Ivan Ivanov
527359bc7c Fix misleading docs that is only valid if edit buffer is used (so does not work in transaction mode)
Long story short, the `layer.committedFeaturesAdded` signal is not fired after `layer.commitChanges()` when in transaction mode.

If the layer is using the `QgsVectorLayerEditBuffer` the `commitedFeaturesAdded` signal is fired.
But if transaction is used and the `layer.editBuffer()` returns `QgsVectorLayerEditPasstrough`, then there is no signal.

The `QgsVectorLayerEditPasstrough` class is quite empty and lacking implementation of these events, so they don't work on layers in a transaction group.
2021-12-14 22:19:34 +02:00
Nyall Dawson
e26a367741 Fix setting manual table content through PyQGIS
Fixes #44871
2021-12-14 10:48:16 +10:00
Alessandro Pasotti
630f3f69f6 Return a NULL variant in case of multi/not allow NULL
Because an invalid variant would have not been set
in the feature form.
2021-12-13 13:55:11 +01:00
Antoine
96ff88f180 add missing brief not detected before 2021-12-13 13:27:00 +01:00
Antoine
ce12b3c2df modify comments for documentation generation 2021-12-13 12:39:44 +01:00
Alessandro Pasotti
d93bab9dac Use widget value when validating attrs in form
Also, make sure that non enforced constraints
do not block commits and do not report as violated
constraints (Fix #46364).

Followup #46439 because the constraints were
not checked agains the widget value but against
the attribute value.
2021-12-13 10:48:37 +01:00
Antoine
0a28c5a763 fix doc warnings 2021-12-13 10:19:56 +01:00
Antoine
49e6365543 fix copydoc on non-existent class 2021-12-13 10:19:55 +01:00
Nyall Dawson
fa123251a4 Add method which promotes all non-point WKB types to multitype
equivalent

Specifically, this method should be used to determine the
most-permissive possible resultant WKB type which can result
from subtracting parts of a geometry. A single-point geometry
type can never become a multi-point geometry type as
a result of a subtraction, but a single-line or single-polygon
geometry CAN become a multipart geometry as a result of subtracting
portions of the geometry.
2021-12-10 09:32:48 +10:00
Matthias Kuhn
28fac71bb4
Merge pull request #46419 from Joonalai/improve-format-datetimes 2021-12-09 13:41:20 +01:00
Joonalai
8ba472b1e7 Format date and datetime fields based on locale (#45617) 2021-12-09 13:17:14 +02:00
Joonalai
74ae3ded1c Emit localeChanged signal when locale is changed (#45617) 2021-12-09 09:00:49 +02:00
Alessandro Pasotti
c2a91c9824 Rename form action 2021-12-08 06:44:44 +10:00
Alessandro Pasotti
0adeeab2ac Use separate action form multipart 2021-12-08 06:44:44 +10:00
Alessandro Pasotti
835da71cec Form submit action and url encode 2021-12-08 06:44:44 +10:00
Nyall Dawson
b97c3991cf Add QgsFeature::attributeMap() method to return feature's attributes
as a field name -> value dictionary
2021-12-03 10:43:15 +10:00
Nyall Dawson
cddc522275 Deprecate older methods 2021-12-02 11:16:53 +10:00
Nyall Dawson
33a7bc7c18 Expose newer methods to Python 2021-12-02 11:16:53 +10:00
bdm-oslandia
61519ec834 remove dead code, fix comment, fixes from review
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-12-02 11:16:53 +10:00
bdm-oslandia
c1582ce1c3 fix: indent, doc, typo 2021-12-02 11:16:53 +10:00
bdm-oslandia
345dd4dd87 fix: replace referer http header by dedicated class QgsHttpHeader 2021-12-02 11:16:53 +10:00
Nyall Dawson
edab6ff4fd [feature] Allow full text rendering capabilities in layout text labels
Allows for shadows, text buffers, etc in these labels
2021-12-02 07:17:13 +10:00
Nyall Dawson
d4d3652ea8 Add docs 2021-12-01 09:53:38 +10:00
Nyall Dawson
2ce70c5975 Default to "external" for QgsApplication::platformName(), and only
use "desktop" when actually run from the desktop. Also add
"qgis_process" platform.
2021-12-01 09:09:34 +10:00
Joonalai
8a22883315 Revert date and datetime field formatting (#45617) 2021-11-29 15:18:25 +02:00
Alessandro Pasotti
f78ae1e384 Doxy 2021-11-29 14:10:49 +10:00
Alessandro Pasotti
7e2eaec68f Add processedCount to report the number of processed objects 2021-11-29 14:10:49 +10:00
Alessandro Pasotti
9791626734 Threaded implementation 2021-11-29 14:10:49 +10:00
Nyall Dawson
fadfb477d9 [api] Move text wrapping handling logic from layout table code to QgsTextRenderer
Allows other users of QgsTextRenderer to take advantage of the
automatic line wrapping behaviour
2021-11-29 13:03:13 +10:00
Nyall Dawson
dcf0cfe5a3 Fix API issues causing malformed python stub files
Fixes #46240
2021-11-29 11:54:06 +10:00
Etienne Trimaille
3bef0113ca Switch to click_x/click_y instead of clicked_* which is used in QgsMapToolFeatureAction 2021-11-27 11:48:09 +10:00