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

Implement in-place processing for non feature-based algorithms #5514

Merged
merged 3 commits into from
Aug 9, 2024

Conversation

nirvn
Copy link
Member

@nirvn nirvn commented Aug 4, 2024

This will be useful if models can eventually advertise in-place editing support.

In the meantime, this is still a pretty cool PR: we get the critical buffer algorithm 🥳

vokoscreenNG-2024-08-04_15-56-07.mp4

@qfield-fairy
Copy link
Collaborator

Copy link
Member

@domi4484 domi4484 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me but i did not tested


bool ok;
QVariantMap results = mAlgorithm->run( parameters, context, &feedback, &ok, { { QStringLiteral( "IN_PLACE" ), true } } );
if ( ok )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What in case is not ok? Should we show the error somehow?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling needs thinking in separate PR for both feature based and this type of alg.

@@ -33,6 +33,7 @@
<file>ProcessingAlgorithmForm.qml</file>
<file>ProcessingAlgorithmPreview.qml</file>
<file>processingparameterwidgets/ProcessingParameterWidgetBase.qml</file>
<file>processingparameterwidgets/boolean.qml</file>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would name those files ProcessingParameterWidgetBoolean.qml, ProcessingParameterWidgetEnum.qml, ... to find them easier when searching

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to stick to what we do for the feature form editor widgets which also rely on type name without adding a prefix.

@domi4484
Copy link
Member

domi4484 commented Aug 7, 2024

Now I also tested on my phone, very cool!

@nirvn nirvn merged commit 6e9aeda into master Aug 9, 2024
23 checks passed
@nirvn nirvn deleted the in_place_buffer branch August 9, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants