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

Porting processing model algorithm to C++, pt 1 #4729

Merged
merged 10 commits into from
Jun 20, 2017

Conversation

nyalldawson
Copy link
Collaborator

This PR takes the first step in porting the processing model algorithm across to c++.

The python design of model algorithm is fine, but suffers from confusing naming. So this is pretty much a direct port of the same design over to c++. The changes include

  • all component algorithms making up the model are referred to as "child" algorithms in the API
  • instead of separate classes used to handle ValueFromInput/ValueFromOutput/etc, there's a single class QgsProcessingModelAlgorithm::ChildParameterSource which handles all possible source types for input parameters to child algorithms. The actual behaviour is specified via an enum (StaticValue /ModelParameter /ChildOutput ). This will be easy to extend in future with other possible child algorithm parameter input types, such as a "calculate expression result before running child alg" type (refs QEP 84: Processing ModelerParametersDialog widget wrapper QGIS-Enhancement-Proposals#84)
  • model components (e.g. the model's input parameters, child algorithms, and model outputs) now use a common base class (QgsProcessingModelAlgorithm::Component) which handles the graphical modeler behaviour of the component.

It's not fully functional yet - designing models should work without issue, but there's no support for loading/saving models, or running them....

At this stage I'm after feedback on the QgsProcessingModelAlgorithm API

@nyalldawson nyalldawson merged commit 3615a7d into qgis:master Jun 20, 2017
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.

1 participant