qgis python plugin to loop over visible layers