Hi Larry On Wed, Nov 28, 2012 at 9:11 PM, Larry Shaffer <[email protected]> wrote: > > Hi, > > I added to QgsLegendInterface today [0] and noticed how lacking the > Python binding is when working with the legend, compared to the number > of methods that could be exposed from QgsLegend. Looks like > QgsLegendInterface really hasn't been updated since QGIS 1.5. > > Users/plugin devs have asked for better means of working with the > legend, so my questions are: > > * Should there be an effort to bring many of the reasonable-to-expose > methods from QgsLegend to QgsLegendInterface for 2.0 release? > > * OR, should QgsLegend be overhauled first (as there has been talk about)?
If you have time for QgsLegend overhaul, please go ahead! QgsLegend has been stuck in application source code... but it is easy to see that developers would really appreciate its availability in GUI library. Once in GUI library, we could get rid of the QgsLegendInterface class that is clumsy and very limited. Right now there are two issues why QgsLegend is not inside GUI library: 1. it has some dependencies on QgisApp (e.g. open layer properties, open attribute table) - those dependencies should relatively easy to solve (by adding support for custom context menu actions) 2. it is implemented as a QTreeWidget + QTreeWidgetItem. This is should be ideally replaced by model/view approach that separates the data and view logic. Regards Martin _______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
