Feature request #2185

Create QgsLegendInterface for the qgis API

Added by Andres Manz - about 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Low
Assignee:Martin Dobias
Category:GUI
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:12245

Description

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

History

#1 Updated by Martin Dobias almost 11 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