[Qgis-developer] Legend group API

Martin Dobias wonder.sk at gmail.com
Tue Dec 11 04:41:07 PST 2012


On Tue, Dec 11, 2012 at 12:04 PM, Nathan Woodrow <madmanwoo at gmail.com> wrote:
> I think Martin has some ideas about how we can improve the legend
> based stuff.  Might be best to see what he has in mind.

Well... the whole idea is to get rid of that interface and replace it
by something saner. Maybe I have already posted that in a previous
discussion, in my view we should have something like:
- QgsLibraryItem - base item, basically a node of the legend tree
- various item specializations: QgsLibraryLayer, QgsLibraryGroup etc
with some additional methods
- an entry point in QgisInterface for getting root QgsLibraryItem
We already have those QgsLibraryXXX classes, but they are derived from
QTreeWidgetItem and that's not acceptable for API.

A second step would be to move library view to GUI library so that
also 3rd party applications can use the legend (instead of just
accessing the instance within QGIS).

Regards
Martin


More information about the Qgis-developer mailing list