18#ifndef QGSPROCESSINGPARAMETERS_H
19#define QGSPROCESSINGPARAMETERS_H
36using namespace Qt::StringLiterals;
81 const QString &
source = QString(),
199 operator QVariant()
const {
return QVariant::fromValue( *
this ); }
280 operator QVariant()
const {
return QVariant::fromValue( *
this ); }
376 QString
format()
const {
return mFormat; }
393 QVariant toVariant()
const;
401 bool loadVariant(
const QVariantMap &map );
404 operator QVariant()
const {
return QVariant::fromValue( *
this ); }
411 bool mUseRemapping =
false;
448 sipType = sipType_QgsProcessingParameterBoolean;
450 sipType = sipType_QgsProcessingParameterCrs;
452 sipType = sipType_QgsProcessingParameterMapLayer;
454 sipType = sipType_QgsProcessingParameterExtent;
456 sipType = sipType_QgsProcessingParameterPoint;
458 sipType = sipType_QgsProcessingParameterGeometry;
460 sipType = sipType_QgsProcessingParameterFile;
462 sipType = sipType_QgsProcessingParameterMatrix;
464 sipType = sipType_QgsProcessingParameterMultipleLayers;
466 sipType = sipType_QgsProcessingParameterNumber;
468 sipType = sipType_QgsProcessingParameterDistance;
470 sipType = sipType_QgsProcessingParameterArea;
472 sipType = sipType_QgsProcessingParameterVolume;
474 sipType = sipType_QgsProcessingParameterDuration;
476 sipType = sipType_QgsProcessingParameterScale;
478 sipType = sipType_QgsProcessingParameterRange;
480 sipType = sipType_QgsProcessingParameterRasterLayer;
482 sipType = sipType_QgsProcessingParameterMeshLayer;
484 sipType = sipType_QgsProcessingParameterEnum;
486 sipType = sipType_QgsProcessingParameterString;
488 sipType = sipType_QgsProcessingParameterExpression;
490 sipType = sipType_QgsProcessingParameterAuthConfig;
492 sipType = sipType_QgsProcessingParameterVectorLayer;
494 sipType = sipType_QgsProcessingParameterField;
496 sipType = sipType_QgsProcessingParameterFeatureSource;
498 sipType = sipType_QgsProcessingParameterFeatureSink;
500 sipType = sipType_QgsProcessingParameterVectorDestination;
502 sipType = sipType_QgsProcessingParameterRasterDestination;
504 sipType = sipType_QgsProcessingParameterPointCloudDestination;
506 sipType = sipType_QgsProcessingParameterFileDestination;
508 sipType = sipType_QgsProcessingParameterFolderDestination;
510 sipType = sipType_QgsProcessingParameterBand;
512 sipType = sipType_QgsProcessingParameterLayout;
514 sipType = sipType_QgsProcessingParameterLayoutItem;
516 sipType = sipType_QgsProcessingParameterColor;
518 sipType = sipType_QgsProcessingParameterCoordinateOperation;
520 sipType = sipType_QgsProcessingParameterMapTheme;
522 sipType = sipType_QgsProcessingParameterDateTime;
524 sipType = sipType_QgsProcessingParameterProviderConnection;
526 sipType = sipType_QgsProcessingParameterDatabaseSchema;
528 sipType = sipType_QgsProcessingParameterDatabaseTable;
530 sipType = sipType_QgsProcessingParameterFieldMapping;
532 sipType = sipType_QgsProcessingParameterTinInputLayers;
534 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
536 sipType = sipType_QgsProcessingParameterDxfLayers;
538 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
540 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
542 sipType = sipType_QgsProcessingParameterPointCloudLayer;
544 sipType = sipType_QgsProcessingParameterAnnotationLayer;
546 sipType = sipType_QgsProcessingParameterPointCloudAttribute;
548 sipType = sipType_QgsProcessingParameterVectorTileDestination;
589 virtual QString
type()
const = 0;
676 QVariant guiDefaultValueOverride()
const;
703 QVariant defaultValueForGui()
const;
724 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
733 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
746 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
783 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
789 virtual QString asScriptCode()
const;
807 virtual QVariantMap toVariantMap()
const;
814 virtual bool fromVariantMap(
const QVariantMap &map );
862 virtual QString toolTip()
const;
969 AllowMapLayerValues = 1 << 0,
1073 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1280 const QVariantMap ¶meters,
1285 QString &destinationIdentifier
SIP_OUT,
1287 const QVariantMap &createOptions = QVariantMap(),
1288 const QStringList &datasourceOptions = QStringList(),
1289 const QStringList &layerOptions = QStringList()
1313 const QVariant &value,
1318 QString &destinationIdentifier
SIP_OUT,
1320 const QVariantMap &createOptions = QVariantMap(),
1321 const QStringList &datasourceOptions = QStringList(),
1322 const QStringList &layerOptions = QStringList()
1364 const QVariantMap ¶meters,
1366 const QStringList &compatibleFormats,
1367 const QString &preferredFormat = QString(
"shp" ),
1402 const QVariantMap ¶meters,
1404 const QStringList &compatibleFormats,
1405 const QString &preferredFormat = QString(
"shp" ),
1407 QString *layerName
SIP_OUT =
nullptr
1419 const QVariantMap ¶meters,
1436 const QVariant &value,
1949 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1972 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1973 QString asScriptCode()
const override;
2002 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2003 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2005 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2032 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2033 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2035 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2048 static bool variantIsValidStringForExtent(
const QVariant &value );
2071 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2072 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2106 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2107 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2108 QString asScriptCode()
const override;
2110 QVariantMap toVariantMap()
const override;
2111 bool fromVariantMap(
const QVariantMap &map )
override;
2137 QString userFriendlyString(
const QVariant &value )
const override;
2145 QList<int> mGeomTypes;
2146 bool mAllowMultipart;
2165 const QString &
name,
2170 bool optional =
false,
2180 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2181 QString asScriptCode()
const override;
2183 QString createFileFilter()
const override;
2215 void setExtension(
const QString &extension );
2223 QString fileFilter()
const;
2234 void setFileFilter(
const QString &filter );
2236 QVariantMap toVariantMap()
const override;
2237 bool fromVariantMap(
const QVariantMap &map )
override;
2249 QString mFileFilter;
2264 const QString &
name,
2268 const QStringList &
headers = QStringList(),
2270 bool optional =
false
2280 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2281 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2288 QStringList headers()
const;
2294 void setHeaders(
const QStringList &headers );
2302 int numberRows()
const;
2310 void setNumberRows(
int rows );
2317 bool hasFixedNumberRows()
const;
2324 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2326 QVariantMap toVariantMap()
const override;
2327 bool fromVariantMap(
const QVariantMap &map )
override;
2335 QStringList mHeaders;
2336 int mNumberRows = 3;
2337 bool mFixedNumberRows =
false;
2352 const QString &
name,
2356 bool optional =
false
2365 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2366 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2368 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2369 QString asScriptCode()
const override;
2371 QString createFileFilter()
const override;
2390 int minimumNumberInputs()
const;
2397 void setMinimumNumberInputs(
int minimum );
2399 QVariantMap toVariantMap()
const override;
2400 bool fromVariantMap(
const QVariantMap &map )
override;
2409 int mMinimumNumberInputs = 0;
2436 const QString &
name,
2440 bool optional =
false,
2441 double minValue = std::numeric_limits<double>::lowest() + 1,
2442 double maxValue = std::numeric_limits<double>::max()
2452 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2453 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2454 QString toolTip()
const override;
2461 double minimum()
const;
2467 void setMinimum(
double minimum );
2473 double maximum()
const;
2479 void setMaximum(
double maximum );
2493 QVariantMap toVariantMap()
const override;
2494 bool fromVariantMap(
const QVariantMap &map )
override;
2502 double mMin = std::numeric_limits<double>::lowest() + 1;
2503 double mMax = std::numeric_limits<double>::max();
2535 const QString &
name,
2539 bool optional =
false,
2540 double minValue = std::numeric_limits<double>::lowest() + 1,
2541 double maxValue = std::numeric_limits<double>::max()
2549 QString userFriendlyString(
const QVariant &value )
const override;
2553 QString type() const override;
2554 QStringList dependsOnOtherParameters() const override;
2555 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2561 QString parentParameterName() const;
2567 void setParentParameterName( const QString &parentParameterName );
2585 QVariantMap toVariantMap()
const override;
2586 bool fromVariantMap(
const QVariantMap &map )
override;
2589 QString mParentParameterName;
2622 const QString &
name,
2626 bool optional =
false,
2627 double minValue = 0,
2628 double maxValue = std::numeric_limits<double>::max()
2638 QString type() const override;
2639 QStringList dependsOnOtherParameters() const override;
2640 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2646 QString parentParameterName() const;
2652 void setParentParameterName( const QString &parentParameterName );
2668 QVariantMap toVariantMap()
const override;
2669 bool fromVariantMap(
const QVariantMap &map )
override;
2670 QString userFriendlyString(
const QVariant &value )
const override;
2673 QString mParentParameterName;
2706 const QString &
name,
2710 bool optional =
false,
2711 double minValue = 0,
2712 double maxValue = std::numeric_limits<double>::max()
2722 QString type() const override;
2723 QStringList dependsOnOtherParameters() const override;
2724 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2730 QString parentParameterName() const;
2736 void setParentParameterName( const QString &parentParameterName );
2752 QVariantMap toVariantMap()
const override;
2753 bool fromVariantMap(
const QVariantMap &map )
override;
2754 QString userFriendlyString(
const QVariant &value )
const override;
2757 QString mParentParameterName;
2777 const QString &
name,
2780 bool optional =
false,
2781 double minValue = std::numeric_limits<double>::lowest() + 1,
2782 double maxValue = std::numeric_limits<double>::max()
2792 QString type() const override;
2793 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2809 QVariantMap toVariantMap()
const override;
2810 bool fromVariantMap(
const QVariantMap &map )
override;
2811 QString userFriendlyString(
const QVariant &value )
const override;
2842 QString type() const override;
2843 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2863 const QString &
name,
2867 bool optional =
false
2877 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2878 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2893 QVariantMap toVariantMap()
const override;
2894 bool fromVariantMap(
const QVariantMap &map )
override;
2924 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2925 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2927 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2928 QString createFileFilter()
const override;
2977 const QString &
name,
2979 const QStringList &
options = QStringList(),
2982 bool optional =
false,
2994 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2995 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2996 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
2997 QString asScriptCode()
const override;
3004 QStringList options()
const;
3010 void setOptions(
const QStringList &options );
3016 bool allowMultiple()
const;
3022 void setAllowMultiple(
bool allowMultiple );
3030 bool usesStaticStrings()
const;
3038 void setUsesStaticStrings(
bool usesStaticStrings );
3040 QVariantMap toVariantMap()
const override;
3041 bool fromVariantMap(
const QVariantMap &map )
override;
3049 QStringList mOptions;
3050 bool mAllowMultiple =
false;
3051 bool mUsesStaticStrings =
false;
3094 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3095 QString asScriptCode()
const override;
3102 bool multiLine()
const;
3108 void setMultiLine(
bool multiLine );
3110 QVariantMap toVariantMap()
const override;
3111 bool fromVariantMap(
const QVariantMap &map )
override;
3119 bool mMultiLine =
false;
3149 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3150 QString asScriptCode()
const override;
3170 const QString &
name,
3174 bool optional =
false,
3184 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3185 QStringList dependsOnOtherParameters()
const override;
3192 QString parentLayerParameterName()
const;
3198 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3216 QVariantMap toVariantMap()
const override;
3217 bool fromVariantMap(
const QVariantMap &map )
override;
3225 QString mParentLayerParameterName;
3274 const QString &
name,
const QString &
description = QString(),
const QList< int > &types = QList< int >(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
3283 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3284 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3286 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3288 QString createFileFilter()
const override;
3290 QVariantMap toVariantMap()
const override;
3291 bool fromVariantMap(
const QVariantMap &map )
override;
3319 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3320 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3322 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3323 QString createFileFilter()
const override;
3343 const QString &
name,
const QString &
description = QString(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false,
const QList< int > &types = QList< int >()
3352 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3353 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3355 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3356 QString asScriptCode()
const override;
3358 QString createFileFilter()
const override;
3360 QVariantMap toVariantMap()
const override;
3361 bool fromVariantMap(
const QVariantMap &map )
override;
3381 const QString &
name,
3387 bool optional =
false,
3397 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3398 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3399 QString asScriptCode()
const override;
3401 QStringList dependsOnOtherParameters()
const override;
3407 QString parentLayerParameterName()
const;
3413 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3431 bool allowMultiple()
const;
3437 void setAllowMultiple(
bool allowMultiple );
3448 bool defaultToAllFields()
const;
3459 void setDefaultToAllFields(
bool enabled );
3461 QVariantMap toVariantMap()
const override;
3462 bool fromVariantMap(
const QVariantMap &map )
override;
3470 QString mParentLayerParameterName;
3472 bool mAllowMultiple =
false;
3473 bool mDefaultToAllFields =
false;
3489 const QString &
name,
const QString &
description = QString(),
const QList< int > &types = QList< int >(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
3498 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3499 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3501 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3502 QString asScriptCode()
const override;
3504 QString createFileFilter()
const override;
3506 QVariantMap toVariantMap()
const override;
3507 bool fromVariantMap(
const QVariantMap &map )
override;
3533 QVariantMap toVariantMap()
const override;
3534 bool fromVariantMap(
const QVariantMap &map )
override;
3536 QString createFileFilter()
const override;
3622 bool mSupportsNonFileBasedOutputs =
true;
3623 bool mCreateByDefault =
true;
3648 const QString &
name,
3652 bool optional =
false,
3663 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3664 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3665 QString asScriptCode()
const override;
3667 QString defaultFileExtension() const override;
3668 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3669 QString createFileFilter() const override;
3676 virtual QStringList supportedOutputVectorLayerExtensions() const;
3682 Qgis::ProcessingSourceType dataType() const;
3688 bool hasGeometry() const;
3694 void setDataType(
Qgis::ProcessingSourceType type );
3704 bool supportsAppend() const;
3714 void setSupportsAppend(
bool supportsAppend );
3716 QVariantMap toVariantMap() const override;
3717 bool fromVariantMap( const QVariantMap &map ) override;
3718 QString generateTemporaryDestination( const
QgsProcessingContext *context =
nullptr ) const override;
3726 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3727 bool mSupportsAppend = false;
3750 const QString &
name,
3754 bool optional =
false,
3761 static QString
typeName() {
return u
"vectorDestination"_s; }
3764 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3765 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3766 QString asScriptCode()
const override;
3768 QString defaultFileExtension() const override;
3769 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3770 QString createFileFilter() const override;
3777 virtual QStringList supportedOutputVectorLayerExtensions() const;
3783 Qgis::ProcessingSourceType dataType() const;
3789 bool hasGeometry() const;
3795 void setDataType(
Qgis::ProcessingSourceType type );
3797 QVariantMap toVariantMap() const override;
3798 bool fromVariantMap( const QVariantMap &map ) override;
3807 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3830 static QString
typeName() {
return u
"rasterDestination"_s; }
3833 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3834 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3836 QString defaultFileExtension() const override;
3844 QString defaultFileFormat() const;
3846 QString createFileFilter() const override;
3854 Q_DECL_DEPRECATED virtual QStringList supportedOutputRasterLayerExtensions() const
SIP_DEPRECATED;
3861 virtual QList<QPair<QString, QString>> supportedOutputRasterLayerFormatAndExtensions() const;
3905 static QString
typeName() {
return u
"fileDestination"_s; }
3908 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3909 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3911 QString defaultFileExtension() const override;
3912 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3913 QString createFileFilter() const override;
3919 QString fileFilter() const;
3925 void setFileFilter( const QString &filter );
3927 QVariantMap toVariantMap() const override;
3928 bool fromVariantMap( const QVariantMap &map ) override;
3937 QString mFileFilter;
3957 static QString
typeName() {
return u
"folderDestination"_s; }
3960 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3962 QString defaultFileExtension() const override;
3991 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3992 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3993 QString asScriptCode()
const override;
3994 QStringList dependsOnOtherParameters()
const override;
4001 QString parentLayerParameterName()
const;
4007 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4009 QVariantMap toVariantMap()
const override;
4010 bool fromVariantMap(
const QVariantMap &map )
override;
4022 bool allowMultiple()
const;
4029 void setAllowMultiple(
bool allowMultiple );
4032 QString mParentLayerParameterName;
4033 bool mAllowMultiple =
false;
4061 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4062 QString asScriptCode()
const override;
4098 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4099 QString asScriptCode()
const override;
4101 QVariantMap toVariantMap()
const override;
4102 bool fromVariantMap(
const QVariantMap &map )
override;
4103 QStringList dependsOnOtherParameters()
const override;
4114 QString parentLayoutParameterName()
const;
4120 void setParentLayoutParameterName(
const QString &name );
4129 int itemType()
const;
4138 void setItemType(
int type );
4141 QString mParentLayoutParameterName;
4171 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4172 QString asScriptCode()
const override;
4174 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4175 QVariantMap toVariantMap()
const override;
4176 bool fromVariantMap(
const QVariantMap &map )
override;
4184 bool opacityEnabled()
const;
4193 void setOpacityEnabled(
bool enabled );
4201 bool mAllowOpacity =
true;
4223 const QString &
name,
4228 const QVariant &staticSourceCrs = QVariant(),
4229 const QVariant &staticDestinationCrs = QVariant(),
4230 bool optional =
false
4236 static QString
typeName() {
return u
"coordinateoperation"_s; }
4239 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4240 QString asScriptCode()
const override;
4242 QStringList dependsOnOtherParameters()
const override;
4244 QVariantMap toVariantMap()
const override;
4245 bool fromVariantMap(
const QVariantMap &map )
override;
4309 QString valueAsPythonStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool allowNonStringValues )
const;
4311 QString mSourceParameterName;
4312 QString mDestParameterName;
4313 QVariant mSourceCrs;
4341 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4342 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4343 QString asScriptCode()
const override;
4345 QVariantMap toVariantMap()
const override;
4346 bool fromVariantMap(
const QVariantMap &map )
override;
4374 const QString &
name,
4378 bool optional =
false,
4379 const QDateTime &minValue = QDateTime(),
4380 const QDateTime &maxValue = QDateTime()
4389 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4390 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4391 QString toolTip()
const override;
4401 QDateTime minimum()
const;
4414 void setMinimum(
const QDateTime &minimum );
4423 QDateTime maximum()
const;
4436 void setMaximum(
const QDateTime &maximum );
4450 QVariantMap toVariantMap()
const override;
4451 bool fromVariantMap(
const QVariantMap &map )
override;
4452 QString userFriendlyString(
const QVariant &value )
const override;
4490 static QString
typeName() {
return u
"providerconnection"_s; }
4493 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4494 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4495 QString asScriptCode()
const override;
4497 QVariantMap toVariantMap()
const override;
4498 bool fromVariantMap(
const QVariantMap &map )
override;
4518 QString mProviderId;
4544 const QString &
name,
const QString &
description,
const QString &connectionParameterName = QString(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
4550 static QString
typeName() {
return u
"databaseschema"_s; }
4553 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4554 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4555 QString asScriptCode()
const override;
4557 QVariantMap toVariantMap()
const override;
4558 bool fromVariantMap(
const QVariantMap &map )
override;
4559 QStringList dependsOnOtherParameters()
const override;
4565 QString parentConnectionParameterName()
const;
4571 void setParentConnectionParameterName(
const QString &name );
4579 QString mParentConnectionParameterName;
4608 const QString &
name,
4610 const QString &connectionParameterName = QString(),
4611 const QString &schemaParameterName = QString(),
4613 bool optional =
false,
4620 static QString
typeName() {
return u
"databasetable"_s; }
4623 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4624 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4625 QString asScriptCode()
const override;
4627 QVariantMap toVariantMap()
const override;
4628 bool fromVariantMap(
const QVariantMap &map )
override;
4629 QStringList dependsOnOtherParameters()
const override;
4635 QString parentConnectionParameterName()
const;
4641 void setParentConnectionParameterName(
const QString &name );
4647 QString parentSchemaParameterName()
const;
4653 void setParentSchemaParameterName(
const QString &name );
4666 bool allowNewTableNames()
const;
4674 void setAllowNewTableNames(
bool allowed );
4677 QString mParentConnectionParameterName;
4678 QString mParentSchemaParameterName;
4679 bool mAllowNewTableNames =
false;
4703 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4704 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4706 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4707 QString createFileFilter()
const override;
4736 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4737 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4739 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4768 static QString
typeName() {
return u
"pointCloudDestination"_s; }
4771 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4772 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4774 QString defaultFileExtension() const override;
4775 QString createFileFilter() const override;
4781 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
4802 const QString &
name,
4807 bool optional =
false,
4817 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4818 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4819 QString asScriptCode()
const override;
4821 QStringList dependsOnOtherParameters()
const override;
4827 QString parentLayerParameterName()
const;
4833 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4839 bool allowMultiple()
const;
4845 void setAllowMultiple(
bool allowMultiple );
4855 bool defaultToAllAttributes()
const;
4865 void setDefaultToAllAttributes(
bool enabled );
4867 QVariantMap toVariantMap()
const override;
4868 bool fromVariantMap(
const QVariantMap &map )
override;
4876 QString mParentLayerParameterName;
4877 bool mAllowMultiple =
false;
4878 bool mDefaultToAllAttributes =
false;
4902 static QString
typeName() {
return u
"vectorTileDestination"_s; }
4905 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4906 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4908 QString defaultFileExtension() const override;
4909 QString createFileFilter() const override;
4915 virtual QStringList supportedOutputVectorTileLayerExtensions() const;
Provides global constants and enumerations for use throughout the application.
ProcessingSourceType
Processing data source types.
@ VectorAnyGeometry
Any vector layer with geometry.
ProcessingFileParameterBehavior
Flags which dictate the behavior of QgsProcessingParameterFile.
@ File
Parameter is a single file.
ExpressionType
Expression types.
@ Qgis
Native QGIS expression.
DistanceUnit
Units of distance.
@ Unknown
Unknown distance unit.
QFlags< RasterProcessingParameterCapability > RasterProcessingParameterCapabilities
Raster layer processing parameter capabilities.
ProcessingFieldParameterDataType
Processing field parameter data types.
@ Unknown
Unknown areal unit.
TemporalUnit
Temporal units.
@ Milliseconds
Milliseconds.
QFlags< ProcessingParameterFlag > ProcessingParameterFlags
Flags which dictate the behavior of Processing parameters.
VolumeUnit
Units of volume.
@ Unknown
Unknown volume unit.
InvalidGeometryCheck
Methods for handling of features with invalid geometries.
@ AbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
QFlags< ProcessingFeatureSourceDefinitionFlag > ProcessingFeatureSourceDefinitionFlags
Flags which control behavior for a Processing feature source.
WkbType
The WKB type describes the number of dimensions a geometry has.
ProcessingDateTimeParameterDataType
Processing date time parameter data types.
@ DateTime
Datetime values.
ProcessingNumberParameterType
Processing numeric parameter data types.
Represents a map layer containing a set of georeferenced annotations, e.g.
Represents a coordinate reference system (CRS).
An interface for objects which accept features via addFeature(s) methods.
QFlags< SinkFlag > SinkFlags
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.
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.
friend class TestQgsProcessing
virtual QString defaultFileExtension() const =0
Returns the default file extension for destination file paths associated with this parameter.
void setCreateByDefault(bool createByDefault)
Sets whether the destination should be created by default.
friend class TestQgsProcessingModelAlgorithm
bool supportsNonFileBasedOutput() const
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or ...
friend class QgsProcessingModelAlgorithm
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
bool createByDefault() const
Returns true if the destination should be created by default.
virtual bool isSupportedOutputValue(const QVariant &value, QgsProcessingContext &context, QString &error) const
Tests whether a value is a supported value for this parameter.
virtual QString generateTemporaryDestination(const QgsProcessingContext *context=nullptr) const
Generates a temporary destination value for this parameter.
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...
QgsProcessingDestinationParameter(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingDestinationParameter.
Custom exception class for processing related exceptions.
Encapsulates settings relating to a feature source input to a processing algorithm.
bool loadVariant(const QVariantMap &map)
Loads this source definition from a QVariantMap, wrapped in a QVariant.
bool operator!=(const QgsProcessingFeatureSourceDefinition &other) const
bool selectedFeaturesOnly
true if only selected features in the source should be used by algorithms.
bool operator==(const QgsProcessingFeatureSourceDefinition &other) const
QgsProperty source
Source definition.
Qgis::InvalidGeometryCheck geometryCheck
Geometry check method to apply to this source.
QgsProcessingFeatureSourceDefinition(const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, Qgis::ProcessingFeatureSourceDefinitionFlags flags=Qgis::ProcessingFeatureSourceDefinitionFlags(), Qgis::InvalidGeometryCheck geometryCheck=Qgis::InvalidGeometryCheck::AbortOnInvalid, const QString &filterExpression=QString())
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.
QgsProcessingFeatureSourceDefinition(const QString &source=QString(), bool selectedFeaturesOnly=false, long long featureLimit=-1, Qgis::ProcessingFeatureSourceDefinitionFlags flags=Qgis::ProcessingFeatureSourceDefinitionFlags(), Qgis::InvalidGeometryCheck geometryCheck=Qgis::InvalidGeometryCheck::AbortOnInvalid, const QString &filterExpression=QString())
Constructor for QgsProcessingFeatureSourceDefinition, accepting a static string source.
Qgis::ProcessingFeatureSourceDefinitionFlags flags
Flags which dictate source behavior.
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...
QVariant toVariant() const
Saves this source definition to a QVariantMap, wrapped in a QVariant.
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.
QString format() const
Returns the format (if set).
QgsProject * destinationProject
Destination project.
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.
void setFormat(const QString &format)
Sets the format of the output dataset.
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.
QgsProcessingParameterAnnotationLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterAnnotationLayer.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for area values.
void setDefaultUnit(Qgis::AreaUnit unit)
Sets the default area unit for the parameter.
QString parentParameterName() const
Returns the name of the parent parameter, or an empty string if this is not set.
Qgis::AreaUnit defaultUnit() const
Returns the default area unit for the parameter.
QgsProcessingParameterArea(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentParameterName=QString(), bool optional=false, double minValue=0, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterArea.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for authentication configuration ID values.
QString type() const override
Unique parameter type name.
QgsProcessingParameterAuthConfig(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterAuthConfig.
static QString typeName()
Returns the type name for the parameter class.
A raster band parameter for Processing algorithms.
QString type() const override
Unique parameter type name.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
QgsProcessingParameterBand(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), bool optional=false, bool allowMultiple=false)
Constructor for QgsProcessingParameterBand.
static QString typeName()
Returns the type name for the parameter class.
bool allowMultiple() const
Returns whether multiple band selections are permitted.
A boolean parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterBoolean(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterBoolean.
A color parameter for processing algorithms.
bool opacityEnabled() const
Returns true if the parameter allows opacity control.
QgsProcessingParameterColor(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool opacityEnabled=true, bool optional=false)
Constructor for QgsProcessingParameterColor.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
A coordinate operation parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
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.
QgsProcessingParameterCoordinateOperation(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &sourceCrsParameterName=QString(), const QString &destinationCrsParameterName=QString(), const QVariant &staticSourceCrs=QVariant(), const QVariant &staticDestinationCrs=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterCoordinateOperation.
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.
QgsProcessingParameterCrs(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterCrs.
QString userFriendlyString(const QVariant &value) const override
Returns a user-friendly string representation of the provided parameter value.
QString type() const override
Unique parameter type name.
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...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterDatabaseSchema(const QString &name, const QString &description, const QString &connectionParameterName=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterDatabaseSchema.
A database table name parameter for processing algorithms.
QgsProcessingParameterDatabaseTable(const QString &name, const QString &description, const QString &connectionParameterName=QString(), const QString &schemaParameterName=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool allowNewTableNames=false)
Constructor for QgsProcessingParameterDatabaseTable.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
bool allowNewTableNames() const
Returns true if the parameter allows users to enter names for a new (non-existing) tables.
A datetime (or pure date or time) parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterDateTime(const QString &name, const QString &description=QString(), Qgis::ProcessingDateTimeParameterDataType type=Qgis::ProcessingDateTimeParameterDataType::DateTime, const QVariant &defaultValue=QVariant(), bool optional=false, const QDateTime &minValue=QDateTime(), const QDateTime &maxValue=QDateTime())
Constructor for QgsProcessingParameterDateTime.
Base class for the definition of processing parameters.
QgsProcessingAlgorithm * mAlgorithm
Pointer to algorithm which owns this parameter.
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.
QString valueAsStringPrivate(const QVariant &value, QgsProcessingContext &context, bool &ok, ValueAsStringFlags flags) const
Internal method for evaluating values as string.
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.
Qgis::ProcessingParameterFlags mFlags
Parameter flags.
virtual QString userFriendlyString(const QVariant &value) const
Returns a user-friendly string representation of the provided parameter value.
QFlags< ValueAsStringFlag > ValueAsStringFlags
void setMetadata(const QVariantMap &metadata)
Sets the parameter's freeform metadata.
void setFlags(Qgis::ProcessingParameterFlags flags)
Sets the flags associated with the parameter.
QgsProcessingProvider * provider() const
Returns a pointer to the provider for the algorithm which owns this parameter.
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.
bool mIsDynamic
True for dynamic parameters, which can have data-defined (QgsProperty) based values.
QVariantMap metadata() const
Returns the parameter's freeform metadata.
QString description() const
Returns the description for the parameter.
QgsProcessingParameterDefinition(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QString &help=QString())
Constructor for QgsProcessingParameterDefinition.
QString mDynamicLayerParameterName
Linked vector layer parameter name for dynamic properties.
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...
friend class QgsProcessingAlgorithm
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.
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.
Qgis::ProcessingParameterFlags flags() const
Returns any flags associated with the parameter.
QVariant mGuiDefault
Default value for parameter in GUI.
QgsPropertyDefinition mPropertyDefinition
Data defined property definition.
QVariant defaultGuiValueFromSetting() const
Default gui value for an algorithm parameter from settings.
bool isDynamic() const
Returns true if the parameter supports is dynamic, and can support data-defined values (i....
virtual ~QgsProcessingParameterDefinition()=default
QVariantMap & metadata()
Returns the parameter's freeform metadata.
QVariant valueAsJsonObjectPrivate(const QVariant &value, QgsProcessingContext &context, ValueAsStringFlags flags) const
Internal method for evaluating values as JSON objects.
virtual QColor modelColor() const
Returns the color to use for the parameter in model designer windows.
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.
QString parentParameterName() const
Returns the name of the parent parameter, or an empty string if this is not set.
Qgis::DistanceUnit defaultUnit() const
Returns the default distance unit for the parameter.
QgsProcessingParameterDistance(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentParameterName=QString(), bool optional=false, double minValue=std::numeric_limits< double >::lowest()+1, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterDistance.
A double numeric parameter for duration values.
void setDefaultUnit(Qgis::TemporalUnit unit)
Sets the default duration unit for the parameter.
Qgis::TemporalUnit defaultUnit() const
Returns the default duration unit for the parameter.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterDuration(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, double minValue=std::numeric_limits< double >::lowest()+1, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterDuration.
static QString typeName()
Returns the type name for the parameter class.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
QString userFriendlyString(const QVariant &value) const override
Returns a user-friendly string representation of the provided parameter value.
bool allowMultiple() const
Returns true if the parameter allows multiple selected values.
QStringList options() const
Returns the list of acceptable options for the parameter.
QgsProcessingParameterEnum(const QString &name, const QString &description=QString(), const QStringList &options=QStringList(), bool allowMultiple=false, const QVariant &defaultValue=QVariant(), bool optional=false, bool usesStaticStrings=false)
Constructor for QgsProcessingParameterEnum.
QString type() const override
Unique parameter type name.
bool usesStaticStrings() const
Returns true if the parameter uses static (non-translated) string values for its enumeration choice l...
static QString typeName()
Returns the type name for the parameter class.
An expression parameter for processing algorithms.
QgsProcessingParameterExpression(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), bool optional=false, Qgis::ExpressionType type=Qgis::ExpressionType::Qgis)
Constructor for QgsProcessingParameterExpression.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A rectangular map extent parameter for processing algorithms.
QgsProcessingParameterExtent(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterExtent.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
A feature sink output for processing algorithms.
QgsProcessingParameterFeatureSink(const QString &name, const QString &description=QString(), Qgis::ProcessingSourceType type=Qgis::ProcessingSourceType::VectorAnyGeometry, const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true, bool supportsAppend=false)
Constructor for QgsProcessingParameterFeatureSink.
QString type() const override
Unique parameter type name.
bool supportsAppend() const
Returns true if the sink supports appending features to an existing table.
static QString typeName()
Returns the type name for the parameter class.
An input feature source (such as vector layers) parameter for processing algorithms.
QgsProcessingParameterFeatureSource(const QString &name, const QString &description=QString(), const QList< int > &types=QList< int >(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterFeatureSource.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A vector layer or feature source field parameter for processing algorithms.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
bool allowMultiple() const
Returns whether multiple field selections are permitted.
QString type() const override
Unique parameter type name.
bool defaultToAllFields() const
Returns whether a parameter which allows multiple selections (see allowMultiple()) should automatical...
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterField(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), Qgis::ProcessingFieldParameterDataType type=Qgis::ProcessingFieldParameterDataType::Any, bool allowMultiple=false, bool optional=false, bool defaultToAllFields=false)
Constructor for QgsProcessingParameterField.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
QgsProcessingParameterFileDestination(const QString &name, const QString &description=QString(), const QString &fileFilter=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterFileDestination.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QString fileFilter() const
Returns the file filter string for file destinations compatible with this parameter.
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.
QgsProcessingParameterFile(const QString &name, const QString &description=QString(), Qgis::ProcessingFileParameterBehavior behavior=Qgis::ProcessingFileParameterBehavior::File, const QString &extension=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QString &fileFilter=QString())
Constructor for QgsProcessingParameterFile.
void setBehavior(Qgis::ProcessingFileParameterBehavior behavior)
Sets the parameter behavior (e.g.
QString type() const override
Unique parameter type name.
QString fileFilter() const
Returns the file filter string for file destinations compatible with this parameter.
Qgis::ProcessingFileParameterBehavior behavior() const
Returns the parameter behavior (e.g.
A folder destination parameter, for specifying the destination path for a folder created by the algor...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterFolderDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterFolderDestination.
A geometry parameter for processing algorithms.
void setGeometryTypes(const QList< int > &geometryTypes)
Sets the allowed geometryTypes, as a list of Qgis::GeometryType values.
QString type() const override
Unique parameter type name.
bool allowMultipart() const
Returns the parameter allow multipart geometries.
QgsProcessingParameterGeometry(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QList< int > &geometryTypes=QList< int >(), bool allowMultipart=true)
Constructor for QgsProcessingParameterGeometry.
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.
QString type() const override
Unique parameter type name.
QgsProcessingParameterLayoutItem(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayoutParameterName=QString(), int itemType=-1, bool optional=false)
Constructor for QgsProcessingParameterLayoutItem.
QString parentLayoutParameterName() const
Returns the name of the parent layout parameter, or an empty string if this is not set.
static QString typeName()
Returns the type name for the parameter class.
int itemType() const
Returns the acceptable item type, or -1 if any item type is allowed.
A print layout parameter, allowing users to select a print layout.
QgsProcessingParameterLayout(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterLayout.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
void setDataTypes(const QList< int > &types)
Sets the geometry types for sources acceptable by the parameter.
QgsProcessingParameterLimitedDataTypes(const QList< int > &types=QList< int >())
Constructor for QgsProcessingParameterLimitedDataTypes, with a list of acceptable data types.
QList< int > mDataTypes
List of acceptable data types for the parameter.
QList< int > dataTypes() const
Returns the geometry types for sources acceptable by the parameter.
A map layer parameter for processing algorithms.
QString type() const override
Unique parameter type name.
QgsProcessingParameterMapLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, const QList< int > &types=QList< int >())
Constructor for QgsProcessingParameterMapLayer.
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 ...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterMapTheme(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMapTheme.
A table (matrix) parameter for processing algorithms.
QStringList headers() const
Returns a list of column headers (if set).
int numberRows() const
Returns the fixed number of rows in the table.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterMatrix(const QString &name, const QString &description=QString(), int numberRows=3, bool hasFixedNumberRows=false, const QStringList &headers=QStringList(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMatrix.
QString type() const override
Unique parameter type name.
bool hasFixedNumberRows() const
Returns whether the table has a fixed number of rows.
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.
QgsProcessingParameterMeshLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMeshLayer.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A parameter for processing algorithms which accepts multiple map layers.
Qgis::ProcessingSourceType layerType() const
Returns the layer type for layers acceptable by the parameter.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterMultipleLayers(const QString &name, const QString &description=QString(), Qgis::ProcessingSourceType layerType=Qgis::ProcessingSourceType::VectorAnyGeometry, const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterMultipleLayers.
QString type() const override
Unique parameter type name.
A numeric parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterNumber(const QString &name, const QString &description=QString(), Qgis::ProcessingNumberParameterType type=Qgis::ProcessingNumberParameterType::Integer, const QVariant &defaultValue=QVariant(), bool optional=false, double minValue=std::numeric_limits< double >::lowest()+1, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterNumber.
A point cloud layer attribute parameter for Processing algorithms.
QgsProcessingParameterPointCloudAttribute(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentLayerParameterName=QString(), bool allowMultiple=false, bool optional=false, bool defaultToAllAttributes=false)
Constructor for QgsProcessingParameterField.
QString type() const override
Unique parameter type name.
QString parentLayerParameterName() const
Returns the name of the parent layer parameter, or an empty string if this is not set.
static QString typeName()
Returns the type name for the parameter class.
bool allowMultiple() const
Returns whether multiple field selections are permitted.
bool defaultToAllAttributes() const
Returns whether a parameter which allows multiple selections (see allowMultiple()) should automatical...
A point cloud layer destination parameter, for specifying the destination path for a point cloud laye...
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterPointCloudDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterPointCloudDestination.
A point cloud layer parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterPointCloudLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterPointCloudLayer.
A point parameter for processing algorithms.
QString type() const override
Unique parameter type name.
QgsProcessingParameterPoint(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterPoint.
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...
QString type() const override
Unique parameter type name.
QgsProcessingParameterProviderConnection(const QString &name, const QString &description, const QString &provider, const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterProviderConnection, for the specified provider type.
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.
QgsProcessingParameterRange(const QString &name, const QString &description=QString(), Qgis::ProcessingNumberParameterType type=Qgis::ProcessingNumberParameterType::Integer, const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterRange.
QString type() const override
Unique parameter type name.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
QString type() const override
Unique parameter type name.
QgsProcessingParameterRasterDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterRasterDestination.
static QString typeName()
Returns the type name for the parameter class.
A raster layer parameter for processing algorithms.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterRasterLayer(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterRasterLayer.
A double numeric parameter for map scale values.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterScale(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterScale.
A string parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
bool multiLine() const
Returns true if the parameter allows multiline strings.
QgsProcessingParameterString(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool multiLine=false, bool optional=false)
Constructor for QgsProcessingParameterString.
A vector layer destination parameter, for specifying the destination path for a vector layer created ...
QgsProcessingParameterVectorDestination(const QString &name, const QString &description=QString(), Qgis::ProcessingSourceType type=Qgis::ProcessingSourceType::VectorAnyGeometry, const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterVectorDestination.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A vector layer (with or without geometry) parameter for processing algorithms.
QString type() const override
Unique parameter type name.
QgsProcessingParameterVectorLayer(const QString &name, const QString &description=QString(), const QList< int > &types=QList< int >(), const QVariant &defaultValue=QVariant(), bool optional=false)
Constructor for QgsProcessingParameterVectorLayer.
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...
QgsProcessingParameterVectorTileDestination(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), bool optional=false, bool createByDefault=true)
Constructor for QgsProcessingParameterVectorTileDestination.
static QString typeName()
Returns the type name for the parameter class.
QString type() const override
Unique parameter type name.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for volume values.
static QString typeName()
Returns the type name for the parameter class.
QgsProcessingParameterVolume(const QString &name, const QString &description=QString(), const QVariant &defaultValue=QVariant(), const QString &parentParameterName=QString(), bool optional=false, double minValue=0, double maxValue=std::numeric_limits< double >::max())
Constructor for QgsProcessingParameterVolume.
Qgis::VolumeUnit defaultUnit() const
Returns the default volume unit for the parameter.
void setDefaultUnit(Qgis::VolumeUnit unit)
Sets the default volume unit for the parameter.
QString parentParameterName() const
Returns the name of the parent parameter, or an empty string if this is not set.
A collection of utilities for working with parameters when running a processing algorithm.
static QString descriptionFromName(const QString &name)
Creates an autogenerated parameter description from a parameter name.
static int parameterAsEnum(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a enum value.
static double parameterAsDouble(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static double value.
static QgsPointXY parameterAsPoint(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a point.
static QString parameterAsOutputLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a output layer destination.
static QgsFeatureSink * parameterAsSink(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsFields &fields, Qgis::WkbType geometryType, const QgsCoordinateReferenceSystem &crs, QgsProcessingContext &context, QString &destinationIdentifier, QgsFeatureSink::SinkFlags sinkFlags=QgsFeatureSink::SinkFlags(), const QVariantMap &createOptions=QVariantMap(), const QStringList &datasourceOptions=QStringList(), const QStringList &layerOptions=QStringList())
Evaluates the parameter with matching definition to a feature sink.
static QgsPrintLayout * parameterAsLayout(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a print layout.
static QList< QgsMapLayer * > parameterAsLayerList(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessing::LayerOptionsFlags flags=QgsProcessing::LayerOptionsFlags())
Evaluates the parameter with matching definition to a list of map layers.
static QTime parameterAsTime(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static time value.
static QgsProcessingParameterDefinition * parameterFromVariantMap(const QVariantMap &map)
Creates a new QgsProcessingParameterDefinition using the configuration from a supplied variant map.
static QgsRectangle parameterAsExtent(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a rectangular extent.
static QgsCoordinateReferenceSystem parameterAsGeometryCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the coordinate reference system associated with a geometry parameter value.
static QgsAnnotationLayer * parameterAsAnnotationLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to an annotation layer.
static QString parameterAsEnumString(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static enum string.
static QList< double > parameterAsRange(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a range of values.
static QStringList parameterAsStrings(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of strings (e.g.
static QList< int > parameterAsInts(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of integer values.
static QString parameterAsConnectionName(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a connection name string.
static QgsProcessingFeatureSource * parameterAsSource(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a feature source.
static QString parameterAsFileOutput(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a file based output destination.
static bool parameterAsBoolean(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static boolean value.
static QgsPointCloudLayer * parameterAsPointCloudLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessing::LayerOptionsFlags flags=QgsProcessing::LayerOptionsFlags())
Evaluates the parameter with matching definition to a point cloud layer.
static QgsCoordinateReferenceSystem parameterAsPointCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the coordinate reference system associated with an point parameter value.
static QgsLayoutItem * parameterAsLayoutItem(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsPrintLayout *layout)
Evaluates the parameter with matching definition to a print layout item, taken from the specified lay...
static bool parameterAsBool(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static boolean value.
static QString parameterAsCompatibleSourceLayerPathAndLayerName(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat=QString("shp"), QgsProcessingFeedback *feedback=nullptr, QString *layerName=nullptr)
Evaluates the parameter with matching definition to a source vector layer file path and layer name of...
static QgsMeshLayer * parameterAsMeshLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition and value to a mesh layer.
static QString parameterAsCompatibleSourceLayerPath(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QStringList &compatibleFormats, const QString &preferredFormat=QString("shp"), QgsProcessingFeedback *feedback=nullptr)
Evaluates the parameter with matching definition to a source vector layer file path of compatible for...
static QgsProcessingParameterDefinition * parameterFromScriptCode(const QString &code)
Creates a new QgsProcessingParameterDefinition using the configuration from a supplied script code st...
static QColor parameterAsColor(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the color associated with an point parameter value, or an invalid color if the parameter was ...
static QgsVectorLayer * parameterAsVectorLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a vector layer.
static QString parameterAsOutputFormat(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a output format.
static int parameterAsInt(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static integer value.
static QString parameterAsDatabaseTableName(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a database table name.
static QString parameterAsSchema(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a database schema name.
static QgsGeometry parameterAsGeometry(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a geometry.
static QgsMapLayer * parameterAsLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingUtils::LayerHint layerHint=QgsProcessingUtils::LayerHint::UnknownType, QgsProcessing::LayerOptionsFlags flags=QgsProcessing::LayerOptionsFlags())
Evaluates the parameter with matching definition to a map layer.
static QString parameterAsExpression(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to an expression.
static QString parameterAsString(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static string value.
static QgsRasterLayer * parameterAsRasterLayer(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a raster layer.
static QList< int > parameterAsEnums(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to list of enum values.
static QStringList parameterAsEnumStrings(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to list of static enum strings.
static QgsGeometry parameterAsExtentGeometry(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem())
Evaluates the parameter with matching definition to a rectangular extent, and returns a geometry cove...
static QStringList parameterAsFileList(const QgsProcessingParameterDefinition *definition, const QVariant &value, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of files (for QgsProcessingParameterMultip...
static bool isDynamic(const QVariantMap ¶meters, const QString &name)
Returns true if the parameter with matching name is a dynamic parameter, and must be evaluated once f...
static Q_DECL_DEPRECATED QStringList parameterAsFields(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a list of fields.
static QgsCoordinateReferenceSystem parameterAsExtentCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Returns the coordinate reference system associated with an extent parameter value.
static QDateTime parameterAsDateTime(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static datetime value.
static QString parameterAsFile(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a file/folder name.
static QDate parameterAsDate(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, const QgsProcessingContext &context)
Evaluates the parameter with matching definition to a static date value.
static QVariantList parameterAsMatrix(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a matrix/table of values.
static QgsCoordinateReferenceSystem parameterAsCrs(const QgsProcessingParameterDefinition *definition, const QVariantMap ¶meters, QgsProcessingContext &context)
Evaluates the parameter with matching definition to a coordinate reference system.
Abstract base class for processing providers.
Encapsulates settings relating to a raster layer input to a processing algorithm.
double referenceScale
If set to a value > 0, sets a scale at which a raster (e.g., a WMS) should be requested or rendered.
int dpi
Indicates the resolution of the raster source (e.g., a WMS server).
bool operator==(const QgsProcessingRasterLayerDefinition &other) const
QgsProperty source
Source definition.
bool loadVariant(const QVariantMap &map)
Loads this raster layer definition from a QVariantMap, wrapped in a QVariant.
QgsProcessingRasterLayerDefinition(const QString &source=QString(), const double referenceScale=0, const int dpi=96)
Constructor for QgsProcessingRasterLayerDefinition, accepting a static string source.
QVariant toVariant() const
Saves this raster layer definition to a QVariantMap, wrapped in a QVariant.
QgsProcessingRasterLayerDefinition(const QgsProperty &source, const double referenceScale=0, const int dpi=96)
Constructor for QgsProcessingRasterLayerDefinition, accepting a QgsProperty source.
bool operator!=(const QgsProcessingRasterLayerDefinition &other) const
LayerHint
Layer type hints.
@ UnknownType
Unknown layer type.
Contains enumerations and other constants for use in processing algorithms and parameters.
QFlags< LayerOptionsFlag > LayerOptionsFlags
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
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 dataset.
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)
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.