Feature request #2185

Create QgsLegendInterface for the qgis API

Added by Andres Manz - over 14 years ago. Updated over 14 years ago.

Assignee:Martin Dobias
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12245


The patch adds / modifies the following classes:
- QgsLegendInterface (in qgis gui API)
- QgsAppLegendInterface (implements QgsLegendInterface)
- QgsLegend (additional functions for the legend interface)
- QgisInterface (add a member function for getting the legend interface)

Functions of QgsLegendInterface:
- int addGroup( QString name, bool expand );
- void removeGroup( int groupIndex );
- void moveLayer( QgsMapLayer *ml, int groupIndex );
- QStringList groups();
- [signal] groupIndexChanged( int oldIndex, int newIndex );

Python scripters can get the legend interface with iface.legendInterface() and manage groups with it.

qgis_legendiface.patch Magnifier (19 KB) Andres Manz -, 2009-12-03 03:58 AM


#1 Updated by Martin Dobias over 14 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Applied (with some modifications) in 94317ce5 (SVN r12360).

Thanks for the contribution!

Also available in: Atom PDF