36686 Commits

Author SHA1 Message Date
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
Alexandre Neto
290758a4bc More PNG to SVG replacements (#4065) 2017-01-28 11:17:43 +07:00
Alessandro Pasotti
9a435adeda Fix segfault for unitilialized mAssistantPreviewSymbol 2017-01-27 16:20:05 +01:00
Alexander Bruy
eca795f98e Merge pull request #4069 from alexbruy/zonalstatistics-tests
Zonal statistics tests
2017-01-27 16:13: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
Harrissou Sant-anna
aef2b00b7e QGIS 3 is only qt5 compliant
Remove qt4 mention (for linux based processes)
2017-01-27 10:16:41 +01:00
matteo
f7644b4708 [processing] add test for merge gdal 2017-01-27 10:13:04 +01:00
Nyall Dawson
f4a9797b3d Merge pull request #4067 from nyalldawson/raster_ctor
Remove duplicate QgsRasterLayer constructor
2017-01-27 19:05:14 +10: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
pcav
ac79bc9dbb Because FSM 2017-01-27 08:23:43 +01:00
Nyall Dawson
8d9357a1a8 Fix memory corruption (free address of reference) in server 2017-01-27 17:05:18 +10:00
Nyall Dawson
bfdd9dc0b0 Fix some coverity null pointer dereference issues 2017-01-27 16:54:03 +10:00
Alexander Bruy
66e10e4937 Merge pull request #4066 from PedroVenancio/master
[processing] add GRASS 7.x v.out.ascii algorithm
2017-01-27 08:31:32 +02:00
Nyall Dawson
6c7e2f1b87 Make QgsVectorLayer ctor default to ogr provider 2017-01-27 15:53:35 +10:00
Martin Dobias
c72734285b Fix spelling and API doc 2017-01-27 09:43:29 +08:00
Martin Dobias
b245ccc105 [FEATURE] API call to make geometries valid (port of ST_MakeValid)
This introduces QgsGeometry::makeValid() which will try to make a valid
geometry out of invalid one. This is more complicated method than just
doing a buffer with zero width, but it should not loose any vertices.

Finally we should have a reliable way in QGIS to fix bad geometries!

Ported the C code from lwgeom library to QGIS.
2017-01-27 09:43:29 +08:00
Martin Dobias
137eb3a0f9 Make layer tree implementation independent from QgsProject::instance()
Another bit in the project refactoring work to get rid of dependencies
on QgsProject singleton.

Reading of layer trees from XML is now split into two phases:
1. read XML and keep layer IDs
2. resolve layer IDs to QgsMapLayer instances (using QgsProject)

There are convenience methods to do both phases in one go.
2017-01-27 09:29:04 +08:00
Nyall Dawson
45fc6dc2fe Remove duplicate QgsRasterLayer constructor
Avoids confusing overload behavior when constructing QgsRasterLayers
from c++ code. This extra constructor was causing character literals
to be converted to a boolean loadDefaultStyle flag instead
of being used as the provider key. Removing the extra constructor
avoids this, and removes some duplicate code.
2017-01-27 11:13:52 +10:00
Nyall Dawson
d259cdf5d6 Fix some coverity before/after null deference checks 2017-01-27 10:52:28 +10:00
Nyall Dawson
799b833cae Fix some memory leaks identified by Coverity 2017-01-27 10:13:46 +10:00
Nyall Dawson
7b14373a8e Fix some coverity uninitialized variable warnings 2017-01-27 09:55:12 +10:00
Nyall Dawson
8f62f834f2 Ensure newly added composer maps show layers visible in canvas 2017-01-27 08:23:53 +10:00
PedroVenancio
bf2d9995f0 Add GRASS 7.x v.out.ascii algorithm 2017-01-26 22:04:06 +00:00
rldhont
c861682ded [BUGFIX][Processing] Script: get output file extension 2017-01-26 16:53:44 +01:00
Harrissou Sant-anna
e7ff727bb8 Fix "Configure container" dialog (#4060) 2017-01-26 17:01:50 +07:00
Alexandre Neto
daa8709cf2 Add title to size assistant dialog (#4056) 2017-01-26 16:57:55 +07:00
Martin Dobias
3a92b17418 Reading/saving labeling engine uses a particular QgsProject
... rather than using QgsProject::instance() internally

These are small cleanups to dig out some instance() uses and move them one level up...

At some point we should maybe make labeling engine configuration a part of QgsMapSettings
and have default project labeling engine config accessible from QgsProject
in a way similar to e.g. snapping configuration.
2017-01-26 10:56:50 +08:00
Denis Rouzaud
958dff9d82 spelling fixes 2017-01-25 17:38:01 +01:00
Juergen E. Fischer
a64f909474 spelling fixes 2017-01-25 16:53:34 +01:00
Alexander Bruy
49e7b94a63 [processing] make additional Fusion parameters optional 2017-01-25 15:44:16 +02:00
Alexander Bruy
66c7129d7b Merge pull request #4053 from alexbruy/lidartools-update
[processing] fixes and new tools for LiDAR processing
2017-01-25 14:28:12 +02:00
Alexander Bruy
514e55bdce fix indentation 2017-01-25 13:06:56 +02:00
Denis Rouzaud
0de00150d1 correctly exit spell check test to make Travis fail 2017-01-25 11:25:27 +01:00
Alexander Bruy
f40fb9c4d2 [processing] fixes and new tools for LiDAR processing
courtesy of Niccolò Marchi
2017-01-25 11:41:34 +02:00
Tudor Bărăscu
882a80a904 fix labelontop/editable when field list sorted 2017-01-25 09:29:59 +01:00
Tudor Bărăscu
21637fd6de fix working on constraints when field list sorted 2017-01-25 09:29:59 +01:00
matteo
a49fc8ab99 [processing] add test for color relief gdal 2017-01-25 09:29:23 +01:00
Mathieu Pellerin
ecf1f5a576 [FEATURE] expression engine's is_layer_visible() (#4045) 2017-01-25 11:47:26 +07:00
Juergen E. Fischer
a61b9222de Qt 5.2 has QComboBox::currentData 2017-01-25 03:28:53 +01:00
Juergen E. Fischer
43faf338f3 remove remaining QT_VERSION <=> 5 checks (also fixes b3e8d82) 2017-01-25 02:58:48 +01:00
Juergen E. Fischer
01004d9f83 identation fix 2017-01-25 02:43:25 +01:00
Juergen E. Fischer
89b58d7334 translation string fixes 2017-01-25 02:19:33 +01:00
Juergen E. Fischer
f389069b4e update i18n scripts 2017-01-25 01:32:39 +01:00
Juergen E. Fischer
7642ce9d77 debian packaging: include server modules 2017-01-25 01:32:39 +01:00
Juergen E. Fischer
099e7a77f2 [processing] find grass >=7.0 2017-01-25 01:32:39 +01:00