[QGIS-trac] [Quantum GIS] #2185: Create QgsLegendInterface for the qgis API

Quantum GIS qgis at qgis.org
Thu Dec 3 06:56:00 EST 2009


#2185: Create QgsLegendInterface for the qgis API
--------------------------------+-------------------------------------------
   Reporter:  andresmanz        |              Owner:  nobody
       Type:  patch             |             Status:  new   
   Priority:  minor: annoyance  |          Milestone:        
  Component:  GUI               |            Version:  HEAD  
   Keywords:  legend interface  |   Platform_version:        
   Platform:  Gentoo            |           Must_fix:  No    
Status_info:  0                 |  
--------------------------------+-------------------------------------------
 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.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2185>
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