Thanks Jürgen, but QgsLegendInterface::moveLayer(QgsMapLayer * ml,int groupIndex) is used to move a layer into a group ID according to the documentation. It's not exactly what I want. I'm surprise that we can't set an order for each layers like in Openlayers or Leaflet. I'll wait for this enhancement :)
Regards, Etienne 2013/12/16 Jürgen E. <j...@norbit.de>: > Hi Etienne, > > On Sat, 14. Dec 2013 at 16:38:15 +0100, Etienne Trimaille wrote: >> How can I detect that a raster layer has been deleted ? > > It's derived from QObject so it also emits destroyed() signal[1]. > > >> Another question : >> I didn't find a way to insert a layer at the bottom, not on the top. >> I want to change the drawing order for a new layer. > > You can move the layer using QgsLegendInterface::moveLayer()[2] > > > Jürgen > > > [1] http://qt-project.org/doc/qt-4.8/qobject.html#destroyed > [2] > http://qgis.org/api/classQgsLegendInterface.html#a23183b102f51dfecb81b26ea570ff224 > > -- > Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 > Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 > Software Engineer D-26506 Norden http://www.norbit.de > QGIS PSC member (RM) IRC: jef on FreeNode > > -- > norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH > Rheinstrasse 13, 26506 Norden > GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502 > > _______________________________________________ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-developer _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer