QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Encapsulates settings relating to a feature source input to a processing algorithm. More...
#include <qgsprocessingparameters.h>
Public Types | |
enum | Flag { FlagOverrideDefaultGeometryCheck = 1 << 0 , FlagCreateIndividualOutputPerInputFeature = 1 << 1 } |
Flags which control source behavior. More... | |
Public Member Functions | |
QgsProcessingFeatureSourceDefinition (const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, QgsProcessingFeatureSourceDefinition::Flags flags=QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck=QgsFeatureRequest::GeometryAbortOnInvalid) | |
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source. More... | |
QgsProcessingFeatureSourceDefinition (const QString &source=QString(), bool selectedFeaturesOnly=false, long long featureLimit=-1, QgsProcessingFeatureSourceDefinition::Flags flags=QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck=QgsFeatureRequest::GeometryAbortOnInvalid) | |
Constructor for QgsProcessingFeatureSourceDefinition, accepting a static string source. More... | |
bool | loadVariant (const QVariantMap &map) |
Loads this source definition from a QVariantMap, wrapped in a QVariant. More... | |
operator QVariant () const | |
Allows direct construction of QVariants. More... | |
bool | operator!= (const QgsProcessingFeatureSourceDefinition &other) const |
bool | operator== (const QgsProcessingFeatureSourceDefinition &other) const |
QVariant | toVariant () const |
Saves this source definition to a QVariantMap, wrapped in a QVariant. More... | |
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. More... | |
Flags | flags = Flags() |
Flags which dictate source behavior. More... | |
QgsFeatureRequest::InvalidGeometryCheck | geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid |
Geometry check method to apply to this source. More... | |
bool | selectedFeaturesOnly |
true if only selected features in the source should be used by algorithms. More... | |
QgsProperty | source |
Source definition. More... | |
Encapsulates settings relating to a feature source input to a processing algorithm.
Definition at line 55 of file qgsprocessingparameters.h.
Flags which control source behavior.
Enumerator | |
---|---|
FlagOverrideDefaultGeometryCheck | If set, the default geometry check method (as dictated by QgsProcessingContext) will be overridden for this source. |
FlagCreateIndividualOutputPerInputFeature | If set, every feature processed from this source will be placed into its own individually created output destination. Support for this flag depends on how an algorithm is executed. |
Definition at line 63 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.
The flags argument can be used to specify flags which dictate the source behavior.
If the QgsProcessingFeatureSourceDefinition::Flag::FlagOverrideDefaultGeometryCheck 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 83 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.
The flags argument can be used to specify flags which dictate the source behavior.
If the QgsProcessingFeatureSourceDefinition::Flag::FlagOverrideDefaultGeometryCheck 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 105 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 54 of file qgsprocessingparameters.cpp.
|
inline |
Allows direct construction of QVariants.
Definition at line 180 of file qgsprocessingparameters.h.
|
inline |
Definition at line 174 of file qgsprocessingparameters.h.
|
inline |
Definition at line 165 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 43 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 130 of file qgsprocessingparameters.h.
Flags QgsProcessingFeatureSourceDefinition::flags = Flags() |
Flags which dictate source behavior.
Definition at line 137 of file qgsprocessingparameters.h.
QgsFeatureRequest::InvalidGeometryCheck QgsProcessingFeatureSourceDefinition::geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid |
Geometry check method to apply to this source.
This setting is only utilized if the QgsProcessingFeatureSourceDefinition::Flag::FlagCreateIndividualOutputPerInputFeature is set in QgsProcessingFeatureSourceDefinition::flags.
Definition at line 147 of file qgsprocessingparameters.h.
bool QgsProcessingFeatureSourceDefinition::selectedFeaturesOnly |
true
if only selected features in the source should be used by algorithms.
Definition at line 122 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 117 of file qgsprocessingparameters.h.