Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata setting to override widget wrapper used for a parameter #57860

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

alexbruy
Copy link
Contributor

Description

While it is possible to add new widget wrappers for Processing parameters there is no way to override standard widget wrappers defined for each parameter type. This was possible using old API and added a lot of flexibility in different use cases.

This PR adds support for a new parameter metadata setting "widget_type" which allows to allows to override standard widget wrapper for a parameter.

param.setMetadata( {'widget_wrapper': { 'widget_type': 'my_widget' }} )

The "widget_type" key allows to override standard widget wrapper for a
parameter type.
@alexbruy alexbruy added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Jun 24, 2024
@alexbruy alexbruy requested a review from nyalldawson June 24, 2024 14:08
@github-actions github-actions bot added this to the 3.40.0 milestone Jun 24, 2024
@alexbruy
Copy link
Contributor Author

@nyalldawson as we discussed some time ago.

Copy link

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit ef1c9df)

@nyalldawson nyalldawson merged commit 5caed99 into qgis:master Jun 24, 2024
34 checks passed
@alexbruy alexbruy deleted the processing-custom-wrappers branch June 25, 2024 07:29
@zacharlie zacharlie added the Changelog Items that are queued to appear in the visual changelog - remove after harvesting label Sep 24, 2024
@qgis-bot
Copy link
Collaborator

@alexbruy

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants