Skip to content
Permalink
Browse files

Merge pull request #4682 from nyalldawson/processing_pt3

Processing rebuilding...
  • Loading branch information
nyalldawson committed Jun 6, 2017
2 parents 2b0af00 + 1d2e54d commit 72f95e6f1ac59298e67ecb37f437902e0430ae7d
Showing with 1,546 additions and 628 deletions.
  1. +29 −0 python/core/processing/qgsprocessingalgorithm.sip
  2. +43 −0 python/core/processing/qgsprocessingoutputs.sip
  3. +99 −11 python/core/processing/qgsprocessingparameters.sip
  4. +8 −0 python/core/qgsexpressioncontext.sip
  5. +45 −38 python/plugins/processing/algs/qgis/AddTableField.py
  6. +20 −11 python/plugins/processing/algs/qgis/Aspect.py
  7. +34 −26 python/plugins/processing/algs/qgis/AutoincrementalField.py
  8. +28 −22 python/plugins/processing/algs/qgis/BarPlot.py
  9. +1 −1 python/plugins/processing/algs/qgis/BasicStatistics.py
  10. +1 −1 python/plugins/processing/algs/qgis/BasicStatisticsNumbers.py
  11. +1 −1 python/plugins/processing/algs/qgis/BasicStatisticsStrings.py
  12. +1 −1 python/plugins/processing/algs/qgis/BoxPlot.py
  13. +1 −1 python/plugins/processing/algs/qgis/Centroids.py
  14. +1 −1 python/plugins/processing/algs/qgis/CheckValidity.py
  15. +30 −21 python/plugins/processing/algs/qgis/Clip.py
  16. +1 −1 python/plugins/processing/algs/qgis/ConcaveHull.py
  17. +1 −1 python/plugins/processing/algs/qgis/ConvexHull.py
  18. +1 −1 python/plugins/processing/algs/qgis/CreateAttributeIndex.py
  19. +1 −1 python/plugins/processing/algs/qgis/CreateConstantRaster.py
  20. +1 −1 python/plugins/processing/algs/qgis/Datasources2Vrt.py
  21. +1 −1 python/plugins/processing/algs/qgis/DefineProjection.py
  22. +1 −1 python/plugins/processing/algs/qgis/Delaunay.py
  23. +26 −18 python/plugins/processing/algs/qgis/DeleteColumn.py
  24. +1 −1 python/plugins/processing/algs/qgis/DeleteDuplicateGeometries.py
  25. +1 −1 python/plugins/processing/algs/qgis/DeleteHoles.py
  26. +1 −1 python/plugins/processing/algs/qgis/DensifyGeometries.py
  27. +1 −1 python/plugins/processing/algs/qgis/DensifyGeometriesInterval.py
  28. +1 −1 python/plugins/processing/algs/qgis/Difference.py
  29. +1 −1 python/plugins/processing/algs/qgis/Dissolve.py
  30. +1 −1 python/plugins/processing/algs/qgis/DropGeometry.py
  31. +1 −1 python/plugins/processing/algs/qgis/EliminateSelection.py
  32. +1 −1 python/plugins/processing/algs/qgis/EquivalentNumField.py
  33. +1 −1 python/plugins/processing/algs/qgis/ExecuteSQL.py
  34. +1 −1 python/plugins/processing/algs/qgis/Explode.py
  35. +1 −1 python/plugins/processing/algs/qgis/ExportGeometryInfo.py
  36. +1 −1 python/plugins/processing/algs/qgis/ExtendLines.py
  37. +1 −1 python/plugins/processing/algs/qgis/ExtentFromLayer.py
  38. +1 −1 python/plugins/processing/algs/qgis/ExtractByAttribute.py
  39. +1 −1 python/plugins/processing/algs/qgis/ExtractByExpression.py
  40. +1 −1 python/plugins/processing/algs/qgis/ExtractByLocation.py
  41. +1 −1 python/plugins/processing/algs/qgis/ExtractNodes.py
  42. +1 −1 python/plugins/processing/algs/qgis/ExtractSpecificNodes.py
  43. +1 −1 python/plugins/processing/algs/qgis/FieldPyculator.py
  44. +1 −1 python/plugins/processing/algs/qgis/FieldsCalculator.py
  45. +1 −1 python/plugins/processing/algs/qgis/FieldsMapper.py
  46. +1 −1 python/plugins/processing/algs/qgis/FindProjection.py
  47. +1 −1 python/plugins/processing/algs/qgis/FixGeometry.py
  48. +1 −1 python/plugins/processing/algs/qgis/FixedDistanceBuffer.py
  49. +1 −1 python/plugins/processing/algs/qgis/GeometryByExpression.py
  50. +1 −1 python/plugins/processing/algs/qgis/GeometryConvert.py
  51. +1 −1 python/plugins/processing/algs/qgis/GridLine.py
  52. +1 −1 python/plugins/processing/algs/qgis/GridPolygon.py
  53. +1 −1 python/plugins/processing/algs/qgis/Gridify.py
  54. +1 −1 python/plugins/processing/algs/qgis/Heatmap.py
  55. +1 −1 python/plugins/processing/algs/qgis/Hillshade.py
  56. +1 −1 python/plugins/processing/algs/qgis/HubDistanceLines.py
  57. +1 −1 python/plugins/processing/algs/qgis/HubDistancePoints.py
  58. +1 −1 python/plugins/processing/algs/qgis/HubLines.py
  59. +1 −1 python/plugins/processing/algs/qgis/HypsometricCurves.py
  60. +1 −1 python/plugins/processing/algs/qgis/IdwInterpolation.py
  61. +1 −1 python/plugins/processing/algs/qgis/ImportIntoPostGIS.py
  62. +1 −1 python/plugins/processing/algs/qgis/ImportIntoSpatialite.py
  63. +1 −1 python/plugins/processing/algs/qgis/Intersection.py
  64. +1 −1 python/plugins/processing/algs/qgis/JoinAttributes.py
  65. +1 −1 python/plugins/processing/algs/qgis/LinesIntersection.py
  66. +1 −1 python/plugins/processing/algs/qgis/LinesToPolygons.py
  67. +1 −1 python/plugins/processing/algs/qgis/MeanAndStdDevPlot.py
  68. +1 −1 python/plugins/processing/algs/qgis/MeanCoords.py
  69. +1 −1 python/plugins/processing/algs/qgis/Merge.py
  70. +1 −1 python/plugins/processing/algs/qgis/MergeLines.py
  71. +1 −1 python/plugins/processing/algs/qgis/MultipartToSingleparts.py
  72. +1 −1 python/plugins/processing/algs/qgis/NearestNeighbourAnalysis.py
  73. +1 −1 python/plugins/processing/algs/qgis/OffsetLine.py
  74. +1 −1 python/plugins/processing/algs/qgis/OrientedMinimumBoundingBox.py
  75. +1 −1 python/plugins/processing/algs/qgis/Orthogonalize.py
  76. +1 −1 python/plugins/processing/algs/qgis/PointDistance.py
  77. +1 −1 python/plugins/processing/algs/qgis/PointOnSurface.py
  78. +1 −1 python/plugins/processing/algs/qgis/PointsAlongGeometry.py
  79. +1 −1 python/plugins/processing/algs/qgis/PointsDisplacement.py
  80. +1 −1 python/plugins/processing/algs/qgis/PointsFromLines.py
  81. +1 −1 python/plugins/processing/algs/qgis/PointsFromPolygons.py
  82. +1 −1 python/plugins/processing/algs/qgis/PointsInPolygon.py
  83. +1 −1 python/plugins/processing/algs/qgis/PointsInPolygonUnique.py
  84. +1 −1 python/plugins/processing/algs/qgis/PointsInPolygonWeighted.py
  85. +1 −1 python/plugins/processing/algs/qgis/PointsLayerFromTable.py
  86. +1 −1 python/plugins/processing/algs/qgis/PointsToPaths.py
  87. +1 −1 python/plugins/processing/algs/qgis/PolarPlot.py
  88. +1 −1 python/plugins/processing/algs/qgis/PoleOfInaccessibility.py
  89. +1 −1 python/plugins/processing/algs/qgis/PolygonCentroids.py
  90. +1 −1 python/plugins/processing/algs/qgis/Polygonize.py
  91. +1 −1 python/plugins/processing/algs/qgis/PolygonsToLines.py
  92. +1 −1 python/plugins/processing/algs/qgis/PostGISExecuteSQL.py
  93. +26 −19 python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py
  94. +1 −1 python/plugins/processing/algs/qgis/RandomExtract.py
  95. +1 −1 python/plugins/processing/algs/qgis/RandomExtractWithinSubsets.py
  96. +1 −1 python/plugins/processing/algs/qgis/RandomPointsAlongLines.py
  97. +1 −1 python/plugins/processing/algs/qgis/RandomPointsExtent.py
  98. +1 −1 python/plugins/processing/algs/qgis/RandomPointsLayer.py
  99. +1 −1 python/plugins/processing/algs/qgis/RandomPointsPolygonsFixed.py
  100. +1 −1 python/plugins/processing/algs/qgis/RandomPointsPolygonsVariable.py
  101. +1 −1 python/plugins/processing/algs/qgis/RandomSelection.py
  102. +1 −1 python/plugins/processing/algs/qgis/RandomSelectionWithinSubsets.py
  103. +1 −1 python/plugins/processing/algs/qgis/RasterCalculator.py
  104. +1 −1 python/plugins/processing/algs/qgis/RasterLayerHistogram.py
  105. +1 −1 python/plugins/processing/algs/qgis/RasterLayerStatistics.py
  106. +1 −1 python/plugins/processing/algs/qgis/RectanglesOvalsDiamondsFixed.py
  107. +1 −1 python/plugins/processing/algs/qgis/RectanglesOvalsDiamondsVariable.py
  108. +1 −1 python/plugins/processing/algs/qgis/RegularPoints.py
  109. +1 −1 python/plugins/processing/algs/qgis/Relief.py
  110. +1 −1 python/plugins/processing/algs/qgis/RemoveNullGeometry.py
  111. +1 −1 python/plugins/processing/algs/qgis/ReprojectLayer.py
  112. +1 −1 python/plugins/processing/algs/qgis/ReverseLineDirection.py
  113. +1 −1 python/plugins/processing/algs/qgis/Ruggedness.py
  114. +1 −1 python/plugins/processing/algs/qgis/SaveSelectedFeatures.py
  115. +1 −1 python/plugins/processing/algs/qgis/SelectByAttribute.py
  116. +1 −1 python/plugins/processing/algs/qgis/SelectByAttributeSum.py
  117. +1 −1 python/plugins/processing/algs/qgis/SelectByExpression.py
  118. +1 −1 python/plugins/processing/algs/qgis/SelectByLocation.py
  119. +1 −1 python/plugins/processing/algs/qgis/ServiceAreaFromLayer.py
  120. +1 −1 python/plugins/processing/algs/qgis/ServiceAreaFromPoint.py
  121. +1 −1 python/plugins/processing/algs/qgis/SetRasterStyle.py
  122. +1 −1 python/plugins/processing/algs/qgis/SetVectorStyle.py
  123. +1 −1 python/plugins/processing/algs/qgis/ShortestPathLayerToPoint.py
  124. +1 −1 python/plugins/processing/algs/qgis/ShortestPathPointToLayer.py
  125. +1 −1 python/plugins/processing/algs/qgis/ShortestPathPointToPoint.py
  126. +1 −1 python/plugins/processing/algs/qgis/SimplifyGeometries.py
  127. +1 −1 python/plugins/processing/algs/qgis/SinglePartsToMultiparts.py
  128. +1 −1 python/plugins/processing/algs/qgis/SingleSidedBuffer.py
  129. +1 −1 python/plugins/processing/algs/qgis/Slope.py
  130. +1 −1 python/plugins/processing/algs/qgis/Smooth.py
  131. +1 −1 python/plugins/processing/algs/qgis/SnapGeometries.py
  132. +1 −1 python/plugins/processing/algs/qgis/SpatialIndex.py
  133. +1 −1 python/plugins/processing/algs/qgis/SpatialJoin.py
  134. +1 −1 python/plugins/processing/algs/qgis/SpatialiteExecuteSQL.py
  135. +1 −1 python/plugins/processing/algs/qgis/SplitLinesWithLines.py
  136. +1 −1 python/plugins/processing/algs/qgis/SplitWithLines.py
  137. +1 −1 python/plugins/processing/algs/qgis/StatisticsByCategories.py
  138. +1 −1 python/plugins/processing/algs/qgis/SumLines.py
  139. +1 −1 python/plugins/processing/algs/qgis/SymmetricalDifference.py
  140. +1 −1 python/plugins/processing/algs/qgis/TextToFloat.py
  141. +1 −1 python/plugins/processing/algs/qgis/TinInterpolation.py
  142. +1 −1 python/plugins/processing/algs/qgis/TopoColors.py
  143. +1 −1 python/plugins/processing/algs/qgis/Translate.py
  144. +1 −1 python/plugins/processing/algs/qgis/TruncateTable.py
  145. +1 −1 python/plugins/processing/algs/qgis/Union.py
  146. +1 −1 python/plugins/processing/algs/qgis/UniqueValues.py
  147. +1 −1 python/plugins/processing/algs/qgis/VariableDistanceBuffer.py
  148. +1 −1 python/plugins/processing/algs/qgis/VectorGridLines.py
  149. +1 −1 python/plugins/processing/algs/qgis/VectorGridPolygons.py
  150. +1 −1 python/plugins/processing/algs/qgis/VectorLayerHistogram.py
  151. +1 −1 python/plugins/processing/algs/qgis/VectorLayerScatterplot.py
  152. +1 −1 python/plugins/processing/algs/qgis/VectorLayerScatterplot3D.py
  153. +1 −1 python/plugins/processing/algs/qgis/VectorSplit.py
  154. +1 −1 python/plugins/processing/algs/qgis/VoronoiPolygons.py
  155. +1 −1 python/plugins/processing/algs/qgis/ZonalStatistics.py
  156. +1 −1 python/plugins/processing/algs/qgis/ZonalStatisticsQgis.py
  157. +0 −9 python/plugins/processing/core/GeoAlgorithm.py
  158. +0 −30 python/plugins/processing/core/parameters.py
  159. +12 −7 python/plugins/processing/gui/AlgorithmDialog.py
  160. +3 −0 python/plugins/processing/gui/AlgorithmDialogBase.py
  161. +29 −20 python/plugins/processing/gui/DestinationSelectionPanel.py
  162. +2 −2 python/plugins/processing/gui/ParameterGuiUtils.py
  163. +3 −3 python/plugins/processing/gui/ParametersPanel.py
  164. +1 −1 python/plugins/processing/gui/Postprocessing.py
  165. +17 −34 python/plugins/processing/gui/wrappers.py
  166. +146 −146 python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
  167. +47 −6 python/plugins/processing/ui/DlgAlgorithmBase.ui
  168. +11 −0 resources/function_help/json/parameter
  169. +3 −0 src/core/expression/qgsexpression.cpp
  170. +4 −0 src/core/processing/qgsnativealgorithms.cpp
  171. +38 −1 src/core/processing/qgsprocessingalgorithm.cpp
  172. +25 −0 src/core/processing/qgsprocessingalgorithm.h
  173. +10 −0 src/core/processing/qgsprocessingoutputs.cpp
  174. +39 −0 src/core/processing/qgsprocessingoutputs.h
  175. +250 −11 src/core/processing/qgsprocessingparameters.cpp
  176. +94 −13 src/core/processing/qgsprocessingparameters.h
  177. +26 −25 src/core/processing/qgsprocessingutils.cpp
  178. +1 −1 src/core/qgsapplication.cpp
  179. +44 −0 src/core/qgsexpressioncontext.cpp
  180. +9 −0 src/core/qgsexpressioncontext.h
  181. +199 −8 tests/src/core/testqgsprocessing.cpp
@@ -28,6 +28,7 @@ class QgsProcessingAlgorithm
FlagHideFromToolbox,
FlagHideFromModeler,
FlagSupportsBatch,
FlagCanCancel,
FlagDeprecated,
};
typedef QFlags<QgsProcessingAlgorithm::Flag> Flags;
@@ -128,6 +129,7 @@ class QgsProcessingAlgorithm
virtual Flags flags() const;
%Docstring
Returns the flags indicating how and when the algorithm operates and should be exposed to users.
Default flags are FlagSupportsBatch and FlagCanCancel.
:rtype: Flags
%End

@@ -205,6 +207,12 @@ class QgsProcessingAlgorithm
:rtype: QgsProcessingOutputDefinition
%End

bool hasHtmlOutputs() const;
%Docstring
Returns true if this algorithm generates HTML outputs.
:rtype: bool
%End

QVariantMap run( const QVariantMap &parameters,
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) const;
%Docstring
@@ -228,6 +236,15 @@ class QgsProcessingAlgorithm
:rtype: QWidget
%End

QgsExpressionContext createExpressionContext( const QVariantMap &parameters,
QgsProcessingContext &context ) const;
%Docstring
Creates an expression context relating to the algorithm. This can be called by algorithms
to create a new expression context ready for evaluating expressions within the algorithm.
:rtype: QgsExpressionContext
%End


protected:

bool addParameter( QgsProcessingParameterDefinition *parameterDefinition /Transfer/ );
@@ -357,6 +374,18 @@ class QgsProcessingAlgorithm
:rtype: QgsRasterLayer
%End

QString parameterAsRasterOutputLayer( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
%Docstring
Evaluates the parameter with matching ``name`` to a raster output layer destination.
:rtype: str
%End

QString parameterAsFileOutput( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
%Docstring
Evaluates the parameter with matching ``name`` to a file based output destination.
:rtype: str
%End

QgsVectorLayer *parameterAsVectorLayer( const QVariantMap &parameters, const QString &name, QgsProcessingContext &context ) const;
%Docstring
Evaluates the parameter with matching ``name`` to a vector layer.
@@ -30,6 +30,10 @@ class QgsProcessingOutputDefinition
%ConvertToSubClassCode
if ( sipCpp->type() == "outputVector" )
sipType = sipType_QgsProcessingOutputVectorLayer;
else if ( sipCpp->type() == "outputRaster" )
sipType = sipType_QgsProcessingOutputRasterLayer;
else if ( sipCpp->type() == "outputHtml" )
sipType = sipType_QgsProcessingOutputHtml;
%End
public:

@@ -118,6 +122,45 @@ class QgsProcessingOutputVectorLayer : QgsProcessingOutputDefinition

};

class QgsProcessingOutputRasterLayer : QgsProcessingOutputDefinition
{
%Docstring
A raster layer output for processing algorithms.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsprocessingoutputs.h"
%End
public:

QgsProcessingOutputRasterLayer( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputRasterLayer.
%End

virtual QString type() const;
};

class QgsProcessingOutputHtml : QgsProcessingOutputDefinition
{
%Docstring
A HTML file output for processing algorithms.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsprocessingoutputs.h"
%End
public:

QgsProcessingOutputHtml( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputHtml.
%End

virtual QString type() const;
};



@@ -56,11 +56,11 @@ Allows direct construction of QVariants.



class QgsProcessingFeatureSinkDefinition
class QgsProcessingOutputLayerDefinition
{
%Docstring

Encapsulates settings relating to a feature sink input to a processing algorithm.
Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm.

.. versionadded:: 3.0
%End
@@ -70,35 +70,35 @@ class QgsProcessingFeatureSinkDefinition
%End
public:

QgsProcessingFeatureSinkDefinition( const QString &sink = QString(), QgsProject *destinationProject = 0 );
QgsProcessingOutputLayerDefinition( const QString &sink = QString(), QgsProject *destinationProject = 0 );
%Docstring
Constructor for QgsProcessingFeatureSinkDefinition, accepting a static string sink.
Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string.
The ``destinationProject`` parameter can be set to a QgsProject instance in which
to automatically load the resulting sink after completing processing.
to automatically load the resulting sink/layer after completing processing.
%End

QgsProcessingFeatureSinkDefinition( const QgsProperty &sink, QgsProject *destinationProject = 0 );
QgsProcessingOutputLayerDefinition( const QgsProperty &sink, QgsProject *destinationProject = 0 );
%Docstring
Constructor for QgsProcessingFeatureSinkDefinition, accepting a QgsProperty sink.
Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer.
The ``destinationProject`` parameter can be set to a QgsProject instance in which
to automatically load the resulting sink after completing processing.
to automatically load the resulting sink/layer after completing processing.
%End

QgsProperty sink;
%Docstring
Sink definition. Usually a static property set to the destination file name for the sink's layer.
Sink/layer definition. Usually a static property set to the destination file name for the sink's layer.
%End

QgsProject *destinationProject;
%Docstring
Destination project. Can be set to a QgsProject instance in which
to automatically load the resulting sink after completing processing.
to automatically load the resulting sink/layer after completing processing.
The default behavior is not to load the result into any project (None).
%End

QVariantMap createOptions;
%Docstring
Map of optional sink creation options, which
Map of optional sink/layer creation options, which
are passed to the underlying provider when creating new layers. Known options also
include 'fileEncoding', which is used to specify a file encoding to use for created
files.
@@ -171,6 +171,10 @@ class QgsProcessingParameterDefinition
sipType = sipType_QgsProcessingParameterFeatureSource;
else if ( sipCpp->type() == "sink" )
sipType = sipType_QgsProcessingParameterFeatureSink;
else if ( sipCpp->type() == "rasterOut" )
sipType = sipType_QgsProcessingParameterRasterOutput;
else if ( sipCpp->type() == "fileOut" )
sipType = sipType_QgsProcessingParameterFileOutput;
%End
public:

@@ -419,6 +423,18 @@ class QgsProcessingParameters
:rtype: QgsRasterLayer
%End

static QString parameterAsRasterOutputLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
%Docstring
Evaluates the parameter with matching ``definition`` to a raster output layer destination.
:rtype: str
%End

static QString parameterAsFileOutput( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
%Docstring
Evaluates the parameter with matching ``definition`` to a file based output destination.
:rtype: str
%End

static QgsVectorLayer *parameterAsVectorLayer( const QgsProcessingParameterDefinition *definition, const QVariantMap &parameters, QgsProcessingContext &context );
%Docstring
Evaluates the parameter with matching ``definition`` to a vector layer.
@@ -1206,6 +1222,13 @@ class QgsProcessingParameterFeatureSink : QgsProcessingParameterDefinition
:rtype: QgsProcessingParameterDefinition.LayerType
%End

bool hasGeometry() const;
%Docstring
Returns true if sink is likely to include geometries. In cases were presence of geometry
cannot be reliably determined in advance, this method will default to returning true.
:rtype: bool
%End

void setDataType( QgsProcessingParameterDefinition::LayerType type );
%Docstring
Sets the layer ``type`` for the sinks associated with the parameter.
@@ -1214,6 +1237,71 @@ class QgsProcessingParameterFeatureSink : QgsProcessingParameterDefinition

};

class QgsProcessingParameterRasterOutput : QgsProcessingParameterDefinition
{
%Docstring
A raster layer output parameter.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsprocessingparameters.h"
%End
public:

QgsProcessingParameterRasterOutput( const QString &name, const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
bool optional = false );
%Docstring
Constructor for QgsProcessingParameterRasterOutput.
%End

virtual QString type() const;
virtual bool isDestination() const;
virtual bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = 0 ) const;

};

class QgsProcessingParameterFileOutput : QgsProcessingParameterDefinition
{
%Docstring
A generic file based output parameter.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsprocessingparameters.h"
%End
public:

QgsProcessingParameterFileOutput( const QString &name, const QString &description = QString(),
const QString &fileFilter = QString(),
const QVariant &defaultValue = QVariant(),
bool optional = false );
%Docstring
Constructor for QgsProcessingParameterFileOutput.
%End

virtual QString type() const;
virtual bool isDestination() const;
virtual bool checkValueIsAcceptable( const QVariant &input, QgsProcessingContext *context = 0 ) const;


QString fileFilter() const;
%Docstring
Returns the file filter string for files compatible with this output.
.. seealso:: setFileFilter()
:rtype: str
%End

void setFileFilter( const QString &filter );
%Docstring
Sets the file ``filter`` string for files compatible with this output.
.. seealso:: fileFilter()
%End

};



/************************************************************************
@@ -866,6 +866,14 @@ class QgsExpressionContextUtils
:rtype: QgsExpressionContext
%End

static QgsExpressionContextScope *processingAlgorithmScope( const QgsProcessingAlgorithm *algorithm, const QVariantMap &parameters, QgsProcessingContext &context ) /Factory/;
%Docstring
Creates a new scope which contains variables and functions relating to a processing ``algorithm``,
when used with the specified ``parameters`` and ``context``.
For instance, algorithm name and parameter functions.
:rtype: QgsExpressionContextScope
%End

static void registerContextFunctions();
%Docstring
Registers all known core functions provided by QgsExpressionContextScope objects.

0 comments on commit 72f95e6

Please sign in to comment.
You can’t perform that action at this time.