north-road / qgis-processing-r

QGIS Processing R Provider Plugin
https://north-road.github.io/qgis-processing-r/
GNU General Public License v3.0
63 stars 14 forks source link

New inputs: datetime, range and color as parameter inputs #96

Closed gavg712 closed 2 years ago

gavg712 commented 2 years ago

Dear @nyalldawson and others.

This is a proposal to add QgsProcessingParameterRange and QgsProcessingParameterColor as inputs in a Rscript. Please take a look at it.

image

Cheers

nyalldawson commented 2 years ago

Looking good to me! Don't worry about the lint failures -- those aren't related to this change.

nyalldawson commented 2 years ago

Lint issues are fixed in https://github.com/north-road/qgis-processing-r/pull/97

gavg712 commented 2 years ago

I hope you don't find it a problem, I added in this same PR the code for datetime input (template, algorithm and unittest, ready today)

image

nyalldawson commented 2 years ago

Looking great @gavg712, thanks so much for these valuable improvements! One last request -- can you update the documentation in https://github.com/north-road/qgis-processing-r/blob/master/website/pages/script-syntax.md to add the new parameter types too?

gavg712 commented 2 years ago

Ready to edit the Script syntax on the web. I added a bit more than required to included more parameters not mentioned in previous edits.

In a last look on the behavior of the inputs, I took some notes on the crs, multiple and distance inputs in this link. However I did not make any changes to the code. If you like to discuss about, I could create a new issue for this.

nyalldawson commented 2 years ago

@gavg712

ahh -- there's a "withopacity" part of the parameter definition you'd need to add:

##Color=color withopacity #FF0000
gavg712 commented 2 years ago

My apologies. It is now corrected!

nyalldawson commented 2 years ago

Great, thank you!!