[Qgis-developer] QgsRasterLayer legend interface, where is it gone ?
Sandro Santilli
strk at keybit.net
Tue Dec 16 03:01:59 PST 2014
According to documentation for the QgsRasterLayer class [1], a raster
layer can export its legend as a pixmap using a legendPixmap() method,
but the code doesn't not contain any such virtual method.
[1] http://qgis.org/api/classQgsRasterLayer.html
Instead, the class has a (non-virtual) method to retrieve a legend
in form of a list of name/color pairs.
A pure image legend is not accounted for in the raster interface
anymore. Still, beside the documentation, there's also a LegendUrl
property under the "Metadata" tab of raster layer properties, which
does not seem to be used at all either.
Is there a plan to allow raster layers to expose their layer again
as an image ? I'm trying to figure out the best way to expose per-layer
WMS legend configuration, to complete the "WMS contextual legend" QEP [2]
[2] https://github.com/qgis/QGIS-Enhancement-Proposals/pull/15
--strk;
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
More information about the Qgis-developer
mailing list