36 Commits

Author SHA1 Message Date
Nyall Dawson
ed25a3e2ee [FEATURE][layouts] Add setting for label margin for map items
This setting allows per-map control of how close labels are permitted
to be placed to the map item's edges.

Sizes can be set using mm/inches/pixels/etc, and data defined
label margins are allowed.

Fixes #10314
2018-12-15 11:28:56 +10:00
Nyall Dawson
35855b88e1 [FEATURE][API] Add API to set a margin for labels for layout map items
This controls how close labels are permitted to the edges of the map
item. The labeling engine will then try other candidate positions
in order to avoid placing labels within this margin.
2018-12-15 11:28:56 +10:00
Nyall Dawson
ea069ed60e Push text format rendering setting into QgsLayoutExporter 2018-12-11 12:28:29 +10:00
Nyall Dawson
6755cbd6cf Push text format setting to layout render context 2018-12-11 12:28:29 +10:00
Nyall Dawson
d08ecc2b52 [layouts] Avoid rasterizing the whole layout when only a single item has opacity set
Instead, only rasterize that one item and pre-apply it's opacity
to the rasterized version. This keeps all the rest of the layout
content as vectors/text.
2018-12-11 09:45:37 +10:00
Nyall Dawson
048d526542 Add unit tests, standardise method names 2018-12-07 08:08:52 +10:00
Nyall Dawson
34f6e371a7 [FEATURE][layouts] Add new grid frame style "Zebra (Nautical)",
which shows nautical-style blocks in the grid corners when a
margin is set for the grid.
2018-12-07 08:08:52 +10:00
Nyall Dawson
11258c05b0 [FEATURE][layouts] Don't draw diagonals on line border grid style when a
margin is set

Instead, split this behaviour off into a new "Line border (Nautical)"
grid style. It's a very specific type of effect and won't always
be desirable when using margins with the line border style.
2018-12-07 08:08:52 +10:00
Nyall Dawson
470cd0b619 Code style fixes 2018-12-07 08:08:52 +10:00
konst
d794bdb74c [FEATURE] [needs-docs] Add the grid frame MARGIN In the "Print Layout" map grid 2018-12-07 08:08:52 +10:00
Peter Petrik
7564276994 QPrinter is unavailable on some platforms 2018-11-13 10:48:02 +01:00
rldhont
a9e6950eee [Server] Use Project selection color in GetPrint for 3.4
Because selection was deactivated in layout, selection color was not transmitted from QgsProject to QgsLayoutRenderContext to QgsMapSettings.

forward porting of #7294
2018-10-25 14:31:07 +02:00
rldhont
74f2785532 [Server] Reactivate the capability to print selection with Server 3.4
The capability to print selection has been removed by the commit aaa7003 to
prevent accidental selections showing in exports from composer.

It is reactivated only for QGIS Server.

Fixes #13459 QGIS Server WMS GetPrint request don't respect SELECTION parameter

It's a forward porting of #7185
2018-10-25 11:33:43 +02:00
Nyall Dawson
8cf64c8a51 [layouts] Add option to filter "add layer to legend" dialog to
layers visible within the (linked) map only

Fixes #20186
2018-10-23 16:41:06 +10:00
Nyall Dawson
f00e43d3c2 [layouts] Hack around inconsistent subclassing of layout items by sip
Sometimes, calling some layout methods, results in sip being inable
to downcast the items to their correct type, resulting only
in a QgsLayoutItem object.

This works around the problem, albeit in an incredibly hacky way.
2018-10-20 06:19:34 +10:00
Denis Rouzaud
4b7da692d6 run sipify all 2018-09-10 11:41:57 -04:00
Matthias Kuhn
17279a42e2 Only include qgsvectorlayer.h where required 2018-09-05 08:54:11 +02:00
Martin Dobias
2e56fadcd1 Add 3D map print layout item
So far this is just support in the layout framework, not yet exposed to the GUI.
2018-08-21 12:59:47 +02:00
Nyall Dawson
3a08300112 Sipify 2018-08-13 14:33:53 +10:00
Nyall Dawson
fa68041793 Fix some clazy/clang warnings in layout 2018-08-13 14:33:53 +10:00
Nyall Dawson
2ed144ac59 Apply clang-tidy readability-avoid-const-params-in-decls fixit
Checks whether a function declaration has parameters that are
top level const.

const values in declarations do not affect the signature of a
function, so they should not be put there.
2018-06-05 10:19:13 +10:00
Denis Rouzaud
65bb60e96c run sipify 2018-05-28 10:39:34 -08:00
Nyall Dawson
4c3a9ef7be Ensure that class \brief comes before \since (#7081)
Otherwise it breaks the Python docstrings, which require
the brief to come first
2018-05-28 04:03:46 -08:00
Nyall Dawson
e552ce62be Add warning note to QgsLayoutPageCollection::shouldExportPage 2018-05-28 10:06:23 +10:00
Harrissou Sant-anna
f0b72ae62e Set the dpi default to -1 to use layout dpi 2018-05-28 08:56:32 +10:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Nyall Dawson
4b1b752633 Fix bad regex 2018-05-27 18:54:09 +10:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00
Nyall Dawson
c864d22d1f Add "get ..." to doxygen compliance blacklist
Should be "gets ..." for consistent tense, or better yet
"returns ..." for consistency.
2018-05-27 14:05:06 +10:00
Nyall Dawson
4bb7f82fcb Remove some incorrect 'not available in Python bindings' notes 2018-05-26 16:51:58 +10:00
Nyall Dawson
94cf3fc788 Use "customize" instead of "customise"
Since we default to US spelling, we should always be using "customize"
2018-05-26 15:44:04 +10:00
Nyall Dawson
1c615c15cc More documentation compliance
Use Qt style "returns .." tense instead of "return ..", and lock
this in with a documentation compliance unit test
2018-05-25 15:09:00 +10:00
Nyall Dawson
2cb8a33884 Fix broken see also links 2018-05-25 11:16:18 +10:00
Harrissou Sant-anna
c7538702f9 Fix typo 2018-05-25 09:17:24 +10:00
Nyall Dawson
f82b639604 Fix outdated docs
Fixes #19004
2018-05-23 06:55:22 +10:00
Denis Rouzaud
7df2593caf move auto generated sip file in dedicated folder 2018-05-14 10:23:37 -04:00