45211 Commits

Author SHA1 Message Date
Nyall Dawson
c3f07f62df Don't tabify report settings with item properties 2018-01-05 12:24:32 +10:00
Nyall Dawson
4e6a072e49 Make report/atlas settings actions checkable, so they can also hide the panels 2018-01-05 12:20:55 +10:00
Nyall Dawson
a4f854e2c1 Ensure report dock is visible when opening a report designer 2018-01-05 12:12:33 +10:00
Nyall Dawson
eae4eeb8f5 Use correct layout type (report/print layout) in new title dialog 2018-01-05 11:52:57 +10:00
Denis Rouzaud
42976df82e do not override QDateTimeEdit::dateTimeChanged
see de03186745 (diff-f135574df9edcdda660e1bc4320a053e)
2018-01-04 21:40:55 -04:00
Denis Rouzaud
2528639320 doxymentattion 2018-01-04 21:40:45 -04:00
Nyall Dawson
63cc1246df
Merge pull request #5986 from nyalldawson/geometry_equals
Refine geometry equals checks
2018-01-05 11:26:58 +10:00
Nyall Dawson
ce161e0e7d Fix failing unit test 2018-01-05 11:15:04 +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
d2c880af50 Use 'report' text instead of 'atlas' when inside a report designer 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
a730eb7a95 Swap 'set atlas feature' action from compositions to layouts
Time to start making a permenant switch...
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
7450c78606 Add new icon for atlas exports (courtesy of @nirvn) 2018-01-05 11:15:04 +10:00
Nyall Dawson
f7759b20e1 Fix crash on close project with layout designer open 2018-01-05 11:15:04 +10:00
Nyall Dawson
2281dc0dcb Ensure main canvas is refreshed when atlas preview feature changes 2018-01-05 11:15:04 +10:00
Nyall Dawson
3332118ec7 Add test mask 2018-01-05 11:15:04 +10:00
Nyall Dawson
ea4f61f024 Dox and spelling 2018-01-05 11:15:04 +10:00
Nyall Dawson
43aff9b2e3 Auto select new report sections after adding them 2018-01-05 11:15:04 +10:00
Nyall Dawson
69a225ade3 Fix missing Report top level item in organizer widget 2018-01-05 11:15:04 +10:00
Nyall Dawson
57cac0100b Expand report sections by default 2018-01-05 11:15:04 +10:00
Nyall Dawson
17292c12e9 Fix progress bar with report export 2018-01-05 11:15:04 +10:00
Nyall Dawson
8eb6aa9281 More UI work on reports 2018-01-05 11:15:04 +10:00
Nyall Dawson
fc9a45105c Add buttons for exporting reports 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
6db24327f2 Fix project retrieval for QgsReport 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
3e12ec9dcb Sort layouts in layout manager 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
66028bcf05 Cleaner way to hide atlas controls when not using a print layout 2018-01-05 11:15:04 +10:00
Nyall Dawson
f4bb247c74 Disable layout designer actions when no layout is set 2018-01-05 11:15:04 +10:00
Nyall Dawson
78f2174cfe Add button in layout manager dialog to create a new report 2018-01-05 11:15:04 +10:00
Nyall Dawson
56332b33c4 Fix multiple empty layouts created when reloading project
In related news... I find it frustrating that there's no
way in Qt to restrict elementsByTagName to direct descendants
only, and that all other available API calls for searching
only direct descendants are much more fiddly...
2018-01-05 11:15:04 +10:00
Nyall Dawson
dcf364ffcd Protect layout view against null layouts 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
Nyall Dawson
6f2c63f3e5 Add a common base class for print layouts and reports, and adapt
QgsLayoutManager to suit
2018-01-05 11:15:04 +10:00
Nyall Dawson
d8af098d83 Code shuffle and cleanup 2018-01-05 11:15:04 +10:00
Nyall Dawson
159986fdec Implement QgsReportSectionFieldGroup 2018-01-05 11:15:04 +10:00
Nyall Dawson
6284f5e36f Correct project and parent handling for report sections 2018-01-05 11:15:04 +10:00
Nyall Dawson
57628faa01 Add a unit test for exporting reports 2018-01-05 11:15:04 +10:00
Nyall Dawson
767075a3d4 Hookup filename generation for reports 2018-01-05 11:15:04 +10:00
Nyall Dawson
935dfa32d8 Add reprt iteration test 2018-01-05 11:15:04 +10:00
Nyall Dawson
cdf5cf21e1 Add report section subclass with single layout as body 2018-01-05 11:15:04 +10:00
Nyall Dawson
acb44643e3 Add missing factory annotation 2018-01-05 11:15:04 +10:00
Nyall Dawson
1ea5a5fb98 [FEATURE] Reporting framework
Reports are based on the new layouts engine. They consist of multiple
nested sections. Each individual section (and the report itself)
can have an optional header and footer (which are themselves layouts,
and can consist of multiple pages!).

Two different types of sections are implemented so far:
- a standard section, which has a single, static body layout. This
can be used to embed static layouts mid way through a report
- a "field group" section, which repeats its body layout for
every feature in a layer. The features are sorted by the selected
grouping feature (with an option for ascending/descending sort).
If a field group section has child sections (e.g. another field
group section with a different field, then only features
with unique values for the group feature are iterated over.
This allows nested reports, e.g.

Report
- Country: Australia
    - State: NSW
        - Town: Sydney
        - Town: Woolongong
    - State: QLD
        - Town: Beerburrum
        - Town: Brisbane
        - Town: Emerald
- Country: NZ
    - State: ... etc

In this example country, state or town groups can have their
own headers and footers which will be inserted in the report.

Reports are configured through a new panel in the layout designer
dialog, which is shown when editing a report (created through
the Layout Manager Dialog). The organizer allows for adding
(and removing) sections to the report, and for selecting which
layout (e.g. headers, footers, bodies) to edit within the
layout designer.
2018-01-05 11:15:04 +10:00
Nyall Dawson
811145eb96 Remove const from count method 2018-01-05 11:15:04 +10:00
Nyall Dawson
4d2f0deb1a Add a clone method to QgsLayout 2018-01-05 11:15:04 +10:00