113 Commits

Author SHA1 Message Date
Nyall Dawson
62efbeb5cd Allow editing of row/column width/height in manual tables 2020-01-14 19:08:20 +13:00
Nyall Dawson
49d56f6c19 [FEATURE] Add new layout item type for manually created tables
Allows for creation of tables with contents manually entered by users
(i.e. spreadsheet style), so that users can create completely custom
tables.

Supports control custom cell contents, foreground and background colors.
2020-01-14 19:08:20 +13:00
Nyall Dawson
16c2254141 [FEATURE][layouts] Add user control over scalebar numeric formats
Gives users control over all the formatting properties for the numbers
in scalebars, including whether they want thousand separators, decimal
places, scientific notation, etc

Fixes #21341
2020-01-09 19:51:50 +13:00
Nyall Dawson
400e3dace1 [FEATURE][layouts] Allow layout attribute tables to be styled using the foreground
and background colors of matching conditional styles attached to the layer

When the new "Apply layer conditional styling colors" option is enabled in the
layout attribute table settings, any conditional styling rules present in the
layer will be applied inside the layout attribute table (foreground and
background colors only, for now!).

Refs #25712

Sponsored by City of Canning
2020-01-08 15:31:24 +13:00
Nyall Dawson
078f8451e0 [layouts] Ensure overview frames are correctly exporting during layer
based exports when the stacking position is set not set to above labels

Fixes #32763
2019-11-27 05:06:37 +10:00
Nyall Dawson
1ca926d72a [FEATURE][layouts] Add search box to layout manager
Allows filtering the list of layouts in a project by name, handy
when a project has many layouts
2019-11-20 17:38:28 +10:00
Juergen E. Fischer
b81d306047 spelling fixes (closes #32408) 2019-10-26 10:50:30 +10:00
Denis Rouzaud
758d7cff4a run sipify to update deprecation annotations 2019-10-15 13:17:38 +02:00
Nyall Dawson
45e847ef69 [layouts][needs-docs] Move page background setting to a per-page option
The UI for this setting was sitting under the page properties panel,
which led users to believe it was a per-page setting (rather than
applying to ALL pages in the layout).

Instead, move this property to sit within individual layout item pages
so that the behavior matches what the UI suggests.

Fixes #25695
2019-09-27 15:17:36 +10:00
Nyall Dawson
6e2c7311bb Add Python __repr__ for QgsLayoutPoint, QgsLayoutSize, QgsLayoutMeasurement 2019-09-25 04:31:36 +10:00
Nyall Dawson
fcd21e4850 [reports] Fix predefined scale mode is incompatible with report outputs
Fixes #29196
2019-09-18 10:35:23 +10:00
Nyall Dawson
ffc71c4f57 Remove const_cast 2019-09-18 07:55:46 +10:00
Nyall Dawson
3de0593957 Ensure atlas expression evaluation has access to coverage layer scope
Fixes #31807
2019-09-18 07:55:46 +10:00
Nyall Dawson
587c011046 [layouts] Fix grids cannot be disabled, ui widgets for grids get incorrectly
disabled blocking the ability to re-enable grids (master only)
2019-09-13 10:36:06 +10:00
Nyall Dawson
e0411e608d Refactor out scalebar code for calculating pretty interval sizes
into reusable function
2019-08-28 14:12:28 +10:00
Nyall Dawson
b90529b4c2 UI and API setup for dynamically calculated grid intervals 2019-08-28 14:12:28 +10:00
Nyall Dawson
e6a93e25c6 Add missing data defined properties 2019-08-28 14:12:28 +10:00
Nyall Dawson
0900831c8a Use map expression context as basis for map grid expression context
Allows use of map related variables like @map_scale, @map_extent_width,
etc in layout map grid data defined expressions
2019-08-28 14:12:28 +10:00
Nyall Dawson
658cb0c740 [FEATURE][layouts] Data defined control over grid properties
Adds data defined control over layout map grid:
- enabled state
- interval X/Y
- offset X/Y
- frame size and margin
- annotation distance from frame
- cross size
- frame line thickness

Fixes #30246, fixes #27737
2019-08-28 14:12:28 +10:00
Nyall Dawson
dbf9d917dd [FEATURE][layouts] Option to export multiple map themes while
creating GeoPDF documents from layouts
2019-08-21 05:15:04 +10:00
Nyall Dawson
3bb93fc00f Correctly georeference layout geopdf exports 2019-08-21 05:15:04 +10:00
Nyall Dawson
417f8d97a4 Hookup other pdf export settings to settings dialog 2019-08-21 05:15:04 +10:00
Nyall Dawson
b47dea0cc6 Spelling 2019-08-20 14:58:14 +10:00
Nyall Dawson
5a252a3b81 Expose map theme info to export layer details 2019-08-20 14:58:14 +10:00
Nyall Dawson
f49389d751 [layouts] API framework to allow rendering multiple map themes to layered exports 2019-08-20 14:58:14 +10:00
Nyall Dawson
1a294df22a Start on GeoPDF exporter class 2019-08-17 14:53:11 +10:00
Nyall Dawson
2074f2c9fc Warnings 2019-08-14 06:46:19 +10:00
Nyall Dawson
be4e7b1088 More attempt to fix doxygen warning 2019-08-14 06:46:19 +10:00
Nyall Dawson
b4a172f87e Dox fixes 2019-08-14 06:46:19 +10:00
Nyall Dawson
f0d60952bf Dox++ 2019-08-14 06:46:19 +10:00
Nyall Dawson
4f81a88812 [layouts] Add flags to control whether labels are split to multiple
layers in multi-layer exports
2019-08-14 06:46:19 +10:00
Nyall Dawson
de3b886313 Fix generation of layer names for exported multi-layer map exports 2019-08-14 06:46:19 +10:00
Nyall Dawson
56609123fc [layouts] Rework API for item export to multi-layered exports
Reworks the QgsLayoutItem API for handling multi-layered exports
to work as an iterator. The advantage with this is that it avoids
items needing to calculate in advance how many layers they require
in the output file.
2019-08-14 06:46:19 +10:00
Nyall Dawson
a46803844a [layouts] Add an indicator in the status bar while a map redraw is
occurring in the background

Otherwise there's no way to tell if a redraw is humming away in
the background, or is completed...
2019-08-13 18:27:38 +10:00
nirvn
f623c52fdf [needs-docs][layout] Give user explicit option to georeference (or not) PDF exports 2019-08-12 19:21:17 +07:00
Nyall Dawson
0f2a4828e4 Better display names for page items
These can't have ids set, so default to a nicer looking name
2019-08-12 16:12:03 +10:00
Nyall Dawson
276a34fd12 Add API to set/retrieve plural variants of layout item type names (e.g. Labels instead of Label) 2019-08-12 16:12:03 +10:00
Nyall Dawson
208beb7f8c [layouts] Improve logic of splitting layouts into separate layers when
exporting to a multi-layer format

Now, items are either
- placed onto the same layer as other items (simple items like labels, lines, pictures)
- placed onto the same layer as only other items of equal types (semi-complex items like scalebars or pages)
- placed onto their own unique layers (complex items like legends, maps)

Plus lots of tests covering this, where previously there was few
2019-08-12 16:12:03 +10:00
Nyall Dawson
b6ab6df69f Also allow retrieving map layer ID associated with a layout export layer 2019-08-12 16:12:03 +10:00
Nyall Dawson
3fe851a306 API Improvements to handling layered layout exports, add tests
Fixes #20253
2019-08-12 16:12:03 +10:00
Nyall Dawson
568aabb6dd Add method to determine whether a layout map has any grids or overviews enabled 2019-08-12 16:12:03 +10:00
Nyall Dawson
4636773bd6 Add API to register rendered feature handlers for a layout map 2019-08-12 16:12:03 +10:00
Nyall Dawson
d8d23b56ea [FEATURE][layouts] Add option to simplify PDF or SVG exports
This new setting, "Simplify geometries to reduce output file size",
is exposed in the SVG or PDF export settings dialogs shown when
exporting a layout/atlas/report to PDF or SVG.

If checked (the new default), geometries will be simplified while exporting
layouts in order to remove any redundant vertices which are not
discernably different at the export DPI. (e.g. if export DPI is 300 dpi,
vertices less then 1/600 inch different from each other will be removed).

This avoids exporting ALL geometry vertices during PDF/SVG export,
which can result in a ridiculously complex and large export file size.
Aside from the file size issues, it also causes problems when trying
to load these outputs into other applications, e.g. Inkscape, which
chokes on the huge number of vertices and grinds to a crawl.

Sponsored by the GeoPDF export group
2019-08-07 15:57:26 +10:00
Nyall Dawson
daf3491b5e [layouts] Add vector simplification method to QgsLayoutRendereContext
Allows specification of simplify method to use when rendering layouts
2019-08-07 15:57:26 +10:00
nirvn
8b5ba4a0cf Fix rebase gone wrong and address review 2019-07-29 15:14:34 +07:00
nirvn
3a37c83da7 [FEATURE][layout] Add horizontal placement option for scale bar labels 2019-07-29 15:14:34 +07:00
nirvn
e5deb5517b [FEATURE][layout] Add above/below segments placement option for scale bar labels 2019-07-29 15:14:34 +07:00
Nyall Dawson
87282e5dd7 [needs-docs] Add checkbox to layout map label settings panel to allow
display of unplaced labels

This is independant from the main canvas setting, and can be used
to determine whether labels are missing from a particular layout map
2019-07-21 20:29:34 +10:00
luz.paz
604e66ba75 sipify_all 2019-07-16 11:29:42 +10:00
Alex
248af94ba9 Symbol aware legend expression (#9648) 2019-07-15 07:12:24 +02:00