6729 Commits

Author SHA1 Message Date
Nyall Dawson
8a0e007ba5 [FEATURE] Support legend patch shapes in style manager databases
And clean up a lot of duplicate code which makes adding new types
to QgsStyle painful
2020-04-22 12:43:01 +10:00
Martin Dobias
0973da69b1 Nyall's review suggestions, test fixes, windows build fix 2020-04-21 13:28:56 +02:00
Martin Dobias
da4764472e sip fix 2020-04-21 13:28:56 +02:00
Martin Dobias
41db54aa16 [FEATURE] Vector tiles writer API
Initial work... Currently supporting output to a directory based on XYZ template, using Mapbox vector tiles encoding.

New classes:
- QgsVectorTileMVTEncoder - low-level class that operates on a single tile, converts vector features to raw tile byte array, for internal use
- QgsVectorTileWriter - higher level class that manages generation of multiple tiles, for use by clients
- QgsVectorTileMVTUtils - assorted helper functions for MVT encoding/decoding
2020-04-21 13:28:56 +02:00
Nyall Dawson
ddbcb1f478 [FEATURE][layouts] Allow configuring legend patch shapes by
double-clicking on legend items

Allows users to set custom legend patch shapes for items by
entering a WKT string representing the patch geometry
2020-04-21 10:40:50 +10:00
Nyall Dawson
fe435a325e Add optional shape argument to symbolPreviewPixmap/symbolPreviewImage 2020-04-21 10:40:50 +10:00
Nyall Dawson
ae8e5cfeaa Move default legend patch shape handling to QgsStyle 2020-04-21 10:40:50 +10:00
Nyall Dawson
e5be0de36a Add a more convenient constructor for QgsPolygons 2020-04-21 10:40:50 +10:00
Martin Dobias
0633989524 [browser] React when a custom data item provider is added/removed
Until now, if a plugin adds a custom data item provider that adds
a root item to the browser model, the new root data item would not
get added and a restart of QGIS was necessary.
2020-04-21 08:20:08 +10:00
Nyall Dawson
6a1a2e9af0 [processing] Fix handling of vrt, SAGA tif output file names
Fixes #35755, fixes #35770
2020-04-17 16:18:09 +10:00
vcloarec
9377ec414c allow temporal layout item map 2020-04-17 04:01:06 +10:00
Nyall Dawson
3b3c7d8012 Hookup model logic for correct skipping of branches which shouldn't be run 2020-04-16 16:02:53 +10:00
Nyall Dawson
6a1b10686b [FEATURE][processing] New modeler algorithm for conditional branches in models
This algorithm allows useres to setup multiple conditions (via qgis expressions),
which cause their corresponding branch of the model to be run or skipped
depending on the result of the expression evaluation.

Sponsored by Andreas Neumann
2020-04-16 16:02:53 +10:00
Nyall Dawson
e3955df564 Add method to model API to get available dependencies for a child algorithm 2020-04-16 16:02:53 +10:00
Nyall Dawson
b2167594fe Make handling of processing child algorithm dependencies more flexible
Instead of just using child ID strings, use a new dedicated class to
store dependency information
2020-04-16 16:02:53 +10:00
Nyall Dawson
7fd72f3b4e [FEATURE][processing] Allow reordering model inputs
Instead of forcing a quasi-random ordering of inputs for models,
this commit exposes a new "Reorder Model Inputs" option in the model
designer which allows users control over the exact order of
inputs to show users for their model.

No more illogical ordering like showing a field choice before the
layer choice it's based on!

Sponsored by NaturalGIS
2020-04-16 06:03:48 +10:00
Alessandro Pasotti
869e148f69
Merge pull request #35688 from elpaso/alias-expressions
Forms: expression controlled aliases (labels)
2020-04-15 15:09:15 +02:00
Alessandro Pasotti
83e42f5bac Apply PR comments 2020-04-15 10:48:16 +02:00
Martin Dobias
8c488b4ef0 Added QgsRenderContext arg to referencedFields() + unit tests 2020-04-15 08:33:29 +10:00
Martin Dobias
8ec0dc53fe Few bits from the review 2020-04-15 08:33:29 +10:00
Martin Dobias
7c1d1fe97c Fix tests and reference image 2020-04-15 08:33:29 +10:00
Martin Dobias
f8a6b9fa3a Add support for labeling of vector tile layers 2020-04-15 08:33:29 +10:00
Nyall Dawson
b9a99890b4 Add method to validate a whole model 2020-04-14 20:27:21 +10:00
Nyall Dawson
9f7c7fcb35 Add method to validate a child algorithm in a model
Checks that the algorithm has valid values for all inputs
2020-04-14 20:27:21 +10:00
Mathieu Pellerin
0f66c3efb7 Fix travis, broken due to some failure to convert struct QVariant property 2020-04-14 18:20:18 +10:00
Alessandro Pasotti
f2f7244bd1 Form alias data defined: cleanup and simplify
Moved storage to QgsEditFormConfig
2020-04-14 09:37:51 +02:00
Vincent Cloarec
17a95ef0a5
[MESH][FEATURE] update to MDAL 0.5.91 Multi meshes in one file (#35669)
Allow load of multiple (sub-)meshes from a single file. If file contains multiple meshes (e.g. UGRID file), user needs to select the meshes to load from the dialog.
2020-04-14 08:17:15 +02: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
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