6801 Commits

Author SHA1 Message Date
Nyall Dawson
1c6ab3569b Sipify 2020-04-14 09:22:47 +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
Alessandro Pasotti
3d43a91c09 Code layout 2020-04-13 08:31:57 +02:00
Alessandro Pasotti
ed55b410d3 Alias expressions: use the DD override widget 2020-04-13 08:30:53 +02:00
Alessandro Pasotti
1219d61b2b Label expressions: address PR comments 2020-04-13 08:30:53 +02:00
Alessandro Pasotti
7334ad0547 Forms: expression controlled aliases (labels) 2020-04-13 08:30:52 +02:00
Nyall Dawson
da4a195a94 Don't prompt to cancel the news feed task on shutdown
If it hasn't completed, just cancel it immediately without prompting
users -- it's not essential that it completes
2020-04-12 15:57:47 +10:00
Nyall Dawson
c0f0a49f9c Add an optional flag to QgsTask to indicate that the task can be canceled
without any user facing prompts

Useful for non-essential tasks
2020-04-12 15:57:47 +10:00
Nyall Dawson
c4049c6439 Save and restore patch shapes for symbol nodes 2020-04-11 05:25:22 +10:00
Nyall Dawson
b920e358c7 Add methods to serialize QgsLegendPatchShape 2020-04-11 05:25:22 +10:00
Nyall Dawson
07b64a3f2d Add support for setting legend patch shapes for nodes in the layer tree 2020-04-11 05:25:22 +10:00
Nyall Dawson
40638fe62b Add support for rendering using QgsLegendPatchShape to QgsSymbol::drawPreviewIcon 2020-04-11 05:25:22 +10:00
Nyall Dawson
e1b23139ac Add API to convert legend patch shapes to QPolygonF based paths for rendering 2020-04-11 05:25:22 +10:00
Nyall Dawson
8564c453ec Add methods to get default patch shapes to QgsLegendPatchShape 2020-04-11 05:25:22 +10:00
Nyall Dawson
fd95215355 Allow for null QgsLegendPatchShapes 2020-04-11 05:25:22 +10:00
Nyall Dawson
1b5f4dd771 New class QgsLegendPatchShape
Represents a patch shape for use in map legends.
2020-04-11 05:25:22 +10:00
Nyall Dawson
a08af65b42 More boring duplicate code cleanup 2020-04-11 05:24:54 +10:00
Nyall Dawson
0e8be09fd0 Remove a bunch of duplicate code and simplify interface for QgsStyle/QgsStyleModel 2020-04-11 05:24:54 +10:00
Mathieu Pellerin
c0a29051b4 [FEATURE][digitizing] Add avoid intersection/overlap mode
This commit adds a new avoid intersection mode setting when
digitizing new features. The three available modes are:
- allow intersections/overlaps
- avoid intersections/overlaps on active layer
- avoid intersectonss/overlaps on layers list

The third mode is what QGIS has had for a while, except
its UI/UX is a bit messy. The layers list is setup by
the user via the advanced snapping configuration widgets,
but isn't connected at all with whether snapping is
enabled / disabled.

This new approach makes it explicit to user whether
newly-added features might be clipped or not, and
if so by which layer(s).

Finally, the new 'avoid intersections/overlaps on
active layer' is likely a far more useful behavior
than having a list of layers (for e.g., you might
be digitizing on a layer that can't have overlap
with itself but is fine to overlap with another
layer, the latter also in need of avoid overlap
_with itself_).
2020-04-10 13:42:07 +07:00
Matthias Kuhn
e3211a0434
Merge pull request #35514 from stev-0/#29225
Fix sip __hash__ for QgsActionScope
2020-04-08 10:57:59 +02:00
Denis Rouzaud
6ba8cccdb9
Merge pull request #35110 from obrix/snapping_zoomlvl_optim
Snapping enabled on a configurable scale range
2020-04-07 13:31:15 +02:00
Martin Dobias
f713cc3559 Vector tiles: styling panel integration + widget for basic renderer 2020-04-07 13:25:49 +02:00
obrix
b5fa0fab5f Remove prefix on parameters name. Remove whitespace. 2020-04-07 09:27:08 +02:00
obrix
f2a1712971 Fix spelling. 2020-04-07 09:27:08 +02:00
obrix
8b88115633 Fix some documentation issues. Use minimum and maximum instead of min and max. Add default value for min and max in IndividualLayerSettings as the two new parameters break compatibility. 2020-04-07 09:27:08 +02:00
obrix
080d0fa112 Remove useless comments in sip. 2020-04-07 09:27:08 +02:00
obrix
c7f7c9829d Regenerate qgssnappingconfig.py 2020-04-07 09:27:08 +02:00
obrix
563e396015 Some style adjustments 2020-04-07 09:27:08 +02:00
obrix
03c522a957 Use a tri state button to configure snapping limit : disable, global and per layer. 2020-04-07 09:27:08 +02:00
obrix
f56e0f51c1 Various small reworks :
* better documentation
* translation on non translated string
* Grey out column min and max of individual layer snapping settings when snapping limit on scale is disabled.
  Force the refresh when rowChanged is called even if the individual settings are the same to enable/disable immediately the columns when the snapping limit on scale button is pushed.
2020-04-07 09:27:08 +02:00
obrix
30a52ac55e Fix PyQgsLayerDependencies test and add some doc. 2020-04-07 09:27:08 +02:00
obrix
6b9fb087c2 Fix style. 2020-04-07 09:27:08 +02:00
obrix
2346718ac7 Enable snapping whatever the scale when limit to scale is off. Also fix style. 2020-04-07 09:27:08 +02:00
obrix
7b4be2b7fa Remove boolean limitToScaleRange, default value is -1.0. Negative values disable the limits. 2020-04-07 09:27:08 +02:00
obrix
8ec744ad11 Add 3 new parameters per layers to the advance snapping settings :
- LimitToScaleRange : Allows to enable snapping only when current scale on the canvas is in a specified range. This range is controled by the two parameters scale min and scale max.
- MinScale : Minimum scale in which the snapping is enabled
- MaxScale : Maximum scale in which the snapping is enabled

When LimitToScaleRange is set to true, snapping is disabled if the current scale out of [MinScale, MaxScale].
When LimitToScaleRange is set to false, the behavior remain unchanged and snapping is enabled whatever the scale.

This allows to limit the costly cache refresh for some heavy layers when panning said layer at a level where the snapping is not useful.
2020-04-07 09:27:08 +02:00
Nyall Dawson
8050612363 Add a __repr__ method for QgsProperty 2020-04-07 17:05:44 +10:00
Nyall Dawson
bb9b25f28b Add API to flag that a sink supports appending features to existing layers 2020-04-07 17:05:44 +10:00
Nyall Dawson
b2ca789ba4 Implement sinkProperties for QgsProcessingFeatureBasedAlgorithm subclasses 2020-04-07 17:05:44 +10:00
Nyall Dawson
2d8da255a2 [processing] Add API to determine in advance the properties of vector
outputs (sinks and vector layers), such as output fields, wkbtypes and
crs.
2020-04-07 17:05:44 +10:00
Nyall Dawson
bf6f017466 [processing] Hookup backend API to allow sinks to append to an existing layer
(respecting the sink mapping definition)
2020-04-07 17:05:44 +10:00
Nyall Dawson
0d7773a0ee [processing] Allow setting the optional remapping definition for QgsProcessingOutputLayerDefinition
Provides a (currently non-functional) API for specifying optional remapping parameters
for vector outputs.
2020-04-07 17:05:44 +10:00
Nyall Dawson
8c73c6165e Allow storage of QgsRemappingSinkDefinition in variants 2020-04-07 17:05:44 +10:00
Nyall Dawson
93f714d233 [FEATURE][API] Add new QgsFeatureSink subclass QgsRemappingProxyFeatureSink
This sink allows for transformation of incoming features to match the
requirements of storing in an existing destination layer, e.g. by reprojecting
the features to the destination's CRS, by coercing geometries to the
format required by the destination sink, and by mapping field values from
the source to the destination.
2020-04-07 17:05:44 +10:00
Nyall Dawson
78c86ef6ca Move geometry handling guts of QgsVectorLayerUtils::makeFeaturesCompatible
to a new method in QgsGeometry
2020-04-07 17:05:44 +10:00
Nyall Dawson
c987e500bc Code shuffle to move QgsProxyFeatureSink to its own file 2020-04-07 17:05:44 +10:00
Stephen Knox
1730815dca Fix sip __hash__ for qgsactionscope
to allow use in actionScopeRegistry. Fixes #29225
2020-04-06 21:24:47 +01:00
Alessandro Pasotti
198b797586 PG raster temporal: cleanup after rebase conflicts 2020-04-06 10:51:08 +02:00
Alessandro Pasotti
1231aa03db Added fields accessor to raster data provider 2020-04-06 10:51:08 +02:00
Alessandro Pasotti
59b0dc13ac Add dataComment to data provider base class 2020-04-06 10:51:08 +02:00
Alessandro Pasotti
7e7cb41b80 Const correct provider temporal capabilities 2020-04-06 10:50:04 +02:00