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

C Hamilton adenaculture at gmail.com
Mon Jan 29 07:36:16 PST 2018


Thanks Nyall. It worked.

On Fri, Jan 26, 2018 at 6:26 PM, Nyall Dawson <nyall.dawson at gmail.com>
wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180129/95f1cb26/attachment.html>


More information about the QGIS-Developer mailing list