317 Commits

Author SHA1 Message Date
Nyall Dawson
2eacc4c4b4 [FEATURE][layouts] Export project metadata in PDF/image exports
Includes project metadata in PDF exports, and supported image
based formats.

Image based metadata support depends on the format and the
Qt library's handling of each particular format (e.g. PNG
outputs are well supported).

Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
2018-03-22 16:13:30 +11:00
Nyall Dawson
a600b51bad [FEATURE][layouts] Export project metadata as SVG RDF metadata
Adds an option to include project metadata into SVG exports
generated from layouts, using the SVG RDF standard.

Developed for Arpa Piemonte (Dipartimento Tematico Geologia e Dissesto)
within ERIKUS project
2018-03-22 16:13:30 +11:00
Nyall Dawson
0c1ceb3900 [FEATURE][layouts] Data defined table source for attribute table items
When an attribute table is set to a "Layer features" source, this
allows the underlying vector layer from which to source features
to be data defined.

(All existing table attributes (column settings) are left intact,
so setting a data defined table to a layer with different fields
will result in empty columns in the table.)

Sponsored by Kartoza/Inasafe
2018-03-11 10:22:46 +11:00
Nyall Dawson
97324661c7 Add layout util to retrieve map layer from project by string
Considers both layer id (preferred) and layer names
2018-03-11 10:22:46 +11:00
Nyall Dawson
0e3af9c6a9 [layouts] Remove use of QStyleOptionGraphicsItem from QgsLayoutItem API
Turns out the useful methods in QStyleOptionGraphicsItem were deprecated
in Qt 5.10. To future protect our API this replaces all public
use of QStyleOptionGraphicsItem, so that we're free to revise
the internals of how we use QStyleOptionGraphicsItem without breaking
the public QGIS API.
2018-02-19 19:18:24 +11:00
Nyall Dawson
345dd0c376 [layouts] Fix items disappear in designer with 90 or 270 degree
rotation

Caused by Qt bug 66185

Fixes #18027
2018-02-05 12:36:18 +11:00
Nyall Dawson
7761360976 Fix clazy invalid slot warning 2018-02-02 19:52:01 +11:00
Nyall Dawson
f0b14c56f9 Fix clazy overridden signal warnings 2018-02-02 19:52:01 +11:00
Nyall Dawson
a08c05b20c Fix clazy fully-qualified-moc-types warnings
From the clazy docs:

"Warns when a signal, slot or invokable declaration is not using fully-qualified
type names, which will break old-style connects and interacting with QML."
2018-02-02 19:52:01 +11:00
Mathieu Pellerin
dce341e152
[reports] allow header and footer sections to always be included 2018-01-23 20:08:14 +07:00
Nyall Dawson
c91fd5a067 [reports] Tweak sub-section logic for multi-layer reports
Instead of requiring a single layer for use with nested field group
sections, allow use of different layers. In this case the child
layers are filtered so that any fields with names matching their
parent groups are filtered to match the parent section's value.

Also only include headers and footers for child field group sections
if the child has matching features found.
2018-01-23 17:51:50 +11:00
Nyall Dawson
88808615a8 Drop composer
It's been a great journey, but your time has come...
2018-01-23 15:30:01 +11:00
Nyall Dawson
7a2ab1cc7c [layouts] Fix multiframe items (tables, html) cannot be pasted
Fixes #10456, #17882
2018-01-23 07:14:44 +11:00
Nyall Dawson
35a77013ca Fix handling of multiframe objects in layout templates 2018-01-23 07:14:44 +11:00
Nyall Dawson
d9b6c8b5d1 Add missing sip casting for layout multiframe objects 2018-01-23 07:14:44 +11:00
Nyall Dawson
20f50fbac9 [layouts] Fix some linked map items not correctly restored when
loading projects.

Also remove some outdated TODOs

Fixes #17892, #17891
2018-01-23 07:14:44 +11:00
Nyall Dawson
f5876eab98 [layouts] Don't needlessly calculate layer sets for maps linked
to a map theme

This is very expensive to do, so avoid calculating it as much
as possible

Refs #17027
2018-01-19 09:25:30 +10:00
Nyall Dawson
5804745326 Port more tests to layouts, drop more QgsCompositions use 2018-01-18 09:21:45 +10:00
Nyall Dawson
fe48aeca0c Fix crash with undo/redo and layout multiframes, restore test 2018-01-18 09:21:45 +10:00
Denis Rouzaud
7722010ca8 rename *.sip to *.sip.in for the auto generated sip files 2018-01-17 10:16:37 -04:00
Nyall Dawson
343c070adf Fix layout designer does not respect layout settings 2018-01-17 04:58:41 +10:00
Denis Rouzaud
6d94ac9c6c run sipify 2018-01-12 21:10:16 -04:00
Alessandro Pasotti
f868bcc691 [layout] Add printLayouts to return all print layouts contained in the manager 2018-01-10 18:03:08 +01:00
Nyall Dawson
b95363c5b6 Drop composer from app 2018-01-10 14:46:57 +10:00
Denis Rouzaud
d87c60512c [sipify] fix bad handling of \see within sentences
and other docstrings improvements
2018-01-09 21:40:10 -04:00
Alessandro Pasotti
03400ddbe2
Merge pull request #5913 from elpaso/layouts-import-from-2
[layouts] import from 2.x
2018-01-09 22:35:26 +01:00
Denis Rouzaud
5babec5e07 run sipify 2018-01-09 11:40:39 -04:00
Alessandro Pasotti
3f081b8588 [layout] Added template method to retrieve QgsLayoutObjects 2018-01-09 13:24:22 +01:00
Alessandro Pasotti
f297e86201 [layout] Import attribute table from composition 2018-01-09 08:08:26 +01:00
Alessandro Pasotti
3bfebe144e Sipify 2018-01-09 08:08:26 +01:00
Alessandro Pasotti
da3636e566 [layout] Converter: initial implementation 2018-01-09 08:08:26 +01:00
Nyall Dawson
3d36653f55 Code shuffle 2018-01-08 13:35:15 +10:00
Nyall Dawson
db906273b5 Drop all composer classes from Python bindings 2018-01-08 13:35:15 +10:00
Nyall Dawson
d372799b87 Remove some more redundant tests, add sip subclassing 2018-01-08 12:09:32 +10:00
Nyall Dawson
f3124f0d82 Fix storing/reading multiframe items (TODO fix undo/redo support) 2018-01-08 05:51:29 +10:00
Nyall Dawson
1b969267fc Fix crash when deleting multiframe item child frames 2018-01-08 05:51:29 +10:00
Nyall Dawson
53b67069cc Standardise some layout api method naming/behavior 2018-01-07 16:07:05 +10:00
Nyall Dawson
bf6c95d575 Add icons for report section types, and show pencil 'editing'
icon in report organizer for section currently being edited in
the designer

This should help indicate to users which section is currently being
edited and give more visual hints as to exactly what's happening
in the ui.
2018-01-05 13:52:22 +10:00
Nyall Dawson
eae4eeb8f5 Use correct layout type (report/print layout) in new title dialog 2018-01-05 11:52:57 +10:00
Nyall Dawson
51a7efbe4b Nicer ui widgets for sections, add missing control for
disabling body sections
2018-01-05 11:15:04 +10:00
Nyall Dawson
5d64f3cd22 Fix missing feature contexts for report section header/footers
and expand unit tests
2018-01-05 11:15:04 +10:00
Nyall Dawson
4e45639c45 Restore direct print actions 2018-01-05 11:15:04 +10:00
Nyall Dawson
39ae0eef7d Add method to seek atlas directly to a QgsFeature 2018-01-05 11:15:04 +10:00
Nyall Dawson
ea4f61f024 Dox and spelling 2018-01-05 11:15:04 +10:00
Nyall Dawson
c9ddc9fda0 Start on ui for configuring reports 2018-01-05 11:15:04 +10:00
Nyall Dawson
f4a99b65bb Add a row method to QgsAbstractReportSection 2018-01-05 11:15:04 +10:00
Nyall Dawson
b862db06f0 Fix clashing inherited methods 2018-01-05 11:15:04 +10:00
Nyall Dawson
19b058103b Add crappy inappropriate icons for layout types 2018-01-05 11:15:04 +10:00
Nyall Dawson
aef0432fdc Implement sort order customisation for field groups 2018-01-05 11:15:04 +10:00
Nyall Dawson
2654454c0b Implement serialization of reports 2018-01-05 11:15:04 +10:00