18#ifndef QGSPROCESSINGPARAMETERS_H
19#define QGSPROCESSINGPARAMETERS_H
66 FlagOverrideDefaultGeometryCheck = 1 << 0,
67 FlagCreateIndividualOutputPerInputFeature = 1 << 1,
69 Q_DECLARE_FLAGS( Flags, Flag )
90 , selectedFeaturesOnly( selectedFeaturesOnly )
91 , featureLimit( featureLimit )
92 , filterExpression( filterExpression )
94 , geometryCheck( geometryCheck )
116 , selectedFeaturesOnly( selectedFeaturesOnly )
117 , featureLimit( featureLimit )
118 , filterExpression( filterExpression )
120 , geometryCheck( geometryCheck )
139 long long featureLimit = -1;
153 Flags flags = Flags();
171 QVariant toVariant()
const;
179 bool loadVariant(
const QVariantMap &map );
184 return source == other.
source
188 && flags == other.
flags
194 return !( *
this == other );
198 operator QVariant()
const
200 return QVariant::fromValue( *
this );
228 , destinationProject( destinationProject )
238 , destinationProject( destinationProject )
301 QVariant toVariant()
const;
309 bool loadVariant(
const QVariantMap &map );
312 operator QVariant()
const
314 return QVariant::fromValue( *
this );
323 bool mUseRemapping =
false;
363 sipType = sipType_QgsProcessingParameterBoolean;
365 sipType = sipType_QgsProcessingParameterCrs;
367 sipType = sipType_QgsProcessingParameterMapLayer;
369 sipType = sipType_QgsProcessingParameterExtent;
371 sipType = sipType_QgsProcessingParameterPoint;
373 sipType = sipType_QgsProcessingParameterGeometry;
375 sipType = sipType_QgsProcessingParameterFile;
377 sipType = sipType_QgsProcessingParameterMatrix;
379 sipType = sipType_QgsProcessingParameterMultipleLayers;
381 sipType = sipType_QgsProcessingParameterNumber;
383 sipType = sipType_QgsProcessingParameterDistance;
385 sipType = sipType_QgsProcessingParameterDuration;
387 sipType = sipType_QgsProcessingParameterScale;
389 sipType = sipType_QgsProcessingParameterRange;
391 sipType = sipType_QgsProcessingParameterRasterLayer;
393 sipType = sipType_QgsProcessingParameterMeshLayer;
395 sipType = sipType_QgsProcessingParameterEnum;
397 sipType = sipType_QgsProcessingParameterString;
399 sipType = sipType_QgsProcessingParameterExpression;
401 sipType = sipType_QgsProcessingParameterAuthConfig;
403 sipType = sipType_QgsProcessingParameterVectorLayer;
405 sipType = sipType_QgsProcessingParameterField;
407 sipType = sipType_QgsProcessingParameterFeatureSource;
409 sipType = sipType_QgsProcessingParameterFeatureSink;
411 sipType = sipType_QgsProcessingParameterVectorDestination;
413 sipType = sipType_QgsProcessingParameterRasterDestination;
415 sipType = sipType_QgsProcessingParameterPointCloudDestination;
417 sipType = sipType_QgsProcessingParameterFileDestination;
419 sipType = sipType_QgsProcessingParameterFolderDestination;
421 sipType = sipType_QgsProcessingParameterBand;
423 sipType = sipType_QgsProcessingParameterLayout;
425 sipType = sipType_QgsProcessingParameterLayoutItem;
427 sipType = sipType_QgsProcessingParameterColor;
429 sipType = sipType_QgsProcessingParameterCoordinateOperation;
431 sipType = sipType_QgsProcessingParameterMapTheme;
433 sipType = sipType_QgsProcessingParameterDateTime;
435 sipType = sipType_QgsProcessingParameterProviderConnection;
437 sipType = sipType_QgsProcessingParameterDatabaseSchema;
439 sipType = sipType_QgsProcessingParameterDatabaseTable;
441 sipType = sipType_QgsProcessingParameterFieldMapping;
443 sipType = sipType_QgsProcessingParameterTinInputLayers;
445 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
447 sipType = sipType_QgsProcessingParameterDxfLayers;
449 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
451 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
453 sipType = sipType_QgsProcessingParameterPointCloudLayer;
455 sipType = sipType_QgsProcessingParameterAnnotationLayer;
457 sipType = sipType_QgsProcessingParameterPointCloudAttribute;
459 sipType = sipType_QgsProcessingParameterVectorTileDestination;
470 FlagAdvanced = 1 << 1,
472 FlagOptional = 1 << 3,
473 FlagIsModelOutput = 1 << 4,
475 Q_DECLARE_FLAGS( Flags, Flag )
481 bool optional =
false,
const QString &help = QString() );
493 virtual QString
type()
const = 0;
507 QString
name()
const {
return mName; }
514 void setName(
const QString &name ) { mName = name; }
528 void setDescription(
const QString &description ) { mDescription = description; }
539 QString
help()
const {
return mHelp; }
550 void setHelp(
const QString &help ) { mHelp = help; }
613 Flags
flags()
const {
return mFlags; }
628 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
637 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
650 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
687 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
693 virtual QString asScriptCode()
const;
711 virtual QVariantMap toVariantMap()
const;
718 virtual bool fromVariantMap(
const QVariantMap &map );
740 void setMetadata(
const QVariantMap &metadata ) { mMetadata = metadata; }
766 virtual QString toolTip()
const;
873 AllowMapLayerValues = 1 << 0,
875 Q_DECLARE_FLAGS( ValueAsStringFlags, ValueAsStringFlag )
888 QString valueAsStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool &ok, ValueAsStringFlags flags )
const;
896 QVariant valueAsJsonObjectPrivate(
const QVariant &value,
QgsProcessingContext &context, ValueAsStringFlags flags )
const;
924 bool mIsDynamic =
false;
976 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1183 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_FACTORY;
1206 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_THROW(
QgsProcessingException )
SIP_FACTORY;
1767 static QString descriptionFromName(
const QString &name );
1778 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1797 bool optional =
false );
1802 static QString
typeName() {
return QStringLiteral(
"boolean" ); }
1805 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1806 QString asScriptCode()
const override;
1827 QgsProcessingParameterCrs(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1828 bool optional =
false );
1833 static QString
typeName() {
return QStringLiteral(
"crs" ); }
1836 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1837 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1839 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1862 bool optional =
false );
1867 static QString
typeName() {
return QStringLiteral(
"extent" ); }
1870 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1871 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1873 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1896 QgsProcessingParameterPoint(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1897 bool optional =
false );
1902 static QString
typeName() {
return QStringLiteral(
"point" ); }
1905 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1906 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1932 QgsProcessingParameterGeometry(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
bool optional =
false,
const QList< int > &geometryTypes = QList< int >(),
bool allowMultipart =
true );
1937 static QString
typeName() {
return QStringLiteral(
"geometry" ); }
1940 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1941 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1942 QString asScriptCode()
const override;
1944 QVariantMap toVariantMap()
const override;
1945 bool fromVariantMap(
const QVariantMap &map )
override;
1980 QList<int> mGeomTypes;
1981 bool mAllowMultipart;
2009 QgsProcessingParameterFile(
const QString &name,
const QString &description = QString(), Behavior behavior = File,
const QString &extension = QString(),
const QVariant &defaultValue = QVariant(),
2010 bool optional =
false,
const QString &fileFilter = QString() );
2015 static QString
typeName() {
return QStringLiteral(
"file" ); }
2018 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2019 QString asScriptCode()
const override;
2021 QString createFileFilter()
const override;
2053 void setExtension(
const QString &extension );
2061 QString fileFilter()
const;
2072 void setFileFilter(
const QString &filter );
2074 QVariantMap toVariantMap()
const override;
2075 bool fromVariantMap(
const QVariantMap &map )
override;
2080 static QgsProcessingParameterFile *fromScriptCode(
const QString &name,
const QString &description,
bool isOptional,
const QString &definition, Behavior behavior = File )
SIP_FACTORY;
2084 Behavior mBehavior = File;
2086 QString mFileFilter;
2103 bool hasFixedNumberRows =
false,
const QStringList &headers = QStringList(),
2104 const QVariant &defaultValue = QVariant(),
2105 bool optional =
false );
2110 static QString
typeName() {
return QStringLiteral(
"matrix" ); }
2113 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2114 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2121 QStringList headers()
const;
2127 void setHeaders(
const QStringList &headers );
2135 int numberRows()
const;
2143 void setNumberRows(
int rows );
2150 bool hasFixedNumberRows()
const;
2157 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2159 QVariantMap toVariantMap()
const override;
2160 bool fromVariantMap(
const QVariantMap &map )
override;
2169 QStringList mHeaders;
2170 int mNumberRows = 3;
2171 bool mFixedNumberRows =
false;
2189 const QVariant &defaultValue = QVariant(),
2190 bool optional =
false );
2195 static QString
typeName() {
return QStringLiteral(
"multilayer" ); }
2198 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2199 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2201 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2202 QString asScriptCode()
const override;
2204 QString createFileFilter()
const override;
2223 int minimumNumberInputs()
const;
2230 void setMinimumNumberInputs(
int minimum );
2232 QVariantMap toVariantMap()
const override;
2233 bool fromVariantMap(
const QVariantMap &map )
override;
2243 int mMinimumNumberInputs = 0;
2280 Type type = Integer,
2281 const QVariant &defaultValue = QVariant(),
2282 bool optional =
false,
2283 double minValue = std::numeric_limits<double>::lowest() + 1,
2284 double maxValue = std::numeric_limits<double>::max()
2290 static QString
typeName() {
return QStringLiteral(
"number" ); }
2293 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2294 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2295 QString toolTip()
const override;
2302 double minimum()
const;
2308 void setMinimum(
double minimum );
2314 double maximum()
const;
2320 void setMaximum(
double maximum );
2326 Type dataType()
const;
2332 void setDataType( Type type );
2334 QVariantMap toVariantMap()
const override;
2335 bool fromVariantMap(
const QVariantMap &map )
override;
2344 double mMin = std::numeric_limits<double>::lowest() + 1;
2345 double mMax = std::numeric_limits<double>::max();
2346 Type mDataType = Integer;
2376 const QVariant &defaultValue = QVariant(),
2377 const QString &parentParameterName = QString(),
2378 bool optional =
false,
2379 double minValue = std::numeric_limits<double>::lowest() + 1,
2380 double maxValue = std::numeric_limits<double>::max() );
2385 static QString
typeName() {
return QStringLiteral(
"distance" ); }
2389 QString type() const override;
2390 QStringList dependsOnOtherParameters() const override;
2391 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2397 QString parentParameterName() const;
2403 void setParentParameterName( const QString &parentParameterName );
2411 Qgis::DistanceUnit defaultUnit()
const {
return mDefaultUnit; }
2421 QVariantMap toVariantMap()
const override;
2422 bool fromVariantMap(
const QVariantMap &map )
override;
2426 QString mParentParameterName;
2446 const QVariant &defaultValue = QVariant(),
2447 bool optional =
false,
2448 double minValue = std::numeric_limits<double>::lowest() + 1,
2449 double maxValue = std::numeric_limits<double>::max() );
2454 static QString
typeName() {
return QStringLiteral(
"duration" ); }
2458 QString type() const override;
2459 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2466 Qgis::TemporalUnit defaultUnit()
const {
return mDefaultUnit; }
2475 QVariantMap toVariantMap()
const override;
2476 bool fromVariantMap(
const QVariantMap &map )
override;
2502 const QVariant &defaultValue = QVariant(),
2503 bool optional =
false );
2508 static QString
typeName() {
return QStringLiteral(
"scale" ); }
2512 QString type() const override;
2513 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2537 const QVariant &defaultValue = QVariant(),
2538 bool optional =
false );
2543 static QString
typeName() {
return QStringLiteral(
"range" ); }
2546 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2547 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2562 QVariantMap toVariantMap()
const override;
2563 bool fromVariantMap(
const QVariantMap &map )
override;
2589 bool optional =
false );
2594 static QString
typeName() {
return QStringLiteral(
"raster" ); }
2597 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2598 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2600 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2601 QString createFileFilter()
const override;
2635 QgsProcessingParameterEnum(
const QString &name,
const QString &description = QString(),
const QStringList &options = QStringList(),
2636 bool allowMultiple =
false,
2637 const QVariant &defaultValue = QVariant(),
2638 bool optional =
false,
2639 bool usesStaticStrings =
false );
2644 static QString
typeName() {
return QStringLiteral(
"enum" ); }
2647 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2648 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2649 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
2650 QString asScriptCode()
const override;
2657 QStringList options()
const;
2663 void setOptions(
const QStringList &options );
2669 bool allowMultiple()
const;
2675 void setAllowMultiple(
bool allowMultiple );
2683 bool usesStaticStrings()
const;
2691 void setUsesStaticStrings(
bool usesStaticStrings );
2693 QVariantMap toVariantMap()
const override;
2694 bool fromVariantMap(
const QVariantMap &map )
override;
2703 QStringList mOptions;
2704 bool mAllowMultiple =
false;
2705 bool mUsesStaticStrings =
false;
2743 bool multiLine =
false,
2744 bool optional =
false );
2749 static QString
typeName() {
return QStringLiteral(
"string" ); }
2752 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2753 QString asScriptCode()
const override;
2760 bool multiLine()
const;
2766 void setMultiLine(
bool multiLine );
2768 QVariantMap toVariantMap()
const override;
2769 bool fromVariantMap(
const QVariantMap &map )
override;
2778 bool mMultiLine =
false;
2803 bool optional =
false );
2808 static QString
typeName() {
return QStringLiteral(
"authcfg" ); }
2811 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2812 QString asScriptCode()
const override;
2835 const QString &parentLayerParameterName = QString(),
2841 static QString
typeName() {
return QStringLiteral(
"expression" ); }
2844 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2845 QStringList dependsOnOtherParameters()
const override;
2852 QString parentLayerParameterName()
const;
2858 void setParentLayerParameterName(
const QString &parentLayerParameterName );
2876 QVariantMap toVariantMap()
const override;
2877 bool fromVariantMap(
const QVariantMap &map )
override;
2886 QString mParentLayerParameterName;
2910 QList< int > dataTypes()
const;
2916 void setDataTypes(
const QList< int > &types );
2939 const QString &description = QString(),
2940 const QList< int > &types = QList< int >(),
2941 const QVariant &defaultValue = QVariant(),
2942 bool optional =
false );
2947 static QString
typeName() {
return QStringLiteral(
"vector" ); }
2950 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2951 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2953 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2955 QString createFileFilter()
const override;
2957 QVariantMap toVariantMap()
const override;
2958 bool fromVariantMap(
const QVariantMap &map )
override;
2981 const QString &description = QString(),
2982 const QVariant &defaultValue = QVariant(),
2983 bool optional =
false );
2988 static QString
typeName() {
return QStringLiteral(
"mesh" ); }
2991 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2992 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2994 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2995 QString createFileFilter()
const override;
3017 bool optional =
false,
3018 const QList< int > &types = QList< int >() );
3023 static QString
typeName() {
return QStringLiteral(
"layer" ); }
3026 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3027 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3029 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3030 QString asScriptCode()
const override;
3032 QString createFileFilter()
const override;
3034 QVariantMap toVariantMap()
const override;
3035 bool fromVariantMap(
const QVariantMap &map )
override;
3066 QgsProcessingParameterField(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3067 const QString &parentLayerParameterName = QString(),
3068 DataType type = Any,
3069 bool allowMultiple =
false,
3070 bool optional =
false,
3071 bool defaultToAllFields =
false );
3076 static QString
typeName() {
return QStringLiteral(
"field" ); }
3079 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3080 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3081 QString asScriptCode()
const override;
3083 QStringList dependsOnOtherParameters()
const override;
3089 QString parentLayerParameterName()
const;
3095 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3101 DataType dataType()
const;
3107 void setDataType( DataType type );
3113 bool allowMultiple()
const;
3119 void setAllowMultiple(
bool allowMultiple );
3130 bool defaultToAllFields()
const;
3141 void setDefaultToAllFields(
bool enabled );
3143 QVariantMap toVariantMap()
const override;
3144 bool fromVariantMap(
const QVariantMap &map )
override;
3153 QString mParentLayerParameterName;
3154 DataType mDataType = Any;
3155 bool mAllowMultiple =
false;
3156 bool mDefaultToAllFields =
false;
3175 const QList< int > &types = QList< int >(),
3176 const QVariant &defaultValue = QVariant(),
bool optional =
false );
3181 static QString
typeName() {
return QStringLiteral(
"source" ); }
3184 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3185 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3187 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3188 QString asScriptCode()
const override;
3190 QString createFileFilter()
const override;
3192 QVariantMap toVariantMap()
const override;
3193 bool fromVariantMap(
const QVariantMap &map )
override;
3220 bool optional =
false,
bool createByDefault =
true );
3223 QVariantMap toVariantMap()
const override;
3224 bool fromVariantMap(
const QVariantMap &map )
override;
3226 QString createFileFilter()
const override;
3259 virtual QString generateTemporaryDestination(
const QgsProcessingContext *context =
nullptr )
const;
3282 bool createByDefault()
const;
3289 void setCreateByDefault(
bool createByDefault );
3314 bool mSupportsNonFileBasedOutputs =
true;
3315 bool mCreateByDefault =
true;
3317 friend class QgsProcessingModelAlgorithm;
3318 friend class TestQgsProcessing;
3319 friend class TestQgsProcessingModelAlgorithm;
3342 bool optional =
false,
bool createByDefault =
true,
bool supportsAppend =
false );
3347 static QString
typeName() {
return QStringLiteral(
"sink" ); }
3350 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3351 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3352 QString asScriptCode()
const override;
3354 QString defaultFileExtension() const override;
3355 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3356 QString createFileFilter() const override;
3363 virtual QStringList supportedOutputVectorLayerExtensions() const;
3375 bool hasGeometry() const;
3391 bool supportsAppend() const;
3401 void setSupportsAppend(
bool supportsAppend );
3403 QVariantMap toVariantMap() const override;
3404 bool fromVariantMap( const QVariantMap &map ) override;
3405 QString generateTemporaryDestination( const
QgsProcessingContext *context =
nullptr ) const override;
3415 bool mSupportsAppend = false;
3440 bool optional =
false,
bool createByDefault =
true );
3445 static QString
typeName() {
return QStringLiteral(
"vectorDestination" ); }
3448 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3449 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3450 QString asScriptCode()
const override;
3452 QString defaultFileExtension() const override;
3453 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3454 QString createFileFilter() const override;
3461 virtual QStringList supportedOutputVectorLayerExtensions() const;
3473 bool hasGeometry() const;
3481 QVariantMap toVariantMap() const override;
3482 bool fromVariantMap( const QVariantMap &map ) override;
3513 const QVariant &defaultValue = QVariant(),
3514 bool optional =
false,
3515 bool createByDefault =
true );
3520 static QString
typeName() {
return QStringLiteral(
"rasterDestination" ); }
3523 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3524 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3526 QString defaultFileExtension() const override;
3527 QString createFileFilter() const override;
3534 virtual QStringList supportedOutputRasterLayerExtensions() const;
3574 const QString &fileFilter = QString(),
3575 const QVariant &defaultValue = QVariant(),
3576 bool optional =
false,
3577 bool createByDefault =
true );
3582 static QString
typeName() {
return QStringLiteral(
"fileDestination" ); }
3585 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3586 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3588 QString defaultFileExtension() const override;
3589 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3590 QString createFileFilter() const override;
3596 QString fileFilter() const;
3602 void setFileFilter( const QString &filter );
3604 QVariantMap toVariantMap() const override;
3605 bool fromVariantMap( const QVariantMap &map ) override;
3615 QString mFileFilter;
3633 const QVariant &defaultValue = QVariant(),
3634 bool optional =
false,
3635 bool createByDefault =
true );
3640 static QString
typeName() {
return QStringLiteral(
"folderDestination" ); }
3643 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3645 QString defaultFileExtension() const override;
3667 QgsProcessingParameterBand(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3668 const QString &parentLayerParameterName = QString(),
3669 bool optional =
false,
3670 bool allowMultiple =
false );
3675 static QString
typeName() {
return QStringLiteral(
"band" ); }
3678 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3679 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3680 QString asScriptCode()
const override;
3681 QStringList dependsOnOtherParameters()
const override;
3688 QString parentLayerParameterName()
const;
3694 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3696 QVariantMap toVariantMap()
const override;
3697 bool fromVariantMap(
const QVariantMap &map )
override;
3709 bool allowMultiple()
const;
3716 void setAllowMultiple(
bool allowMultiple );
3720 QString mParentLayerParameterName;
3721 bool mAllowMultiple =
false;
3743 bool optional =
false );
3748 static QString
typeName() {
return QStringLiteral(
"layout" ); }
3751 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3752 QString asScriptCode()
const override;
3781 const QString &parentLayoutParameterName = QString(),
3783 bool optional =
false );
3788 static QString
typeName() {
return QStringLiteral(
"layoutitem" ); }
3791 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3792 QString asScriptCode()
const override;
3794 QVariantMap toVariantMap()
const override;
3795 bool fromVariantMap(
const QVariantMap &map )
override;
3796 QStringList dependsOnOtherParameters()
const override;
3807 QString parentLayoutParameterName()
const;
3813 void setParentLayoutParameterName(
const QString &name );
3822 int itemType()
const;
3831 void setItemType(
int type );
3834 QString mParentLayoutParameterName;
3856 QgsProcessingParameterColor(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3857 bool opacityEnabled =
true,
3858 bool optional =
false );
3863 static QString
typeName() {
return QStringLiteral(
"color" ); }
3866 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3867 QString asScriptCode()
const override;
3869 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3870 QVariantMap toVariantMap()
const override;
3871 bool fromVariantMap(
const QVariantMap &map )
override;
3879 bool opacityEnabled()
const;
3888 void setOpacityEnabled(
bool enabled );
3897 bool mAllowOpacity =
true;
3919 const QString &sourceCrsParameterName = QString(),
const QString &destinationCrsParameterName = QString(),
3920 const QVariant &staticSourceCrs = QVariant(),
const QVariant &staticDestinationCrs = QVariant(),
3921 bool optional =
false );
3926 static QString
typeName() {
return QStringLiteral(
"coordinateoperation" ); }
3929 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3930 QString asScriptCode()
const override;
3932 QStringList dependsOnOtherParameters()
const override;
3934 QVariantMap toVariantMap()
const override;
3935 bool fromVariantMap(
const QVariantMap &map )
override;
4000 QString mSourceParameterName;
4001 QString mDestParameterName;
4002 QVariant mSourceCrs;
4025 bool optional =
false );
4030 static QString
typeName() {
return QStringLiteral(
"maptheme" ); }
4033 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4034 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4035 QString asScriptCode()
const override;
4037 QVariantMap toVariantMap()
const override;
4038 bool fromVariantMap(
const QVariantMap &map )
override;
4076 Type type = DateTime,
4077 const QVariant &defaultValue = QVariant(),
4078 bool optional =
false,
4079 const QDateTime &minValue = QDateTime(),
4080 const QDateTime &maxValue = QDateTime()
4086 static QString
typeName() {
return QStringLiteral(
"datetime" ); }
4089 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4090 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4091 QString toolTip()
const override;
4101 QDateTime minimum()
const;
4114 void setMinimum(
const QDateTime &minimum );
4123 QDateTime maximum()
const;
4136 void setMaximum(
const QDateTime &maximum );
4142 Type dataType()
const;
4148 void setDataType( Type type );
4150 QVariantMap toVariantMap()
const override;
4151 bool fromVariantMap(
const QVariantMap &map )
override;
4162 Type mDataType = DateTime;
4187 bool optional =
false );
4192 static QString
typeName() {
return QStringLiteral(
"providerconnection" ); }
4195 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4196 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4197 QString asScriptCode()
const override;
4199 QVariantMap toVariantMap()
const override;
4200 bool fromVariantMap(
const QVariantMap &map )
override;
4221 QString mProviderId;
4247 QgsProcessingParameterDatabaseSchema(
const QString &name,
const QString &description,
const QString &connectionParameterName = QString(),
const QVariant &defaultValue = QVariant(),
4248 bool optional =
false );
4253 static QString
typeName() {
return QStringLiteral(
"databaseschema" ); }
4256 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4257 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4258 QString asScriptCode()
const override;
4260 QVariantMap toVariantMap()
const override;
4261 bool fromVariantMap(
const QVariantMap &map )
override;
4262 QStringList dependsOnOtherParameters()
const override;
4268 QString parentConnectionParameterName()
const;
4274 void setParentConnectionParameterName(
const QString &name );
4283 QString mParentConnectionParameterName;
4311 const QString &connectionParameterName = QString(),
4312 const QString &schemaParameterName = QString(),
4313 const QVariant &defaultValue = QVariant(),
4314 bool optional =
false,
4315 bool allowNewTableNames =
false );
4320 static QString
typeName() {
return QStringLiteral(
"databasetable" ); }
4323 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4324 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4325 QString asScriptCode()
const override;
4327 QVariantMap toVariantMap()
const override;
4328 bool fromVariantMap(
const QVariantMap &map )
override;
4329 QStringList dependsOnOtherParameters()
const override;
4335 QString parentConnectionParameterName()
const;
4341 void setParentConnectionParameterName(
const QString &name );
4347 QString parentSchemaParameterName()
const;
4353 void setParentSchemaParameterName(
const QString &name );
4366 bool allowNewTableNames()
const;
4374 void setAllowNewTableNames(
bool allowed );
4378 QString mParentConnectionParameterName;
4379 QString mParentSchemaParameterName;
4380 bool mAllowNewTableNames =
false;
4398 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4403 static QString
typeName() {
return QStringLiteral(
"pointcloud" ); }
4406 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4407 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4409 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4410 QString createFileFilter()
const override;
4433 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4438 static QString
typeName() {
return QStringLiteral(
"annotation" ); }
4441 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4442 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4444 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4470 const QVariant &defaultValue = QVariant(),
4471 bool optional =
false,
4472 bool createByDefault =
true );
4477 static QString
typeName() {
return QStringLiteral(
"pointCloudDestination" ); }
4480 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4481 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4483 QString defaultFileExtension() const override;
4484 QString createFileFilter() const override;
4490 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
4512 const QString &parentLayerParameterName = QString(),
4513 bool allowMultiple =
false,
4514 bool optional =
false,
4515 bool defaultToAllAttributes =
false );
4520 static QString
typeName() {
return QStringLiteral(
"attribute" ); }
4523 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4524 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4525 QString asScriptCode()
const override;
4527 QStringList dependsOnOtherParameters()
const override;
4533 QString parentLayerParameterName()
const;
4539 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4545 bool allowMultiple()
const;
4551 void setAllowMultiple(
bool allowMultiple );
4561 bool defaultToAllAttributes()
const;
4571 void setDefaultToAllAttributes(
bool enabled );
4573 QVariantMap toVariantMap()
const override;
4574 bool fromVariantMap(
const QVariantMap &map )
override;
4583 QString mParentLayerParameterName;
4584 bool mAllowMultiple =
false;
4585 bool mDefaultToAllAttributes =
false;
4606 const QVariant &defaultValue = QVariant(),
4607 bool optional =
false,
4608 bool createByDefault =
true );
4613 static QString
typeName() {
return QStringLiteral(
"vectorTileDestination" ); }
4616 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4617 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4619 QString defaultFileExtension() const override;
4620 QString createFileFilter() const override;
4626 virtual QStringList supportedOutputVectorTileLayerExtensions() const;
The Qgis class provides global constants for use throughout the application.
ExpressionType
Expression types.
@ Qgis
Native QGIS expression.
DistanceUnit
Units of distance.
TemporalUnit
Temporal units.
WkbType
The WKB type describes the number of dimensions a geometry has.
Represents a map layer containing a set of georeferenced annotations, e.g.
This class represents a coordinate reference system (CRS).
This class wraps a request for features to a vector layer (or directly its vector data provider).
InvalidGeometryCheck
Handling of features with invalid geometries.
@ GeometryAbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
An interface for objects which accept features via addFeature(s) methods.
Container of fields for a vector layer.
Abstract interface for classes which generate a file filter string.
A geometry is the spatial representation of a feature.
Base class for graphical items within a QgsLayout.
Base class for all map layer types.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Represents a map layer supporting display of point clouds.
A class to represent a 2D point.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Abstract base class for processing algorithms.
Contains information about the context in which a processing algorithm is executed.
Base class for all parameter definitions which represent file or layer destinations,...
virtual QString defaultFileExtension() const =0
Returns the default file extension for destination file paths associated with this parameter.
bool supportsNonFileBasedOutput() const
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or ...
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
virtual QgsProcessingOutputDefinition * toOutputDefinition() const =0
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parame...
QgsProcessingProvider * originalProvider() const
Original (source) provider which this parameter has been derived from.
void setSupportsNonFileBasedOutput(bool supportsNonFileBasedOutput)
Sets whether the destination parameter supports non filed-based outputs, such as memory layers or dir...
Custom exception class for processing related exceptions.
Encapsulates settings relating to a feature source input to a processing algorithm.
Flags flags
Flags which dictate source behavior.
bool operator!=(const QgsProcessingFeatureSourceDefinition &other) const
bool selectedFeaturesOnly
true if only selected features in the source should be used by algorithms.
QgsFeatureRequest::InvalidGeometryCheck geometryCheck
Geometry check method to apply to this source.
bool operator==(const QgsProcessingFeatureSourceDefinition &other) const
QgsProcessingFeatureSourceDefinition(const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, QgsProcessingFeatureSourceDefinition::Flags flags=QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck=QgsFeatureRequest::GeometryAbortOnInvalid, const QString &filterExpression=QString())
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.
QgsProperty source
Source definition.
long long featureLimit
If set to a value > 0, places a limit on the maximum number of features which will be read from the s...
Flag
Flags which control source behavior.
QString filterExpression
Optional expression filter to use for filtering features which will be read from the source.
QgsFeatureSource subclass which proxies methods to an underlying QgsFeatureSource,...
Base class for providing feedback from a processing algorithm.
Base class for the definition of processing outputs.
Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm.
QgsProcessingOutputLayerDefinition(const QgsProperty &sink, QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer.
QgsProperty sink
Sink/layer definition.
bool useRemapping() const
Returns true if the output uses a remapping definition.
QgsProcessingOutputLayerDefinition(const QString &sink=QString(), QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string.
QgsRemappingSinkDefinition remappingDefinition() const
Returns the output remapping definition, if useRemapping() is true.
QString destinationName
Name to use for sink if it's to be loaded into a destination project.
QVariantMap createOptions
Map of optional sink/layer creation options, which are passed to the underlying provider when creatin...
An annotation layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for authentication configuration ID values.
static QString typeName()
Returns the type name for the parameter class.
A raster band parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A boolean parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A color parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A coordinate operation parameter for processing algorithms, for selection between available coordinat...
static QString typeName()
Returns the type name for the parameter class.
QVariant sourceCrs() const
Returns the static source CRS, or an invalid value if this is not set.
QString destinationCrsParameterName() const
Returns the name of the destination CRS parameter, or an empty string if this is not set.
void setDestinationCrsParameterName(const QString &name)
Sets the name of the destination CRS parameter.
void setSourceCrs(const QVariant &crs)
Sets the static source crs.
QVariant destinationCrs() const
Returns the static destination CRS, or an invalid value if this is not set.
void setDestinationCrs(const QVariant &crs)
Sets the static destination crs.
void setSourceCrsParameterName(const QString &name)
Sets the name of the source CRS parameter.
QString sourceCrsParameterName() const
Returns the name of the source CRS parameter, or an empty string if this is not set.
A coordinate reference system parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A database schema parameter for processing algorithms, allowing users to select from existing schemas...
static QString typeName()
Returns the type name for the parameter class.
A database table name parameter for processing algorithms, allowing users to select from existing dat...
static QString typeName()
Returns the type name for the parameter class.
A datetime (or pure date or time) parameter for processing algorithms.
@ DateTime
Datetime values.
static QString typeName()
Returns the type name for the parameter class.
Base class for the definition of processing parameters.
QString mHelp
Parameter help.
QVariant defaultValue() const
Returns the default value for the parameter.
void setDefaultValue(const QVariant &value)
Sets the default value for the parameter.
QVariant guiDefaultValueOverride() const
Returns the default value to use in the GUI for the parameter.
QStringList additionalExpressionContextVariables() const
Returns a list of additional expression context variables which are available for use when evaluating...
QStringList mAdditionalExpressionVariables
Additional expression context variables exposed for use by this parameter.
QString help() const
Returns the help for the parameter.
void setMetadata(const QVariantMap &metadata)
Sets the parameter's freeform metadata.
Flags mFlags
Parameter flags.
ValueAsStringFlag
Flags for passing to the valueAsStringPrivate() method.
QString mName
Parameter name.
void setGuiDefaultValueOverride(const QVariant &value)
Sets the default value to use for the parameter in GUI widgets.
QVariantMap metadata() const
Returns the parameter's freeform metadata.
QString description() const
Returns the description for the parameter.
QString mDynamicLayerParameterName
Linked vector layer parameter name for dynamic properties.
QVariant defaultValueForGui() const
Returns the default value to use for the parameter in a GUI.
virtual bool isDestination() const
Returns true if this parameter represents a file or layer destination, e.g.
void setDescription(const QString &description)
Sets the description for the parameter.
void setDynamicLayerParameterName(const QString &name)
Sets the name for the parameter for a layer linked to a dynamic parameter, or an empty string if this...
QString dynamicLayerParameterName() const
Returns the name of the parameter for a layer linked to a dynamic parameter, or an empty string if th...
void setAdditionalExpressionContextVariables(const QStringList &variables)
Sets a list of additional expression context variables which are available for use when evaluating th...
QVariantMap mMetadata
Freeform metadata for parameter. Mostly used by widget wrappers to customize their appearance and beh...
void setName(const QString &name)
Sets the name of the parameter.
QString mDescription
Parameter description.
virtual QgsProcessingParameterDefinition * clone() const =0
Creates a clone of the parameter definition.
virtual QString type() const =0
Unique parameter type name.
void setDynamicPropertyDefinition(const QgsPropertyDefinition &definition)
Sets the property definition for dynamic properties.
Flags flags() const
Returns any flags associated with the parameter.
void setHelp(const QString &help)
Sets the help for the parameter.
QString name() const
Returns the name of the parameter.
QVariant mDefault
Default value for parameter.
virtual QStringList dependsOnOtherParameters() const
Returns a list of other parameter names on which this parameter is dependent (e.g.
void setIsDynamic(bool dynamic)
Sets whether the parameter is dynamic, and can support data-defined values (i.e.
QVariant mGuiDefault
Default value for parameter in GUI.
QgsPropertyDefinition mPropertyDefinition
Data defined property definition.
bool isDynamic() const
Returns true if the parameter supports is dynamic, and can support data-defined values (i....
void setFlags(Flags flags)
Sets the flags associated with the parameter.
virtual ~QgsProcessingParameterDefinition()=default
QVariantMap & metadata()
Returns the parameter's freeform metadata.
QgsPropertyDefinition dynamicPropertyDefinition() const
Returns the property definition for dynamic properties.
A double numeric parameter for distance values.
static QString typeName()
Returns the type name for the parameter class.
void setDefaultUnit(Qgis::DistanceUnit unit)
Sets the default distance unit for the parameter.
A double numeric parameter for duration values.
void setDefaultUnit(Qgis::TemporalUnit unit)
Sets the default duration unit for the parameter.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
static QString typeName()
Returns the type name for the parameter class.
An expression parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A rectangular map extent parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A feature sink output for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
An input feature source (such as vector layers) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A vector layer or feature source field parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
DataType
Field data types.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
static QString typeName()
Returns the type name for the parameter class.
An input file or folder parameter for processing algorithms.
QString extension() const
Returns any specified file extension for the parameter.
static QString typeName()
Returns the type name for the parameter class.
void setBehavior(Behavior behavior)
Sets the parameter behavior (e.g.
Behavior
Parameter behavior.
@ Folder
Parameter is a folder.
Behavior behavior() const
Returns the parameter behavior (e.g.
A folder destination parameter, for specifying the destination path for a folder created by the algor...
static QString typeName()
Returns the type name for the parameter class.
A geometry parameter for processing algorithms.
void setGeometryTypes(const QList< int > &geometryTypes)
Sets the allowed geometryTypes, as a list of Qgis::GeometryType values.
bool allowMultipart() const
Returns the parameter allow multipart geometries.
QList< int > geometryTypes() const
Returns the parameter allowed geometries, as a list of Qgis::GeometryType values.
void setAllowMultipart(bool allowMultipart)
Sets the allow multipart geometries.
static QString typeName()
Returns the type name for the parameter class.
A print layout item parameter, allowing users to select a particular item from a print layout.
static QString typeName()
Returns the type name for the parameter class.
A print layout parameter, allowing users to select a print layout.
static QString typeName()
Returns the type name for the parameter class.
Can be inherited by parameters which require limits to their acceptable data types.
QList< int > mDataTypes
List of acceptable data types for the parameter.
A map layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A map theme parameter for processing algorithms, allowing users to select an existing map theme from ...
static QString typeName()
Returns the type name for the parameter class.
A table (matrix) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A mesh layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A parameter for processing algorithms which accepts multiple map layers.
static QString typeName()
Returns the type name for the parameter class.
A numeric parameter for processing algorithms.
@ Double
Double/float values.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer attribute parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer destination parameter, for specifying the destination path for a point cloud laye...
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A data provider connection parameter for processing algorithms, allowing users to select from availab...
static QString typeName()
Returns the type name for the parameter class.
void setProviderId(const QString &provider)
Sets the ID of the provider associated with the connections.
QString providerId() const
Returns the ID of the provider associated with the connections.
A numeric range parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
static QString typeName()
Returns the type name for the parameter class.
A raster layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for map scale values.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector layer destination parameter, for specifying the destination path for a vector layer created ...
static QString typeName()
Returns the type name for the parameter class.
A vector layer (with or without geometry) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector tile layer destination parameter, for specifying the destination path for a vector tile laye...
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A collection of utilities for working with parameters when running a processing algorithm.
Abstract base class for processing providers.
LayerHint
Layer type hints.
@ UnknownType
Unknown layer type.
Contains enumerations and other constants for use in processing algorithms and parameters.
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
SourceType
Data source types enum.
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition for a property.
A store for object properties.
Represents a raster layer.
A rectangle specified with double values.
Defines the parameters used to remap features when creating a QgsRemappingProxyFeatureSink.
Represents a vector layer which manages a vector based data sets.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
#define SIP_THROW(name,...)
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.
const QgsCoordinateReferenceSystem & crs