[QGIS-Developer] Custom parameters in Processing scripts

Nyall Dawson nyall.dawson at gmail.com
Sun Nov 18 15:13:54 PST 2018


On Sat, 17 Nov 2018 at 02:44, Matteo Ghetta <matteo.ghetta at faunalia.eu> wrote:
>
> Hi dev,
>
> is it possible to add a custom parameter to Processing scripts UI and
> grab its value?
>
> e.g. a custom QDate (or QDateTime) and grab the values as date/datetime?

Yep -- see e.g.

Defining a new widget type:
https://github.com/nyalldawson/pyqgis/blob/master/processing/layout_algorithms.py#L67


Using your custom widget in an algorithm:

https://github.com/nyalldawson/pyqgis/blob/master/processing/layout_algorithms.py#L182

Nyall


>
> Thanks for any suggestions
>
> Cheers
>
> Matteo
>
> --
> Matteo Ghetta - www.faunalia.eu
> QGIS & PostGIS courses: http://www.faunalia.eu/training.html
> https://www.google.com/trends/explore?date=all&geo=IT&q=qgis,arcgis
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the QGIS-Developer mailing list