# customizing QGIS Layers Panel to show layer CRS next to layer name

Is there a way to customize the Layers Panel so that the layer CRS is showed next to the layer name?

A little bit more context why this would be handy: I am writing some instructions to use (Q)GIS in particular situations. Some of the people are familiar with projections, but the most of them not.

Normaly you check the CRS by opening the layer properties, but it would be very handy for those 'unfamiliar' people to see directly in which CRS a layer is loaded into QGIS.

You could use something like this once your layers have been loaded into QGIS:

for layer in QgsMapLayerRegistry.instance().mapLayers().values():
crs = layer.crs().authid()
layer.setLayerName(layer.name() + ' (' + crs + ')')


Result:

EDIT:

In response to your comment, you can automatically update a layer's name when you add a new layer by connecting the layersAdded signal to a function. Paste the following code into the Python Console and test it by adding layers:

def updateLayerName(layers):
for layer in layers:
crs = layer.crs().authid()
layer.setLayerName(layer.name() + ' (' + crs + ')')