[Qgis-developer] How can I program a raster legend using PyQGIS?
wonder.sk at gmail.com
Tue Jan 15 22:21:41 EST 2008
On Jan 15, 2008 9:45 PM, René Estrella <perro1255 at hotmail.com> wrote:
> I'm trying to program a kind of raster layer component using PyQGIS either
> as a plugin or as a standalone application. Which classes of QGIS API do
> you recommend me to use? Do you suggest me to use QgsColorTable in
> conjunction with QgsRasterLayer to obtain the symbology of the raster layer
> and display it in a QgsLegend? Are there any other classes do I have to
> know about for this purpose? Aditionally, if you can direct me to a good
> documentation resource to learning how to use PyQGIS (very
> beginner-oriented) I would be very thankful to you.
I don't get what you mean by "raster layer component"...
However for anything related to rasters start with QgsRasterLayer
class and friends (all the raster-related classes are in qgis sources
You can't do anything with QgsLegend since it's not a part of QGIS
libraries (it's quite tightly bound to QGIS application itself).
Where to start when trying PyQGIS:
More information about the Qgis-developer