[Qgis-developer] Layer Name and originalName, was: [QGIS-Server] Add a Short Name to layers for OGC Web Services

René-Luc Dhont rldhont at gmail.com
Fri Jun 10 00:51:39 PDT 2016


originalName returns name
name returns name with upper case for the first letter if an option has 
been activated.

Regards

Le 09/06/2016 23:34, Germán Carrillo a écrit :
> Does anybody have any thought on this?
>
>
> 2016-06-01 10:31 GMT-05:00 Germán Carrillo <carrillo.german at gmail.com 
> <mailto:carrillo.german at gmail.com>>:
>
>     Hi All,
>
>     what is the purpose of originalName() method in QgsMapLayer class?
>
>     Documentation states:
>        Get the original name of the layer.
>        Returns
>                the original layer name
>
>     Which perhaps isn't clear enough.
>
>     Plugin developers reading the API would generally expect
>     originalName to preserve the name the layer was given when it was
>     first loaded into QGIS. And it might be so, except for this line
>     (http://qgis.org/api/2.14/qgsmaplayer_8cpp_source.html#l00117)
>     that modifies the originalName private variable.
>
>     Am I getting it wrong? Is id() supposed to fulfill such requirement?
>
>     Regards,
>
>     Germán
>
>
>     2015-12-08 6:33 GMT-05:00 René-Luc Dhont <rldhont at gmail.com
>     <mailto:rldhont at gmail.com>>:
>
>
>
>         Le 22/09/2015 13:36, Paolo Cavallini a écrit :
>
>             Il 22/09/2015 13:24, Tom Chadwin ha scritto:
>
>                 Many apologies - you are right. I change "Layer name",
>                 and couldn't
>                 understand what Display as was meant to be: a
>                 non-editable text field which
>                 mirrors Layer name? Why?
>
>             agreed, an old issue, I also do not understant its use.
>             all the best.
>
>
>         It's not an issue :-)
>
>         In QgsMapLayer there are originalName and name.
>         The method setLayerName sets originalName and name.
>         The attribute name is the capitalize originalName if the
>         settings "/qgis/capitaliseLayerName" is set to True.
>
>         In the Layer properties the originalName and Name are
>         displayed and the originalName is the editable attribute.
>
>         René-Luc
>         _______________________________________________
>         Qgis-developer mailing list
>         Qgis-developer at lists.osgeo.org
>         <mailto:Qgis-developer at lists.osgeo.org>
>         List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>         Unsubscribe:
>         http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
>     -- 
>     -----------
>        |\__
>     (:>__)(
>        |/
>     Soluciones Geoinformáticas Libres
>     http://geotux.tuxfamily.org/
>     http://twitter.com/GeoTux2
>     http://about.me/germancarrillo
>
>     <http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo>
>
>
>
>
> -- 
> -----------
>    |\__
> (:>__)(
>    |/
> Soluciones Geoinformáticas Libres
> http://geotux.tuxfamily.org/
> http://twitter.com/GeoTux2
> http://about.me/germancarrillo
>
> <http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160610/d1cf24d3/attachment-0001.html>


More information about the Qgis-developer mailing list