97 Commits

Author SHA1 Message Date
Nyall Dawson
2ec448053f Add option to render color ramp legend items as horizontal bars 2020-12-19 05:28:20 +10:00
Nyall Dawson
eaea2aaf10 Allow users to set text format for ramp legend labels 2020-12-19 05:28:20 +10:00
Nyall Dawson
24549f05fd Allow customisation of color ramp legend items in a print layout legend 2020-12-18 12:03:26 +10:00
Nyall Dawson
8eb9448746 Prefix/suffix support, ensure correct size determination of legend text 2020-12-18 12:03:26 +10:00
Nyall Dawson
f96ba98bb8 Use QgsColorRampLegendNodeSettings to control settings for QgsColorRampLegendNode items 2020-12-18 12:03:26 +10:00
Nyall Dawson
3fec67ac2c Add QgsColorRampLegendNodeSettings class 2020-12-18 12:03:26 +10:00
Nyall Dawson
1be1229663 Forward declare 2020-12-18 12:03:26 +10:00
Nyall Dawson
e4a91e7659 Add missing sip casts for legend nodes 2020-12-16 18:46:53 +10:00
Nyall Dawson
869b24ea92 Add new QgsColorRampLegendNode class for rendering a color ramp item as a legend node 2020-12-16 18:46:53 +10:00
Nyall Dawson
da51a5a8d0 It's FAR too expensive to construct a QgsSettings object for every symbol node, especially for complex
projects. So only read the valid size ranges once, and store them for subsequent use
2020-12-09 18:18:27 +10:00
Nyall Dawson
762ee09e81 Spelling, sip 2020-12-03 07:23:44 +01:00
Nyall Dawson
9bcdcf687a Add possibility for QgsRasterSymbolLegendNode nodes to be checked (API only, doesn't actually expose support for checkable raster classes!) 2020-12-03 07:23:44 +01:00
Nyall Dawson
902cb3debd Move QgsSymbolLegendNode checkAll/uncheckAll/toggle methods up to
QgsLayerTreeModelLegendNode base class

Preparing the way for other legend node types to offer checkable support
2020-12-03 07:23:44 +01:00
Alessandro Pasotti
8c06a1ac43
Merge pull request #39872 from elpaso/hidden-layers-bugfix
Hidden layers bugfix
2020-11-13 10:40:14 +01:00
Alessandro Pasotti
cb43bd8bd2 Fix mutex visibility 2020-11-11 10:54:14 +01:00
nirvn
55eaaa7484 [layer tree] Fix corrupted tree when filter (by extent) is on with legend widget(s) enabled 2020-11-11 13:41:47 +07:00
Alessandro Pasotti
8d7f540427 Fix tree model loading from xml 2020-11-10 14:44:34 +01:00
Alessandro Pasotti
6aa537c778 Doxy 2020-10-23 18:16:49 +02:00
Alessandro Pasotti
13db03e099 Crashing! 2020-10-22 18:45:27 +02:00
Alessandro Pasotti
165dcb6719 Not working yet 2020-10-22 15:58:05 +02:00
Alessandro Pasotti
b0c208f008 Hidden layers flags 2020-10-22 15:26:58 +02:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
nirvn
9d105d9d59 [layer tree] Avoid needless layer tree model computations for scale-based layer visibility 2020-09-29 06:25:02 +07:00
Matthias Kuhn
2eaf5e6d29 Recalculate layout when legend item size changes
Fixes https://github.com/qgis/QGIS/issues/38881
2020-09-21 08:03:16 +10:00
Matthias Kuhn
673d6727ee Improve legend performance
Only recalculate the position of the icons for affected legend nodes.
Avoids brute forcing over complex legends as soon as something is changed.

Fixes #38890
2020-09-21 08:02:13 +10:00
Nyall Dawson
f496173bd7 Fix messy doxygen blocks which mess with sipify script
Fixes #38291
2020-08-20 17:01:35 +10:00
Peter Petrik
d9f18ccb9c
Fix spelling (#37849)
fix the spelling errors
2020-07-21 12:51:48 +02:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Nyall Dawson
c795ddb1e9 Updates 2020-06-11 13:29:59 +10:00
Denis Rouzaud
09a36c3f6d fix UI and use invalidate rather than reset model 2020-06-06 09:22:38 +02:00
Denis Rouzaud
558e0b6ce8 use filters rather than list of layer types 2020-06-06 09:22:38 +02:00
Denis Rouzaud
91f71f51e9 fix dox + sip 2020-06-05 16:18:16 +02:00
Denis Rouzaud
3322d2bb64 add QgsLayerTreeFilterProxyModel to easily use a layer tree 2020-06-05 14:21:30 +02:00
Even Rouault
729a2f1482
regenerate qgslayertreenode.sip.in 2020-06-02 13:56:22 +02:00
Blottiere Paul
86503e53fa Update doc 2020-05-13 10:47:25 +02:00
Blottiere Paul
1c28b69044 Update sip binding 2020-05-13 10:47:25 +02:00
Blottiere Paul
555d8863fa Update sip binding 2020-05-13 10:47:25 +02:00
Denis Rouzaud
37efb4d598
Merge pull request #35382 from 3nids/dnd-across-qgis-instances
[FEATURE] allow to drag'n'drop layer across several QGIS instances
2020-05-06 16:04:07 +02:00
Denis Rouzaud
c6ee633b7d add level and duration to message emitted 2020-05-06 14:45:55 +02:00
Nyall Dawson
1e0b890dc1 [feature][layouts] Expose control over layer legend splitting behavior on a layer-by-layer basis
This allows users to manually override the legend's default setting for "split layers"
on a layer-by-layer basis, by double clicking a layer in the layout legend panel
and choosing whether that layer:
- follows the default legend setting for splitting
- can ALWAYS be split over multiple columns (regardless of the legend's setting)
or
- can NEVER be split over multiple columns (regardless of the legend's setting)

Sponsored by SLYR
2020-05-06 16:27:31 +10:00
Nyall Dawson
32c17c316e [FEATURE] Allow placing manual column breaks in legends
Adds the option when configuring a legend item to place a column
break before the item, causing it to be placed into a new column

This allows user control over the column content, for cases when
the automatic column generation doesn't result in the desired results
2020-05-06 00:22:27 +10:00
Denis Rouzaud
7fbc8a4843 add missing doc+ 2020-05-05 10:29:39 +02:00
Denis Rouzaud
01f766255b layer tree model can emit messages which will be shown in the message bar 2020-05-05 09:25:31 +02:00
Nyall Dawson
7a6220a77f [FEATURE][layouts] Allow overriding the default symbol for a legend node
This allows users to (optionally!) customise the symbol appearance
for a legend node, e.g. to tweak the colors or symbol sizes to better
provide a "representative" patch symbol compared with how those
corresponding features actually appear on the map.

It's useful for exaggerating symbol widths, or for manually tweaking
the colors of semi-transparent symbols so that the colors represent
the actual appearance of the symbols when rendered on top of the map
content. Or to tweak the marker interval/offset in marker lines so that the
markers are nicely spaced in the legend patch.

Fixes #14077
2020-05-05 11:49:05 +10:00
Nyall Dawson
0c64fd7907 [FEATURE] Allow overriding the legend patch size on a per-item basis
Allows users to override the symbol patch size for individual legend
nodes, by double clicking the node

Width and height can be individually overridden, with the node falling
back to the default width or height when the override isn't set.

Sponsored by SLYR
2020-04-28 11:31:43 +10:00
Nyall Dawson
ae8e5cfeaa Move default legend patch shape handling to QgsStyle 2020-04-21 10:40:50 +10:00
Nyall Dawson
b920e358c7 Add methods to serialize QgsLegendPatchShape 2020-04-11 05:25:22 +10:00
Nyall Dawson
07b64a3f2d Add support for setting legend patch shapes for nodes in the layer tree 2020-04-11 05:25:22 +10:00
Nyall Dawson
e1b23139ac Add API to convert legend patch shapes to QPolygonF based paths for rendering 2020-04-11 05:25:22 +10:00
Nyall Dawson
8564c453ec Add methods to get default patch shapes to QgsLegendPatchShape 2020-04-11 05:25:22 +10:00