186 Commits

Author SHA1 Message Date
Damiano
d16702dfbc no more hand modified sip files 2021-04-01 10:13:08 +02:00
Damiano
cee0e310f8 Sip part running 2021-04-01 09:38:56 +02:00
Damiano
21c19aba9c static inline settings 2021-04-01 09:38:56 +02:00
Nyall Dawson
d3692361ad Avoid use of QStyleOptionGraphicsItem::matrix, which is removed
in Qt 6
2021-03-30 09:19:38 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Mathieu Pellerin
22d0826615
[processing] Fix atlas export relying on predefined scale for atlas-controlled map items (#42081)
* [processing] Fix atlas export relying on predefined scale for atlas-controlled map items

* De-duplicate code, add a QgsLayoutUtils::predefinedScale function
2021-03-09 06:49:48 +10:00
Alessandro Pasotti
59202c47a4 spell 2021-02-27 08:48:16 +01:00
Alessandro Pasotti
2318d761b2 QGIS 3 style doxy 2021-02-27 08:48:16 +01:00
Alessandro Pasotti
6d02a2abb0 Fix server getPrint accesscontrol for map items
Fixes #41800
2021-02-27 08:48:16 +01:00
Nyall Dawson
8324317e22 [layouts] Correctly set data defined html url or attribute table
source property on the parent multiframe object, not the child frame

Fixes #41590
Fixes #36647
2021-02-20 06:12:35 +10:00
Nyall Dawson
7dfef3a0b1 Newer doxygen versions don't auto convert the first line in a class'
documentation to a brief note, so we have to do it explicitly...
2021-02-19 08:15:29 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
a8c3b02cdd Correctly expose QgsLayoutItemAttributeTable::getTableContents to sip,
so that this class can be reused from Python classes

Fixes https://github.com/gltn/stdm/issues/411
2021-01-13 14:56:09 +10:00
Harrissou Sant-anna
a1ee2ffc96 Fix typo 2021-01-02 08:06:13 +10:00
Nyall Dawson
da59316fb5 Use /TransferBack/ instead of /Factory/ in layout registry factory methods
For same reason as we do in Processing registry:

(from the comments included in this commit)
"
While it seems like /Factory/ would be the correct annotations here, that's not
the case.
As per Phil Thomson's advice on https://www.riverbankcomputing.com/pipermail/pyqt/2017-July/039450.html:

"
/Factory/ is used when the instance returned is guaranteed to be new to Python.
In this case it isn't because it has already been seen when being returned by QgsProcessingAlgorithm::createInstance()
(However for a different sub-class implemented in C++ then it would be the first time it was seen
by Python so the /Factory/ on create() would be correct.)

You might try using /TransferBack/ on create() instead - that might be the best compromise.
"
2020-12-22 06:27:17 +10:00
Nyall Dawson
494bf24bc0 Add signals for when layout item map crs or grid crs are changed 2020-11-23 07:03:37 +10:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
olivierdalang
ce249b5933 rotated ticks folloup : prepare_commit 2020-10-08 09:37:35 +10:00
Nyall Dawson
c44178f517 Fix seealso link 2020-09-17 19:10:52 +10:00
Nyall Dawson
49e9b613b8 [layouts] Keep a separate flag for whether only a subset of layers
are to be clipped from the project, instead of just tracking this
by the presence of any checked layers

Avoids inconsistencies between the layers which are visibly clipped
on the map vs the options which are set in the GUI.
2020-09-17 19:10:52 +10:00
olivierdalang
498e7fc03c [rotated_ticks] add missing since 3.16 doctags 2020-09-01 11:08:17 +02:00
olivierdalang
426c869aef [rotated_ticks] prepare_commit and tests 2020-09-01 10:57:16 +02:00
olivierdalang
90cc33b3a8 [layout] rotated grid ticks/annotations (rebased) 2020-07-31 10:10:44 +02:00
Nyall Dawson
6d647aa678 Add method to filter QgsLayoutItemComboBox by item flags 2020-07-31 03:06:31 +10:00
Nyall Dawson
a533268edf Ensure map frame and background also follow clip path 2020-07-28 15:12:04 +10:00
Nyall Dawson
c5b3443cb3 Don't draw items which are a clip source for a map 2020-07-28 15:12:04 +10:00
Nyall Dawson
264bd51594 [layouts] Add API to set item based clipping region on maps
Allows using shape or polygon layout items to set the overall shape
of a layout map item's contents
2020-07-28 15:12:04 +10:00
Nyall Dawson
915615aec4 [layouts][api] Add API to allow map items to be clipped (take their shape from)
other layout items which provide clipping paths

Opens the door for non-rectangular layout maps
2020-07-28 15:12:04 +10:00
Nyall Dawson
77badc0097 QgsLayoutItemShape can provide clip paths 2020-07-28 15:12:04 +10:00
Nyall Dawson
aa0b36b27d QgsLayoutItemPolygon can provide a clip path 2020-07-28 15:12:04 +10:00
Nyall Dawson
2b283951be Add api for layout items to create a clipping path 2020-07-28 15:12:04 +10:00
Nyall Dawson
1878f2eb3b [layouts] Add API to retrieve an expression context scope for a particular
table cell, add backend support for QgsProperty based values in a manual
text table
2020-07-14 11:28:23 +10:00
Nyall Dawson
ff8d070fea [feature][layouts] Expose control over cell text alignment for
individual table cells in manual text tables

Allows users to set the text horizontal and vertical alignments
on a cell by cell/column/row basis

Sponsored by City of Canning
2020-07-13 06:00:05 +10:00
Nyall Dawson
18a36e4622 [feature][layouts] Allow setting per cell text format in manual text tables
Individual cells (or selections of multiple cells) can have an preset
text format set, which overrides the default text format for those cells.

Sponsored by City of Canning
2020-07-13 06:00:05 +10:00
Nyall Dawson
11297b84b3 [feature][layouts] Port attribute table to QgsTextRenderer
Allows for full range of text formatting in layout attribute tables,
including buffers & shadows, word spacing, etc
2020-07-10 15:37:12 +10:00
Nyall Dawson
ff14c6fdad [FEATURE][layouts] Use QgsTextRenderer for drawing map grid text in layouts
Allows for grid annotations which use buffers, shadows, background shapes, etc!
2020-07-08 17:00:39 +10:00
Nyall Dawson
3263211d87 Minor api cleanups (use Maximum/Minimum instead of min/max), dox
fixes (\command instead of @command)
2020-07-06 10:50:24 +10:00
Nyall Dawson
b2cef7377c [feature][layouts] Expose option to control PDF image compression
method when exporting layouts to PDF

Options are for Lossy compression, which is the default JPEG compression
used, and Lossless compression (which creates bigger files in most
cases, but is much more suitable for professional printing outputs
or for post-production in Illustrator/etc)

The Bad news: this option is available in builds based on Qt 5.14
or later.
2020-07-05 15:40:48 +10:00
Nyall Dawson
c30c769ef5 [feature][layouts] Add automatic clipping settings for atlas maps
This feature allows users to enable map clipping for layout map items
so that the maps are clipped to the boundary of the current atlas feature.

(It's available for polygon atlas coverage layers only, for obvious reasons!)

Options exist for:
- Enabling or disabling the clipping on a per-map basis
- Specifying the clipping type:
   - "Clip During Render Only": applies a painter based clip, so that
     portions of vector features which sit outside the atlas feature become
     invisible
   - "Clip Feature Before Render": applies the clip before rendering features,
     so borders of features which fall partially outside the atlas feature
     will still be visible on the boundary of the atlas feature
   - "Render Intersecting Features Unchanged": just renders all features
     which intersect the current atlas feature, but without clipping their
     geometry
- Controlling whether labels should be forced placed inside the atlas feature,
or whether they may be placed outside the feature
- Restricting the clip to a subset of the layers in the project, so that
only some are clipped

Sponsored by City of Canning
2020-07-04 16:21:15 +10:00
Marco Hugentobler
9ecded8b73 Comments 2020-06-30 13:06:53 +02:00
Marco Hugentobler
6ff2fe45ab Add possibility to set a minimum symbol size in layout legend. Minimum and maximum size are also valid for line widths 2020-06-29 17:37:02 +02:00
Marco Hugentobler
ab75840858 Sipify 2020-06-29 09:33:08 +02:00
Marco Hugentobler
f0ad33c8a9 [FEATURE] possibility to set a maximum marker size in layout legend 2020-06-29 09:02:05 +02:00
Harrissou Sant-anna
f2f7236fc8
Layout new name dialog
Make the new layout dialog use the qgsnewnamedialog class
Add/enable help button to open user manual chapters
2020-06-20 04:28:18 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
8d38aa2c15 Respect layer opacity and composition modes where possible when exporting GeoPDF
Fixes #33305
2020-06-08 13:30:06 +10:00
Nyall Dawson
4a125f607f Reduce number of expression evaluations in legend rendering
...by caching previous results and using them, until the layout is refreshed
2020-06-02 11:32:14 +10:00
Nyall Dawson
6e7113024f [layouts][api] Expose to public API the option to create separate
files for each logical layer in a layout

The backend for this was previously used only when creating a GeoPDF
export, where we create an individual PDF per layout logical layer
which are then composited by GDAL.

By publicly exposing this functionality via the QgsLayoutExporter API
we allow for plugins which can export layouts to seperate logical
PDF files, allowing for other (non-GDAL) tools to be used to later
composite the layers (e.g. Adobe Illustrator (which stupidly cannot
handle multi-layer single PDF files!))

Sponsored by SMEC/SJ
2020-05-19 04:33:48 +10:00
nirvn
f105add69a [FEATURE][layout] Expose temporal UI for map items 2020-05-10 14:30:07 +07:00
Denis Rouzaud
7a172b5756
Merge pull request #36236 from 3nids/fix25671
[layout] allow sorting attribute table by field not listed in the table
2020-05-07 06:02:41 +02:00