-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This somewhat changes the meaning of outputs from processing 2.x. In 2.x processing outputs were used both as a method of specifying inputs to algorithms (file paths to destination layers created by the algorithm) AND pure outputs (such as statistics calculated by the algorithm). This is now split. The old input-type-outputs (destination layers) are now input parameters (since the parameter value IS an input to the algorithm). To differentiate them from parameters indicating pure input layers a new "isDestination()" method was added to QgsProcessingParameterDefinition. Output definitions are now purely indications of values CREATED by the algorithms. Suitable candidates are the existing calculated stats and actual file path/URI of any layers created by the algorithm. Moving forward we should ensure all algorithms output as much useful information as possible - e.g. number of features processed, number of skipped features, count null geometries encountered, etc...
- Loading branch information
1 parent
fac8ca4
commit fb81176
Showing
20 changed files
with
600 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/processing/qgsprocessingoutputs.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsProcessingOutputDefinition | ||
{ | ||
%Docstring | ||
|
||
Base class for the definition of processing outputs. | ||
|
||
Output definitions encapsulate the properties regarding the outputs from algorithms, such | ||
as generated layers or calculated values. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsprocessingoutputs.h" | ||
%End | ||
public: | ||
|
||
QgsProcessingOutputDefinition( const QString &name, const QString &description = QString() ); | ||
%Docstring | ||
Constructor for QgsProcessingOutputDefinition. | ||
%End | ||
|
||
virtual ~QgsProcessingOutputDefinition(); | ||
|
||
virtual QString type() const = 0; | ||
%Docstring | ||
Unique output type name. | ||
:rtype: str | ||
%End | ||
|
||
QString name() const; | ||
%Docstring | ||
Returns the name of the output. This is the internal identifier by which | ||
algorithms access this output. | ||
@see setName() | ||
:rtype: str | ||
%End | ||
|
||
void setName( const QString &name ); | ||
%Docstring | ||
Sets the ``name`` of the output. This is the internal identifier by which | ||
algorithms access this output. | ||
@see name() | ||
%End | ||
|
||
QString description() const; | ||
%Docstring | ||
Returns the description for the output. This is the user-visible string | ||
used to identify this output. | ||
@see setDescription() | ||
:rtype: str | ||
%End | ||
|
||
void setDescription( const QString &description ); | ||
%Docstring | ||
Sets the ``description`` for the output. This is the user-visible string | ||
used to identify this output. | ||
@see description() | ||
%End | ||
|
||
protected: | ||
|
||
|
||
|
||
}; | ||
|
||
typedef QList< const QgsProcessingOutputDefinition * > QgsProcessingOutputDefinitions; | ||
|
||
class QgsProcessingOutputVectorLayer : QgsProcessingOutputDefinition | ||
{ | ||
%Docstring | ||
A vector layer output for processing algorithms. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsprocessingoutputs.h" | ||
%End | ||
public: | ||
|
||
QgsProcessingOutputVectorLayer( const QString &name, const QString &description = QString(), QgsProcessingParameterDefinition::LayerType type = QgsProcessingParameterDefinition::TypeVectorAny ); | ||
%Docstring | ||
Constructor for QgsProcessingOutputVectorLayer. | ||
%End | ||
|
||
virtual QString type() const; | ||
|
||
QgsProcessingParameterDefinition::LayerType dataType() const; | ||
%Docstring | ||
Returns the layer type for the output layer. | ||
.. seealso:: setDataType() | ||
:rtype: QgsProcessingParameterDefinition.LayerType | ||
%End | ||
|
||
void setDataType( QgsProcessingParameterDefinition::LayerType type ); | ||
%Docstring | ||
Sets the layer ``type`` for the output layer. | ||
.. seealso:: dataType() | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/core/processing/qgsprocessingoutputs.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.