QGIS API Documentation 3.39.0-Master (bca3cdb6021)
|
Encapsulates settings relating to a feature source input to a processing algorithm. More...
#include <qgsprocessingparameters.h>
Public Attributes | |
long long | featureLimit = -1 |
If set to a value > 0, places a limit on the maximum number of features which will be read from the source. | |
QString | filterExpression |
Optional expression filter to use for filtering features which will be read from the source. | |
Qgis::ProcessingFeatureSourceDefinitionFlags | flags |
Flags which dictate source behavior. | |
Qgis::InvalidGeometryCheck | geometryCheck = Qgis::InvalidGeometryCheck::AbortOnInvalid |
Geometry check method to apply to this source. | |
bool | selectedFeaturesOnly |
true if only selected features in the source should be used by algorithms. | |
QgsProperty | source |
Source definition. | |
Encapsulates settings relating to a feature source input to a processing algorithm.
Definition at line 55 of file qgsprocessingparameters.h.
|
inline |
Constructor for QgsProcessingFeatureSourceDefinition, accepting a static string source.
If selectedFeaturesOnly is true
, then only selected features from the source will be used.
The optional featureLimit can be set to a value > 0 to place a hard limit on the maximum number of features which will be read from the source.
Since QGIS 3.32, the optional filterExpression argument can be used to specify a expression to use to filter the features read from the source.
The flags argument can be used to specify flags which dictate the source behavior.
If the Qgis::ProcessingFeatureSourceDefinitionFlag::OverrideDefaultGeometryCheck is set in flags, then the value of geometryCheck will override the default geometry check method (as dictated by QgsProcessingContext) for this source.
Definition at line 75 of file qgsprocessingparameters.h.
|
inline |
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.
If selectedFeaturesOnly is true
, then only selected features from the source will be used.
The optional featureLimit can be set to a value > 0 to place a hard limit on the maximum number of features which will be read from the source.
Since QGIS 3.32, the optional filterExpression argument can be used to specify a expression to use to filter the features read from the source.
The flags argument can be used to specify flags which dictate the source behavior.
If the Qgis::ProcessingFeatureSourceDefinitionFlag::OverrideDefaultGeometryCheck is set in flags, then the value of geometryCheck will override the default geometry check method (as dictated by QgsProcessingContext) for this source.
Definition at line 101 of file qgsprocessingparameters.h.
bool QgsProcessingFeatureSourceDefinition::loadVariant | ( | const QVariantMap & | map | ) |
Loads this source definition from a QVariantMap, wrapped in a QVariant.
You can use QgsXmlUtils::readVariant to load it from an XML document.
Definition at line 58 of file qgsprocessingparameters.cpp.
|
inline |
Allows direct construction of QVariants.
Definition at line 185 of file qgsprocessingparameters.h.
|
inline |
Definition at line 179 of file qgsprocessingparameters.h.
|
inline |
Definition at line 169 of file qgsprocessingparameters.h.
QVariant QgsProcessingFeatureSourceDefinition::toVariant | ( | ) | const |
Saves this source definition to a QVariantMap, wrapped in a QVariant.
You can use QgsXmlUtils::writeVariant to save it to an XML document.
Definition at line 46 of file qgsprocessingparameters.cpp.
long long QgsProcessingFeatureSourceDefinition::featureLimit = -1 |
If set to a value > 0, places a limit on the maximum number of features which will be read from the source.
Definition at line 127 of file qgsprocessingparameters.h.
QString QgsProcessingFeatureSourceDefinition::filterExpression |
Optional expression filter to use for filtering features which will be read from the source.
Definition at line 134 of file qgsprocessingparameters.h.
Qgis::ProcessingFeatureSourceDefinitionFlags QgsProcessingFeatureSourceDefinition::flags |
Flags which dictate source behavior.
Definition at line 141 of file qgsprocessingparameters.h.
Qgis::InvalidGeometryCheck QgsProcessingFeatureSourceDefinition::geometryCheck = Qgis::InvalidGeometryCheck::AbortOnInvalid |
Geometry check method to apply to this source.
This setting is only utilized if the Qgis::ProcessingFeatureSourceDefinitionFlag::OverrideDefaultGeometryCheck is set in QgsProcessingFeatureSourceDefinition::flags.
Definition at line 150 of file qgsprocessingparameters.h.
bool QgsProcessingFeatureSourceDefinition::selectedFeaturesOnly |
true
if only selected features in the source should be used by algorithms.
Definition at line 119 of file qgsprocessingparameters.h.
QgsProperty QgsProcessingFeatureSourceDefinition::source |
Source definition.
Usually a static property set to a source layer's ID or file name.
Definition at line 114 of file qgsprocessingparameters.h.