17456 Commits

Author SHA1 Message Date
Nyall Dawson
1af8b8178b Add some helpful scoped RAII classes for use with QgsRenderContext
QgsScopedRenderContextPainterSwap: allows for temporarily swapping
the destination painter object for a QgsRenderContext for the lifetime
of the object

QgsScopedRenderContextScaleToMm: temporarily rescales a render context
destination painter device to use millimeter based units for the lifetime
of the object

QgsScopedRenderContextScaleToPixels: temporarily rescales a render
context (which has been scaled to millimeter based units) back
to pixel based units, for the lifetime of the object
2020-04-24 04:07:33 +10:00
olivierdalang
2d6b939225
Fix QgsAbstractGeometry->segmentize() not returning correct WkbType for multi-geometries 2020-04-24 04:03:55 +10:00
Nyall Dawson
5b6589f6dc Cleanup QgsCoordinateReferenceSystem WKT enum
- alias WKT_2018* to new WKT_2019* values, since the spec is actually
2019, not 2018
- add WKT_PREFERRED value which currently aliases to WKT2_2019, but
can be changed if/when future bumps to the WKT spec happen
- add WKT_PREFERRED_GDAL which should be used whenever a CRS is
exported to WKT for use with GDAL API. Aliases to WKT2_2019 currently,
but can be changed if/when a new spec is released and GDAL supports it
2020-04-24 03:59:28 +10:00
Matthias Kuhn
5d45b71421
Merge pull request #33950 from DelazJ/renameMapTheme
[feature] Allow renaming of the current map theme
2020-04-23 16:55:17 +02:00
Alessandro Pasotti
860fb23e36 Server little cleanup (class documentation)
Plus removed sql injection protection from
sanitize because:

1. it was not required: the value goes into a QgsExpression and it's
never sent to a provider directly
2. it could have been misused with the wrong assumption that
it was robust implementation (it wasn't)
2020-04-23 12:17:09 +02:00
Etienne Trimaille
4e7018db79
update english after PR review in the project validator 2020-04-22 11:22:45 +02:00
Etienne Trimaille
471979aa50
move the QGIS Server validator from the project properties to its own class 2020-04-22 09:33:08 +02:00
Alexander Bruy
f5691e175e
Merge pull request #35869 from alexbruy/python-deprecated
fix deprecation warning in qgis.utils (fix #32786)
2020-04-22 08:43:47 +03:00
Nyall Dawson
ec2894ea32 Show favorited legend patches in legend patch button menu 2020-04-22 12:43:01 +10:00
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
Alexander Bruy
b524929d20 remove condition 2020-04-21 14:47:56 +03:00
Alexander Bruy
0e59d13af5 fix deprecation warning in qgis.utils caused by deprecating
imp.new_module() call in Python 3.4 (fix #32786)
2020-04-21 14:47:56 +03: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
5f834d66df Spelling 2020-04-21 10:40:50 +10: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
Alexander Bruy
88a9bea48a add missed comma 2020-04-20 09:34:26 +03:00
Nyall Dawson
60f40f066a [processing] Fix crashes when running algs in "in place" mode
Fixes #35844
2020-04-20 12:01:46 +10:00
Alexander Bruy
9a6b0f58f5 [dbmanager] syntax highlighting for PostGIS raster fucntions (fix #16010) 2020-04-20 09:28:17 +10:00
uclaros
86ac754617 Added field name autocomplete to the query builder 2020-04-20 09:27:33 +10:00
Håvard Tveite
860645ab42
Offer a per feature, as well as a global minimum distance parameter, for the Random points on lines algorithm (#35793) 2020-04-19 14:21:55 +10:00
Martin Dobias
520246174a Fixes to SIP finally working 2020-04-19 08:14:49 +10:00
Martin Dobias
cad7cf4a06 Add QgsLayoutItem3DMap to PyQGIS [not working yet] 2020-04-19 08:14:49 +10:00
Alessandro Pasotti
8b61e24e96
Merge pull request #35828 from elpaso/server-cleanup
Server (minor) cleanup
2020-04-18 08:51:06 +02:00
Alexander Bruy
e9dd602da6
Merge pull request #35815 from alexbruy/ds-vectortiles
Add vector tiles to Datasource manager dialog and Layers menu
2020-04-17 11:59:39 +03: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
Nyall Dawson
226bc42dd8 [FEATURE][layouts] Support pasting pictures directly into layouts
Embeds the pasted picture into the layout.

Note that Qt image clipboard handling seems a bit... crap. So success
may vary.
2020-04-17 13:48:05 +10:00
olivierdalang
915b67ddb2
[processing modeler] Show arrowheads for parent/child relations 2020-04-17 08:49:46 +10:00
vcloarec
9377ec414c allow temporal layout item map 2020-04-17 04:01:06 +10:00
Alexander Bruy
05370ca842 [feature] Add Vector Tile Layer action in "Layers" menu 2020-04-16 16:06:38 +03:00
Alexander Bruy
b1ed51a71d [feature] vector tile connections import/export 2020-04-16 14:54:24 +03:00
Alexander Bruy
39e397ebd0 [feature] api for adding vector tile layers
This is code-only, not visible to users change and prerequisite for
exposing vector tile layer in the Data Source manager
2020-04-16 13:26:40 +03:00
Alessandro Pasotti
83979c30ef Server: fix wrong comment and log message 2020-04-16 09:34:05 +02: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
05bc716827 Move model child algorithm dependencies selection widget to c++, make inline panel 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
061e8587cd When an error occurs while loading a plugin, tag it as a Critical message
instead of just a Warning message
2020-04-16 16:02:41 +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
Alexander Bruy
2770c4990e
Merge pull request #35790 from alexbruy/connections-fixes
import/export for ArcGIS Map and FeatureServer connections (fix #27485)
2020-04-15 20:20:23 +03: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
Martin Dobias
59c1ac348d Add support for identify tool for vector tile layers
Also:
- enables saving/loading of layer definition files (.qlr) with vector tile layers.
- makes fields of vector tile layers sorted so they are easier to navigate
2020-04-15 13:38:19 +02:00
Alexander Bruy
99a930ca51 [feature] add API to import/export ArcGIS MapServer and FeatureServer
connections. This is API-only change not visible for users.
2020-04-15 12:54:58 +03:00
Alessandro Pasotti
83e42f5bac Apply PR comments 2020-04-15 10:48:16 +02:00