127 Commits

Author SHA1 Message Date
Mathieu Pellerin
a17ab8f03b Add UI to select which insertion method should be used when adding new layers 2022-10-24 14:41:40 +07:00
Mathieu Pellerin
9b0dda7733 Add a new 'optimal' layer tree insertion method for newly added layers 2022-10-24 14:39:50 +07:00
vcloarec
1ce710a0c3 Sipify 2022-08-31 22:40:45 -04:00
Nyall Dawson
c52b2d3ce4 Show a layer tree next to elevation profile plots
This:

- Allows users to turn on or off the visibility of layers from
the profile plot on a plot-by-plot basis (previously the layer
visibility was taken straight from the main canvas layer visibility)
- Allows users to rearrange the drawing order of layers in the plot
- Allows a shortcut to the layer elevation properties settings by
double clicking layers
- Provides a "legend" for the features visible on the plot
2022-04-22 13:07:16 +10:00
Nyall Dawson
82274e89f5 Pass list by reference 2021-11-25 14:23:57 +11:00
Nyall Dawson
9749706c16 Ensure QgsLayerTree::layerOrder correctly respects any layer tree groups
with QgsGroupLayers associated to them
2021-11-24 07:29:31 +11:00
Nyall Dawson
921541d047 Allow association of a QgsGroupLayer with a QgsLayerTreeGroup
and ensure group layer state correctly reflects the state of the
layer tree group
2021-11-24 07:29:31 +11:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
Nyall Dawson
1f73983725 Expose some useful API from QgsLegendPatchShape 2021-10-11 12:03:13 +10:00
Nyall Dawson
e6b39077a2
Promote QgsCoordinateTransform::TransformDirection to enum class, move to Qgis
This enum was forcing an include of qgscoordinatetransform.h within the
widely used qgsabstractgeometry.h header, causing an absolute explosion
of includes of a bunch of very heavy header classes all across QGIS. By
removing the forced include we can avoid a ton of unwanted includes
and make wider use of forward declarations...
2021-09-22 16:40:49 +10:00
Nyall Dawson
1925277b4e Use the new UsersCannotToggleEditing property to refine situations
when various actions and editing dependant states should be
reflected in qgis app

We don't want annotation layers (which are always editable) to
make things like the "cancel edits for all layers" action
to become enabled.
2021-08-18 12:32:41 +10:00
Nyall Dawson
155c76c91d Add some __repr__ methods for QgsLayerTreeNode classes 2021-08-11 13:35:59 +10:00
Nyall Dawson
02266ef8e6 Rename Qgis::MessageLevel::None to NoLevel. None is a reserved
keyword in Python, so this value was previously inaccessible to PyQGIS
scripts

Also change all references to Qgis::MessageLevel values to their
fully qualified names, to ease a future transition to an enum
class (when sip bugs are fixed)

Fixes #42996
2021-05-30 10:36:01 +10:00
Nyall Dawson
b5dfe8f155 Refactor enum handling
- Add enums to qgis.h instead of qgscoreenums, so that they belong to
a Qgis namespace
- Split up the various symbol headers into multiple files so that we
can fine-tune their inclusion and forward declare more readily, speeding
up recompilation
- Move QgsSymbol enums to qgis
2021-05-18 16:59:22 +10:00
Marco Hugentobler
3ecb5e5cc8 Add const, nullptr and improve docstrings 2021-05-11 15:25:48 +02:00
Marco Hugentobler
af607f74e3 More code layout 2021-05-07 16:42:41 +02:00
Marco Hugentobler
fc2a0d60ad Spelling and documentation 2021-05-07 16:33:33 +02:00
Marco Hugentobler
8da3d112c5 Export label symbol also to json 2021-05-07 15:05:25 +02:00
Marco Hugentobler
260f4b7ac2 [FEATURE]: Show legend entries for labeling 2021-05-06 11:03:15 +02:00
Jorge Gustavo Rocha
e1588fcc7c typo fix in sip 2021-03-23 17:14:15 +10:00
Jorge Gustavo Rocha
01806b1dea Add optional recursive = false to findGroups 2021-03-23 17:14:15 +10:00
Jorge Gustavo Rocha
2eb7781f51 add findAllGroups to recursively get all groups 2021-03-23 17:14:15 +10:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Alessandro Pasotti
b269b504e6 Doxy 2021-03-11 11:38:40 +01:00
Alessandro Pasotti
273fd82e3d
Update python/core/auto_generated/layertree/qgscolorramplegendnodesettings.sip.in
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-03-11 10:53:23 +01:00
Alessandro Pasotti
83f3ad65c2 Add option to use the old legend style 2021-03-11 10:45:42 +01: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
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