3176 Commits

Author SHA1 Message Date
Nyall Dawson
a08137f101 Add unit tests for map renderer label caching 2017-02-07 11:24:30 +10:00
Nyall Dawson
c1b5da4726 Clear cached map renders if dependent layer is removed 2017-02-06 11:35:46 +10:00
Nyall Dawson
aa392dc23a Add method to retrieve dependent layers for map renderer cached images 2017-02-06 11:27:42 +10:00
Nyall Dawson
4f7d9cddfe Merge pull request #4064 from jgrocha/delete-style-from-db-provider-postgis
Delete style from db provider postgis
2017-02-06 08:34:24 +10:00
Jorge Gustavo Rocha
8b36ad5b90 Updated Qt connections to the new style qgis/QGIS-Enhancement-Proposals#77
Changed isDeleteStyleFromDBSupported to isDeleteStyleFromDbSupported
2017-02-05 19:35:47 +00:00
Nyall Dawson
c5546b0357 Allow conversion of QgsPropertyTransfomers to expressions (when possible) 2017-02-05 20:19:12 +10:00
Nyall Dawson
a0cb64520a Merge pull request #4095 from nyalldawson/label_engine_layers
Use weak layer pointers in labeling engine
2017-02-04 15:03:20 +10:00
Nyall Dawson
11150dde3e Add additional curvepolygon with compound curve to reference geometry tests 2017-02-04 14:57:29 +10:00
Nyall Dawson
7619cba438 Fix/avoid Coverity null pointer dereference warnings 2017-02-03 09:28:02 +10:00
Nyall Dawson
f84508a35d Fix Coverity uninitialized member warnings 2017-02-03 07:11:12 +10:00
Alexander Bruy
95091d9342 Merge pull request #4062 from alexbruy/raster-provider
Use native QGIS raster API instead of GDAL API in zonal statistics
2017-02-02 10:54:03 +02:00
Nyall Dawson
615745fc8b Use weak layer pointers in labeling engine instead of layer ids 2017-02-01 21:44:31 +10:00
Nyall Dawson
6c928ef085 Add typedefs for QPointer QgsMapLayers 2017-02-01 20:57:56 +10:00
Denis Rouzaud
b340f04e7e Remove web view widget in favor of attachment (external resource) (#4074)
* remove photo widget config
* remove webview widget
* Remove mention of duplicate widgets
* Update api break
* migrate web view widgets to attachments
2017-02-01 07:18:13 +01:00
Nyall Dawson
c84ea71bb8 Use list of map layers instead of map layer ids 2017-02-01 14:46:33 +10:00
Nyall Dawson
0aa085d41f Add quick hasCacheImage method to QgsMapRendererCache 2017-02-01 14:42:31 +10:00
Nyall Dawson
d0e6e17816 QgsMapRendererCache can have multiple dependent layers for a cache image
In some cases the render result for a layer may depend on more than
one layer.

This changes QgsMapRendererCache to use "cache keys" instead of layer ids
to identify images within the cache. When setting an image inside the
cache, a new list parameter is used to specify all layers on which
that image depends.
2017-02-01 14:42:31 +10:00
Nyall Dawson
de10f66791 Add unit tests for QgsMapRendererCache
Also flip to new style connects
2017-02-01 14:42:31 +10:00
Nyall Dawson
1e5a93b0f9 Add method to determine layers participating in a label engine 2017-02-01 12:09:08 +10:00
Jorge Gustavo Rocha
738fbd455b revert the SIP deleteStyleFromDatabase signature 2017-01-31 12:09:48 +00:00
Jorge Gustavo Rocha
e649280601 improve deleteStyleFromDatabase signature 2017-01-31 11:31:14 +00:00
Jorge Gustavo Rocha
8e989c1e38 improve deleteStyleFromDatabase signature 2017-01-31 10:46:49 +00:00
Nyall Dawson
aaa8c4e492 [FEATURE] Expose GEOS Voronoi and delaunay triangulation to QgsGeometry 2017-01-31 19:35:32 +10:00
Martin Dobias
f79fc2509b Add unit tests for joins - removal of joined layer, resolve refs 2017-01-31 09:33:02 +08:00
Martin Dobias
7683cfacd3 Rework vector joins so they do not use QgsProject::instance()
The basic idea is to split reading of XML definition and resolution of layer IDs into layers.

Also includes some cleanups in QgsProject and improvements in QgsVectorLayerJoinInfo.
2017-01-31 09:33:02 +08:00
Nyall Dawson
4cebb46445 [FEATURE] Expose GEOS polygonize operation via QgsGeometry 2017-01-31 10:47:00 +10:00
Jorge Gustavo Rocha
6d6f288102 make deleteStyleFromDatabase consistent with other vectorlayer's methods 2017-01-30 23:48:20 +00:00
Nyall Dawson
af0d68b882 Implement QgsGeometry::isEmpty()
Faster than QgsGeometry::isGeosEmpty() because it avoids the
conversion to GEOS geometries and just uses the QgsAbstractGeometry
subclasses directly.

Also implements faster isEmpty() overrides for specific
QgsAbstractGeometry subclasses.
2017-01-31 07:15:51 +10:00
Jorge Gustavo Rocha
a4637a6af5 Simple tests for style load, insert and remove from Postgis provider 2017-01-30 18:05:13 +00:00
Nyall Dawson
49aae6e908 Rename QgsGeometry::isEmpty to isNull
Differentiates missing geometries from empty geometries (eg
empty geometry collections)
2017-01-30 21:58:23 +10:00
Nyall Dawson
61d3147261 Merge pull request #4073 from nyalldawson/annotations
Refactor annotations, add new annotation features + some other exciting stuff
2017-01-30 21:21:01 +10:00
Nyall Dawson
1f7758a9f9 Fix failing tests 2017-01-30 20:01:09 +10:00
Nyall Dawson
10c40dcaab Fix rendering offset lines as part of fill symbol (outside of
vector layers) results in broken offset outline
2017-01-30 19:58:08 +10:00
Nyall Dawson
6bffa17cc2 Fix failing tests 2017-01-30 19:13:07 +10:00
Blottiere Paul
5c8360dba2 [server] WIP clean project parsing by using QgsProject 2017-01-30 08:21:05 +01:00
Nyall Dawson
fac7887a9c [FEATURE] Annotations can be styled using fill symbol styles (fix #10552)
This changes the rendering of annotation frames to use QGIS' symbology
engine, which means that all the existing fill styles can now be
used to style annotation frames.

Also paint effects & data defined symbol parameters. Whee!
2017-01-30 12:17:44 +10:00
Nyall Dawson
a94ca701ac [FEATURE] Control over annotation contents margins (refs #10555)
Allows setting left/top/right/bottom margins for the contents
within an annotation.
2017-01-30 11:31:52 +10:00
Nyall Dawson
a7be9968b8 New class QgsMargins for storing margins (left/right/top/bottom)
Basically a direct port of QMarginF, but forced to always use
double values, and with added toString()/fromString() methods.
2017-01-30 10:50:48 +10:00
Nyall Dawson
c22f5de690 Port annotation feature handling to QgsAnnotation
Not an ideal implementation (too much logic resides in the
gui QgsMapCanvasAnnotationItem class), but any approach
using current api will be dependant on some hacks.

Ideally we need a QgsVectorDataProvider method for finding
the closest feature(s) to a point(/line/polygon) within a
certain tolerance, with provider specific implementations
which offload this to the data store's spatial indices.
Then this handling could be bumped up to reside in
QgsAnnotation.
2017-01-30 08:39:47 +10:00
Nyall Dawson
aa14926ca8 Move map layer association for annotations to QgsAnnotation
Previously only some annotations had (incomplete) support for
attaching to a particular vector layer and synchronising their
visibility with the layer's visibility.

This handling has all been moved up to QgsAnnotation, so that
all annotation types can be attached to layers.

This will allow selective annotation visibility based on the
visible layers of a particular canvas, eg in multi-canvas
environments.

Additionally:
- show the attached layer in the annotation properties
dialog, and allow it to be cleared to always show the
annotation
- allow attaching annotations to non-vector layers
- add unit tests for visibility
2017-01-30 08:36:20 +10:00
Nyall Dawson
c853f4fe89 Refactor annotations
Splits the rendering component of annotations out from map
canvas item component.

A new core abstract base class QgsAnnotation handles the
management of the common properties associated with an
annotation, and handles rendering the annotation onto a
QgsRenderContext destination.

Existing annotation classes have been ported to this, and
with the exception of the form annotation moved into core.
Form annotations are dependant on editor widgets and must
remain in GUI.

A new QgsMapCanvasAnnotationItem item class implements
a QgsMapCanvasItem which draws an annotation inside the
canvas, and handles synchronising the position and size
of the canvas item with the QgsAnnotation position/size.

This allows annotations to be safely used in a multi-canvas
environment, with a single QgsAnnotation being displayed
in multiple canvases (even if the canvases have different
extent/crs/etc).

Additionally it allows annotations to be directly rendered
to a map (eg in composer) without going through the
gui based Qt graphics scene framework.

Also removes lots of duplicate code, and adds some basic
unit tests for annotations.
2017-01-30 08:36:19 +10:00
Martin Dobias
8ba609e516 Tidy up layer definitions code + removal of QgsProject::instance()
Moved code related to layer definitions away from QgsMapLayer
2017-01-29 23:22:37 +08:00
Nyall Dawson
c96a32aadf Update indentation 2017-01-29 17:01:51 +10:00
lbartoletti
548461ac3c [FEATURE] QgsPointV2 add project with 3D support
Allows projection of a point with inclination to return a 3d point.

Expression "project" function has been extended to support a new inclination parameter.
2017-01-29 08:29:25 +10:00
Alexander Bruy
278913b7ce use QgsRasterBlock instead of GDAL in zonal statistics (addresses #8736)
This should make zonal statistics usable rasters which come from
other providers, e.g. WCS.
2017-01-28 11:12:12 +02:00
Alexander Bruy
9378d20fe0 fix generation of unique field names 2017-01-27 15:19:56 +02:00
Alexander Bruy
bf526ad023 remove obsolete test 2017-01-27 15:19:48 +02:00
Alexander Bruy
8e3042286d extend zonal statistics tests 2017-01-27 15:19:47 +02:00
Martin Dobias
0341478864 Remove code for reading of legacy (QGIS < 1.0) renderers
Also removes a bunch of unused old QMLs and upgrades one still in use
2017-01-27 16:02:48 +08:00
Nyall Dawson
bfdd9dc0b0 Fix some coverity null pointer dereference issues 2017-01-27 16:54:03 +10:00