[QGIS-trac] Re: [Quantum GIS] #2672: Set group/layer visibility and
expansion state in QgsLegendInterface
Quantum GIS
qgis at qgis.org
Sat Apr 24 12:53:02 EDT 2010
#2672: Set group/layer visibility and expansion state in QgsLegendInterface
-------------------------------------+--------------------------------------
Reporter: andresmanz | Owner: nobody
Type: patch | Status: new
Priority: minor: annoyance | Milestone: Version 1.5.0
Component: GUI | Version: HEAD
Resolution: | Keywords:
Platform_version: | Platform: All
Must_fix: No | Status_info: 0
-------------------------------------+--------------------------------------
Comment (by wonder):
Hi,
thanks for the patch. I have some suggestions for improvement of the patch
in order to commit it:
* setItemVisible works with both groups and layers, but only on top
level. It would be better to split the functionality into two functions,
e.g. setGroupVisible and setLayerVisible - where groups would be
identified by the index, layers by the pointer to QgsMapLayer to keep the
API consistent
* the "setter" functions should get also appropriate "getter" function to
query the state, e.g. for setGroupExpanded there should be a function
isGroupExpanded.
Looking forward to see the improved patch,
Martin
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2672#comment:2>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list