[QGIS-Developer] Defining GeoAlgorithm processing characteristics not working like I think it should

Nyall Dawson nyall.dawson at gmail.com
Fri Jan 26 15:26:50 PST 2018


On 27 January 2018 at 07:26, C Hamilton <adenaculture at gmail.com> wrote:
> I am working on making some of my QGIS plugin capabilities into processing
> algorithms. When defining input parameter characteristics for the
> GeoAlgorithm I want to do something like this:
>
> self.addParameter(ParameterVector(self.LAYER, 'Line or polygon layer',
> ParameterVector.VECTOR_TYPE_LINE | ParameterVector.VECTOR_TYPE_POLYGON))

It requires a list, rather than bit flags.

self.addParameter(ParameterVector(self.LAYER, 'Line or polygon layer',
[ParameterVector.VECTOR_TYPE_LINE,
ParameterVector.VECTOR_TYPE_POLYGON]))

Nyall


More information about the QGIS-Developer mailing list