I'm having trouble figuring out how to iterate over map layers. I can access the currently highlighted layer in the table of contents via iface.activeLayer()
but I want my code to operate on all layers.
I don't see anything in the API that provides easy access to this functionality and couldn't find a good online example but maybe I missed something?
Best Answer
Try...
Culled from consolidatethread.py from QConsolidate plugin.
Description of QgsLegendInterface object returned from legendInterface().
Edit: added info on 'self' above.