53162 Commits

Author SHA1 Message Date
Nyall Dawson
d70b60d48f [FEATURE][layouts] Allow expressions to be embedded inside legend item text
This feature allows for expressions to be embedded directly inside
legend item text (e.g. group, subgroup and item text). The expressions
are evaluated at render time, with full knowledge of the legend's
expression context (so can utilise variables from the layout/layout item/
etc)

There's no UI for this yet (that will come in 3.8), but expressions are
entered using the standard [% 1 + 2 %] format.

E.g. a legend item text of

    My layer (rendered at 1:[% @map_scale %])

will show in the output as

    My layer (renderer at 1:1000)
2019-01-18 20:36:30 +11:00
Nyall Dawson
b3d5f277d9 Constify 2019-01-18 20:36:30 +11:00
Mathieu Pellerin
c17dc43d5b Respect project selection color when saving map canvas as image/PDF 2019-01-18 16:01:45 +07:00
Martin Dobias
9875821b04 Review fixes, sip, doc fixes, icons, style panel fix 2019-01-18 09:32:53 +01:00
Mathieu Pellerin
4575547f65 Fix/improve visual look of new version notification
- Set a better background color (yellow feels like a negative warning)
- Set text color to black to play nice with themes
- Make the hyperlink clickable, we want people to update!
2019-01-18 11:35:59 +07:00
Alex
b43943a9b0 [FEATURE] New expression variables for legend items
Adds new variables for use in data defined expressions for layout legend items, including

- @legend_title
- @legend_column_count
- @legend_split_layers
- @legend_wrap_string
- @legend_filter_by_map
- @legend_filter_out_atlas

Additionally, if the legend is linked to a map, then expressions used in that legend will also have access to the linked variables, including @map_scale, @map_extent, etc.
2019-01-18 13:38:21 +11:00
Nyall Dawson
7c5dcd67ba Persist canvas expression context scope variables to project
and restore individual scope variables for each canvas on project
load.
2019-01-18 12:56:05 +11:00
Nyall Dawson
a0e91f3798 Add API to read/write QgsExpressionContextScope from/to XML 2019-01-18 12:56:05 +11:00
Nyall Dawson
4ff81e06ac Fix build warning 2019-01-18 11:05:05 +10:00
Ivan Ivanov
2488f71ddb Added test for 'gdal_rasterize -init 0' 2019-01-18 09:50:08 +11:00
Ivan Ivanov
36c821da34 Allow gdal_rasterize to accept -init with value of 0; changed default value to not introduce a breaking change 2019-01-18 09:50:08 +11:00
Martin Dobias
f069342b35 Rendering test for rule-based 3D renderer 2019-01-17 21:02:31 +01:00
Jonathan Willitts
0aae2c1d69 Add missing headings and remove table captions (#8892)
* Add missing headings and ToC anchors

Adds missing headings (and table of contents anchors) for 'Renamed Enum Values' and 'Renamed Methods' tables.

* Removed table captions

Which are redundant due to the headings that the tables sit under
2019-01-17 14:54:10 -05:00
Martin Dobias
42f157f7ca GUI for rule-based 3D renderer 2019-01-17 20:44:22 +01:00
Martin Dobias
5d05d467d6 [FEATURE] Add rule-based 3D renderer
Next to the "simple" vector layer 3D renderer that uses a single symbol
for all features, this new renderer allows definition of hierarchy
of rules with 3D symbols to define how a layer is rendered in 3D view,
similar to how 2D rule-based rendering or labeling works.

This commit does not add any GUI support yet.
2019-01-17 20:40:59 +01:00
rldhont
67938e5426
Merge pull request #8863 from rldhont/server-wmts-config-matrices
WMTS tile matrices configuration [Server][Feature]
2019-01-17 19:00:34 +01:00
Denis Rouzaud
00be400b02
add name to travis builds (#8889) 2019-01-17 10:00:47 -05:00
Denis Rouzaud
5fa5631bbd
add enum value to key and reverse helpers (#8879)
* add enum value to key and reverse helpers

* cast cont char* to QString

* use QStringLiteral
2019-01-17 09:40:13 -05:00
rldhont
81aa143923 [Server][Feature][needs-docs] WMTS tile matrices configuration
In QGIS Server 3.4, the WMTS API has been added in which the tile matrices are calculated except fro EPSG:3857 and EPSG:4326.

This commit adds the capability to select the tile matrices to use with the project and to configure the top-left corner and the last level of the tile matrix. In the case of EPSG:3857 and EPSG:4326, the user can only choose the last level of the tile matrices.

Funded by Ifremer.
2019-01-17 15:29:30 +01:00
Jonathan Willitts
68994adc1b Add missing api breaking change for setMapTipTemplate() to QgsVectorLayer (#8880)
* Add missing change for QgsVectorLayer

* Update, to include mention of setDisplayExpression
2019-01-17 08:42:30 -05:00
Marco Bernasocchi
6896ce9bab add /usr/share/qgis/python/plugins to PYTHONPATH (#8877)
this is needed to find the correct processing (and db_manager and metasearch)
2019-01-17 08:42:04 -05:00
Martin Dobias
2d56345c73 Use QgsFeature3DHandler implementation for line 3D symbols 2019-01-17 13:43:22 +01:00
Nyall Dawson
681707b51b Slightly nicer linked color icons 2019-01-17 16:48:29 +10:00
Mathieu Pellerin
689d4f7653 Ship better default polygon symbols using outline's simple line when appropriate 2019-01-17 13:34:32 +07:00
Nyall Dawson
572e2d5415 Unify code 2019-01-17 16:14:32 +11:00
Nyall Dawson
3d283c1b05 [needs-docs] Show actual linked color in color buttons when color
has been linked to a project color

Instead of only showing linked color status in the accompanying
data defined button, we now also show it inside the color button
itself. So now the button color is a live reflection of the
project color it is linked to.

Additionally, when the color is linked, the button only allows
users the choice of "unlinking" the color from the linked
project color. The usual color button options allowing users
to directly change the color are not present. (As linked
colors must be edited in the project colors section from
the project properties dialog)
2019-01-17 16:14:32 +11:00
Nyall Dawson
4ae3bcd23f Set correct message bar for attribute table 'select by expression' dialog 2019-01-17 12:50:09 +11:00
Nyall Dawson
00c4d4af61 Fix crash when using select by expression from attribute table dialog 2019-01-17 12:50:09 +11:00
Martin Dobias
7f5d8ea507 [3d] Added Qgs3DRenderContext + QgsFeature3DHandler. Code refactoring.
Currently implementation of 3D symbols runs a feature iteration loop
inside each implementation, making it difficult to use elsewhere
(e.g. if source features are not coming from a vector layer, or just
for its subset). The new classes give better structure to the code.

QgsFeature3DHandler is somehow similar to the 2D renderer classes
where the object first has the ability to say what fields may be needed,
then there's a method that will process a given QgsFeature (this is
supposed to be called in a loop) and finally a method to finish the job
and create a 3D entity. Thanks to this separation of responsibilities
it should be easier to later move the heavy work to a worker thread.

Qgs3DRenderContext is similar to QgsRenderContext used in 2D rendering.
The purpose is to collect arbitrary objects useful during preparation
of 3D entities. Currently just keeping Qgs3DMapSettings and expression
context.

Updated implementation of 3D polygon symbols to use the new infrastructure.
A nice side effect is that instead of two feature iteration loops
(one for selected, the other for non-selected) there is just one.
2019-01-17 00:21:47 +01:00
Nyall Dawson
9014be0d37 Fix too small symbol layer preview icon on hidpi displays 2019-01-17 09:47:20 +11:00
Nyall Dawson
3c0c2535d6 Use a minimal expression context in symbol layer tree preview icons
Allows the preview icon to correctly show linked project colors
2019-01-17 09:47:20 +11:00
rldhont
9419bfdc5f
Merge pull request #8878 from rldhont/sld-read-like-escapeChar-master
[BUGFIX] SLD : Support escapeChar attribute of PropertyIsLike
2019-01-16 19:53:25 +01:00
rldhont
1f9a14d984 [BUGFIX] SLD : Support escapeChar attribute of PropertyIsLike
In OGC FilterEncoding standard, the PropertyIsLike element has an escapeChar attribute in place of escape attribute.

In the QgsOgcUtils class, the attribute escape or escapeChar is added to PropertyIsLike element, but it only checks escape attribute when it decodes it.

The commit fixed it and adds test.
2019-01-16 17:46:14 +01:00
lbartoletti
aaede28b43 [feature] Add expression for square by diagonal and rectangle from 3 points
With the new class QgsQuadrilateral, we can add expressions to create a square by a diagonal and rectangles by 3 points
2019-01-17 03:42:20 +11:00
Nyall Dawson
200d4f6a2c Fix connected widgets do not update in some circumstances 2019-01-17 03:39:20 +11:00
Nyall Dawson
f89d061ba0 [FEATURE][processing] Add geodesic mode for "Join by Lines (Hub lines)" algorithm
This allows optional creation of geodesic lines, which represent the
shortest distance between the points based on the ellipsoid.

When geodesic mode is used, it is possible to split the created lines
at the antimeridian (±180 degrees longitude), which can improve
rendering of the lines. Additionally, the distance between vertices
can be specified. A smaller distance results in a denser, more accurate
line.
2019-01-17 03:39:20 +11:00
Nyall Dawson
1248bea156 Fix determination of geodesic line when first segment is small and coordinates are reprojected 2019-01-17 03:39:20 +11:00
Juergen E. Fischer
4e6a7309e1 [FEATURE] postgres provider: save primary key selection
When a view loaded from Data Source Managers's PostgreSQL tab you can
select the key columns of the view (by default the first column is used,
which can be wrong). This commit stores that selection in the settings,
so that it doesn't have to be reselected on subsequent loads.  This
stored selection is also used when adding the loading from the browser.
2019-01-16 15:33:40 +01:00
Hugo Mercier
21a7e154a3
Merge pull request #8851 from mhugo/fix_vertex_tool_cache
Fix vertextool's geometry cache invalidation
2019-01-16 14:30:10 +01:00
Juergen E. Fischer
a6f261826a translation updates 2019-01-16 14:24:04 +01:00
Hugo Mercier
eb08839429
Merge pull request #8850 from mhugo/fix_postgres_transaction_lock
Fix libpq access from different threads
2019-01-16 14:20:42 +01:00
Peter Petrik
0a7c8a7011 test quad_flower.2dm also in the mesh read tests 2019-01-16 11:02:20 +01:00
Peter Petrik
0459a3db44 fix copy-paste error in mesh symbol type 2019-01-16 11:02:20 +01:00
Martin Dobias
d2834bbb44 fix 3d mesh test 2019-01-16 11:02:20 +01:00
Peter Petrik
d695c4b34b [feature] [3d] [mesh] Display mesh faces in 3D view as terrain 2019-01-16 11:02:20 +01:00
Nyall Dawson
83340d0dfb [layouts] Fix loss of composition variables when converting 2.x compositions 2019-01-16 20:26:11 +11:00
Mathieu Pellerin
cabcce1fcd Fix dual view's feature list not using app palette 2019-01-16 11:04:21 +07:00
Mathieu Pellerin
f275cc0812 Fix variable editor widget not playing well with dark themes 2019-01-16 10:56:57 +07:00
Nyall Dawson
2e9919e150 Show category/range label as breadcrumb title when editing classes in layer style dock 2019-01-16 13:51:34 +11:00
Nyall Dawson
2aab28380c [browser] Don't show gdal/ogr layer items for QGIS style xml files
These aren't layers, so the extra entries are just distracting noise.
2019-01-16 12:10:25 +11:00