[Qgis-developer] Python bindings for enum LayerType?

Carson Farmer carson.farmer at gmail.com
Thu Jan 28 05:51:22 EST 2010


Python doesn't really have an enum type, so instead PyQt uses unique int values.
As you have found, in Python VectorLayer=0 and RasterLayer=1.
Had there been more layer types, the numbers would simply increase
with the number of layer types.

Carson

On Thu, Jan 28, 2010 at 10:36 AM,  <luca_manganelli at comune.trento.it> wrote:
>
> Hi, see this:
>
> http://doc.qgis.org/head/classQgsMapLayer.html#df3b0b576d7812c4359ece2142170308
>
> I cannot use this enum in Python... I found that VectorLayer = 0 and
> RasterLayer = 1.
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/


More information about the Qgis-developer mailing list