qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.5k stars 2.99k forks source link

Make Table of Rule-based rules in Layer Styling Panel sortable (or even searchable) #41861

Open rduivenvoorde opened 3 years ago

rduivenvoorde commented 3 years ago

Feature Request:

Some WMS/WFS's make it possible to download the sld of the WMS and then use that for the WFS in QGIS.

As an example from this WFS:

https://geodata.nationaalgeoregister.nl/digitaaltopografischbestand/wfs?request=GetCapabilities&service=wfs

You can download the sld of the digitaaltopografischbestand:dtb_vlakken vlakken with:

https://geodata.nationaalgeoregister.nl/digitaaltopografischbestand/wms?service=wms&request=GetStyles&layers=vlakken&styles=digitaaltopografischbestand:dtb_vlakken&version=1.1.1

I did that and created this project for you to test: dtb2.zip

You will see something like:

Screenshot-20210226122526-1322x1123

There is a rule for every feature type (hunderds).

IF you now want to search and edit one rule, it is difficult, as the rules are shown in a table, BUT the table is not searchable or filterable.. Try to change/find the label for 'sloot' :-)

So for this kind of very large rule sets it would be great to probably sneak in the QSortFilterProxyModel ...

rduivenvoorde commented 3 years ago

Argh... it's never that easy... Adding viewRules->setSortingEnabled(true); indeed adds a 'sort' icon:

Screenshot-20210226140055-396x452

BUT: does not work (yet), and I realised that off course it is a Treeview, not a table, AND in this case the order is important, because it describes the order for rendering (I think?)...

So that would either mean adding a column 'render order' or... leave the ordering and maybe create a 'filter' for the rules?