36831 Commits

Author SHA1 Message Date
rldhont
50319b1cf0 Merge pull request #3942 from pblottiere/qgsserverprojectutils
[server] WIP clean project parsing by using QgsProject
2017-01-30 11:58:21 +01:00
Blottiere Paul
83f4c99eb2 add SERVER_EXPORT for each function in namespace 2017-01-30 11:23:22 +01: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
volaya
6002ca749f [processing] removed providers imports 2017-01-30 10:56:51 +01:00
volaya
0c11b8dd8f fixed Cmake file 2017-01-30 10:28:37 +01:00
Nyall Dawson
f80b92a23f Also registry HTML annotation when webkit isn't available 2017-01-30 19:19:24 +10:00
Nyall Dawson
6bffa17cc2 Fix failing tests 2017-01-30 19:13:07 +10:00
volaya
cd17680c71 [processing] removed otb and lidartools providers 2017-01-30 09:41:38 +01:00
Nyall Dawson
1c1dae3b30 Add missing docs 2017-01-30 18:02:03 +10:00
Nyall Dawson
41fe33551c Add missing python bindings 2017-01-30 17:40:41 +10:00
Nyall Dawson
7594774dac Correctly handle offset when calculating symbol bleed 2017-01-30 17:33:54 +10:00
Blottiere Paul
44da573002 replace class by namespace 2017-01-30 08:21:06 +01:00
Blottiere Paul
a868f0b7b6 clean-up 2017-01-30 08:21:06 +01:00
Blottiere Paul
6a64a556f0 rename Store into Registry 2017-01-30 08:21:06 +01:00
Blottiere Paul
5b42d4ac2e fix indent 2017-01-30 08:21:06 +01:00
Blottiere Paul
31898e0254 fix indent 2017-01-30 08:21:06 +01:00
Blottiere Paul
a93c2e256a fix typo 2017-01-30 08:21:06 +01:00
Blottiere Paul
5594418113 fix typo 2017-01-30 08:21:06 +01:00
Blottiere Paul
5c8360dba2 [server] WIP clean project parsing by using QgsProject 2017-01-30 08:21:05 +01:00
Nyall Dawson
219a45adcb Ensure newly added annotations are selected 2017-01-30 15:54:47 +10:00
Nyall Dawson
404056558b Ensure annotation frame is closed before rendering 2017-01-30 15:35:37 +10:00
Nyall Dawson
5584c5312b Correctly add newly created annotations to manager 2017-01-30 15:35:26 +10:00
Nyall Dawson
ad184cdeed [composer] Remove last link between composer maps and canvas
you WILL respect the separation between core and gui!!\!
2017-01-30 15:09:27 +10:00
Nyall Dawson
4a0793d1a3 [composer] Draw annotations over grids/overviews (fix #10300) 2017-01-30 15:07:29 +10:00
Nyall Dawson
22939736f4 [composer] Respect linked layer visibility when drawing annotation items (fix #10172) 2017-01-30 15:04:12 +10:00
Nyall Dawson
4058f4734b Annotations are now handled at a project level
This commit implements a new QgsAnnotationManager class, which
handles storage, writing and retrieval of annotations.

QgsProject has an annotationManager() attached to it. Map canvases
sync their visible QgsMapCanvasAnnotationItems to the annotations
contained within the project's annotation manager.

This moves all management, storage and retrieval of annotations
up to core and out of app/canvas.
2017-01-30 14:57:16 +10:00
Nyall Dawson
dd51843e54 QgsSymbol estimateMaxBleed methods now use a QgsRenderContext
argument to correctly calculate bleed for mapunits/pixels/etc
2017-01-30 12:36:04 +10: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
b2b365fc0b Replace VisualMargin with QgsMargins 2017-01-30 10:55:22 +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
Jorge Gustavo Rocha
bbf6ec05b9 Fix inconsistent-missing-override warning 2017-01-29 23:28:21 +00:00
Nyall Dawson
7a2be42259 Respect snapping while moving annotations (fix #10551) 2017-01-30 09:13:53 +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
3d372e615c Handle moving annotation with different CRS to canvas 2017-01-30 08:36:20 +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
Jorge Gustavo Rocha
d60ddcc8aa QMessageBox replaced by QgsMessageBar
"Saved styles manager" renamed to "Database styles manager"
2017-01-28 19:09:43 +00:00
Alexander Bruy
d681e9cb06 update docs 2017-01-28 11:12:12 +02: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
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