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;
449 sipType = sipType_QgsProcessingParameterBoolean;
451 sipType = sipType_QgsProcessingParameterCrs;
453 sipType = sipType_QgsProcessingParameterMapLayer;
455 sipType = sipType_QgsProcessingParameterExtent;
457 sipType = sipType_QgsProcessingParameterPoint;
459 sipType = sipType_QgsProcessingParameterGeometry;
461 sipType = sipType_QgsProcessingParameterFile;
463 sipType = sipType_QgsProcessingParameterMatrix;
465 sipType = sipType_QgsProcessingParameterMultipleLayers;
467 sipType = sipType_QgsProcessingParameterNumber;
469 sipType = sipType_QgsProcessingParameterDistance;
471 sipType = sipType_QgsProcessingParameterArea;
473 sipType = sipType_QgsProcessingParameterVolume;
475 sipType = sipType_QgsProcessingParameterDuration;
477 sipType = sipType_QgsProcessingParameterScale;
479 sipType = sipType_QgsProcessingParameterRange;
481 sipType = sipType_QgsProcessingParameterRasterLayer;
483 sipType = sipType_QgsProcessingParameterMeshLayer;
485 sipType = sipType_QgsProcessingParameterEnum;
487 sipType = sipType_QgsProcessingParameterString;
489 sipType = sipType_QgsProcessingParameterExpression;
491 sipType = sipType_QgsProcessingParameterAuthConfig;
493 sipType = sipType_QgsProcessingParameterVectorLayer;
495 sipType = sipType_QgsProcessingParameterField;
497 sipType = sipType_QgsProcessingParameterFeatureSource;
499 sipType = sipType_QgsProcessingParameterFeatureSink;
501 sipType = sipType_QgsProcessingParameterVectorDestination;
503 sipType = sipType_QgsProcessingParameterRasterDestination;
505 sipType = sipType_QgsProcessingParameterPointCloudDestination;
507 sipType = sipType_QgsProcessingParameterFileDestination;
509 sipType = sipType_QgsProcessingParameterFolderDestination;
511 sipType = sipType_QgsProcessingParameterBand;
513 sipType = sipType_QgsProcessingParameterLayout;
515 sipType = sipType_QgsProcessingParameterLayoutItem;
517 sipType = sipType_QgsProcessingParameterColor;
519 sipType = sipType_QgsProcessingParameterCoordinateOperation;
521 sipType = sipType_QgsProcessingParameterMapTheme;
523 sipType = sipType_QgsProcessingParameterDateTime;
525 sipType = sipType_QgsProcessingParameterProviderConnection;
527 sipType = sipType_QgsProcessingParameterDatabaseSchema;
529 sipType = sipType_QgsProcessingParameterDatabaseTable;
531 sipType = sipType_QgsProcessingParameterFieldMapping;
533 sipType = sipType_QgsProcessingParameterTinInputLayers;
535 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
537 sipType = sipType_QgsProcessingParameterDxfLayers;
539 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
541 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
543 sipType = sipType_QgsProcessingParameterPointCloudLayer;
545 sipType = sipType_QgsProcessingParameterAnnotationLayer;
547 sipType = sipType_QgsProcessingParameterPointCloudAttribute;
549 sipType = sipType_QgsProcessingParameterVectorTileDestination;
551 sipType = sipType_QgsProcessingParameterInterpolationPixelSize;
592 virtual QString
type()
const = 0;
679 QVariant guiDefaultValueOverride()
const;
706 QVariant defaultValueForGui()
const;
727 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
736 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
749 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
786 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
792 virtual QString asScriptCode()
const;
810 virtual QVariantMap toVariantMap()
const;
817 virtual bool fromVariantMap(
const QVariantMap &map );
865 virtual QString toolTip()
const;
972 AllowMapLayerValues = 1 << 0,
1076 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1283 const QVariantMap ¶meters,
1288 QString &destinationIdentifier
SIP_OUT,
1290 const QVariantMap &createOptions = QVariantMap(),
1291 const QStringList &datasourceOptions = QStringList(),
1292 const QStringList &layerOptions = QStringList()
1316 const QVariant &value,
1321 QString &destinationIdentifier
SIP_OUT,
1323 const QVariantMap &createOptions = QVariantMap(),
1324 const QStringList &datasourceOptions = QStringList(),
1325 const QStringList &layerOptions = QStringList()
1367 const QVariantMap ¶meters,
1369 const QStringList &compatibleFormats,
1370 const QString &preferredFormat = QString(
"shp" ),
1405 const QVariantMap ¶meters,
1407 const QStringList &compatibleFormats,
1408 const QString &preferredFormat = QString(
"shp" ),
1410 QString *layerName
SIP_OUT =
nullptr
1422 const QVariantMap ¶meters,
1439 const QVariant &value,
1952 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1975 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1976 QString asScriptCode()
const override;
2005 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2006 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2008 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2035 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2036 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2038 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2051 static bool variantIsValidStringForExtent(
const QVariant &value );
2074 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2075 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2109 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2110 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2111 QString asScriptCode()
const override;
2113 QVariantMap toVariantMap()
const override;
2114 bool fromVariantMap(
const QVariantMap &map )
override;
2140 QString userFriendlyString(
const QVariant &value )
const override;
2148 QList<int> mGeomTypes;
2149 bool mAllowMultipart;
2168 const QString &
name,
2173 bool optional =
false,
2183 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2184 QString asScriptCode()
const override;
2186 QString createFileFilter()
const override;
2218 void setExtension(
const QString &extension );
2226 QString fileFilter()
const;
2237 void setFileFilter(
const QString &filter );
2239 QVariantMap toVariantMap()
const override;
2240 bool fromVariantMap(
const QVariantMap &map )
override;
2252 QString mFileFilter;
2267 const QString &
name,
2271 const QStringList &
headers = QStringList(),
2273 bool optional =
false
2283 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2284 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2291 QStringList headers()
const;
2297 void setHeaders(
const QStringList &headers );
2305 int numberRows()
const;
2313 void setNumberRows(
int rows );
2320 bool hasFixedNumberRows()
const;
2327 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2329 QVariantMap toVariantMap()
const override;
2330 bool fromVariantMap(
const QVariantMap &map )
override;
2338 QStringList mHeaders;
2339 int mNumberRows = 3;
2340 bool mFixedNumberRows =
false;
2355 const QString &
name,
2359 bool optional =
false
2368 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2369 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2371 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2372 QString asScriptCode()
const override;
2374 QString createFileFilter()
const override;
2393 int minimumNumberInputs()
const;
2400 void setMinimumNumberInputs(
int minimum );
2402 QVariantMap toVariantMap()
const override;
2403 bool fromVariantMap(
const QVariantMap &map )
override;
2412 int mMinimumNumberInputs = 0;
2439 const QString &
name,
2443 bool optional =
false,
2444 double minValue = std::numeric_limits<double>::lowest() + 1,
2445 double maxValue = std::numeric_limits<double>::max()
2455 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2456 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2457 QString toolTip()
const override;
2464 double minimum()
const;
2470 void setMinimum(
double minimum );
2476 double maximum()
const;
2482 void setMaximum(
double maximum );
2496 QVariantMap toVariantMap()
const override;
2497 bool fromVariantMap(
const QVariantMap &map )
override;
2505 double mMin = std::numeric_limits<double>::lowest() + 1;
2506 double mMax = std::numeric_limits<double>::max();
2538 const QString &
name,
2542 bool optional =
false,
2543 double minValue = std::numeric_limits<double>::lowest() + 1,
2544 double maxValue = std::numeric_limits<double>::max()
2552 QString userFriendlyString(
const QVariant &value )
const override;
2556 QString type() const override;
2557 QStringList dependsOnOtherParameters() const override;
2558 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2564 QString parentParameterName() const;
2570 void setParentParameterName( const QString &parentParameterName );
2588 QVariantMap toVariantMap()
const override;
2589 bool fromVariantMap(
const QVariantMap &map )
override;
2592 QString mParentParameterName;
2625 const QString &
name,
2629 bool optional =
false,
2630 double minValue = 0,
2631 double maxValue = std::numeric_limits<double>::max()
2641 QString type() const override;
2642 QStringList dependsOnOtherParameters() const override;
2643 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2649 QString parentParameterName() const;
2655 void setParentParameterName( const QString &parentParameterName );
2671 QVariantMap toVariantMap()
const override;
2672 bool fromVariantMap(
const QVariantMap &map )
override;
2673 QString userFriendlyString(
const QVariant &value )
const override;
2676 QString mParentParameterName;
2709 const QString &
name,
2713 bool optional =
false,
2714 double minValue = 0,
2715 double maxValue = std::numeric_limits<double>::max()
2725 QString type() const override;
2726 QStringList dependsOnOtherParameters() const override;
2727 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2733 QString parentParameterName() const;
2739 void setParentParameterName( const QString &parentParameterName );
2755 QVariantMap toVariantMap()
const override;
2756 bool fromVariantMap(
const QVariantMap &map )
override;
2757 QString userFriendlyString(
const QVariant &value )
const override;
2760 QString mParentParameterName;
2780 const QString &
name,
2783 bool optional =
false,
2784 double minValue = std::numeric_limits<double>::lowest() + 1,
2785 double maxValue = std::numeric_limits<double>::max()
2795 QString type() const override;
2796 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2812 QVariantMap toVariantMap()
const override;
2813 bool fromVariantMap(
const QVariantMap &map )
override;
2814 QString userFriendlyString(
const QVariant &value )
const override;
2845 QString type() const override;
2846 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
2866 const QString &
name,
2870 bool optional =
false
2880 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2881 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2896 QVariantMap toVariantMap()
const override;
2897 bool fromVariantMap(
const QVariantMap &map )
override;
2927 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2928 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2930 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2931 QString createFileFilter()
const override;
2980 const QString &
name,
2982 const QStringList &
options = QStringList(),
2985 bool optional =
false,
2997 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2998 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2999 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
3000 QString asScriptCode()
const override;
3007 QStringList options()
const;
3013 void setOptions(
const QStringList &options );
3019 bool allowMultiple()
const;
3025 void setAllowMultiple(
bool allowMultiple );
3033 bool usesStaticStrings()
const;
3041 void setUsesStaticStrings(
bool usesStaticStrings );
3043 QVariantMap toVariantMap()
const override;
3044 bool fromVariantMap(
const QVariantMap &map )
override;
3052 QStringList mOptions;
3053 bool mAllowMultiple =
false;
3054 bool mUsesStaticStrings =
false;
3097 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3098 QString asScriptCode()
const override;
3105 bool multiLine()
const;
3111 void setMultiLine(
bool multiLine );
3113 QVariantMap toVariantMap()
const override;
3114 bool fromVariantMap(
const QVariantMap &map )
override;
3122 bool mMultiLine =
false;
3152 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3153 QString asScriptCode()
const override;
3173 const QString &
name,
3177 bool optional =
false,
3187 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3188 QStringList dependsOnOtherParameters()
const override;
3195 QString parentLayerParameterName()
const;
3201 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3219 QVariantMap toVariantMap()
const override;
3220 bool fromVariantMap(
const QVariantMap &map )
override;
3228 QString mParentLayerParameterName;
3277 const QString &
name,
const QString &
description = QString(),
const QList< int > &types = QList< int >(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
3286 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3287 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3289 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3291 QString createFileFilter()
const override;
3293 QVariantMap toVariantMap()
const override;
3294 bool fromVariantMap(
const QVariantMap &map )
override;
3322 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3323 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3325 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3326 QString createFileFilter()
const override;
3346 const QString &
name,
const QString &
description = QString(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false,
const QList< int > &types = QList< int >()
3355 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3356 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3358 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3359 QString asScriptCode()
const override;
3361 QString createFileFilter()
const override;
3363 QVariantMap toVariantMap()
const override;
3364 bool fromVariantMap(
const QVariantMap &map )
override;
3384 const QString &
name,
3390 bool optional =
false,
3400 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3401 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3402 QString asScriptCode()
const override;
3404 QStringList dependsOnOtherParameters()
const override;
3410 QString parentLayerParameterName()
const;
3416 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3434 bool allowMultiple()
const;
3440 void setAllowMultiple(
bool allowMultiple );
3451 bool defaultToAllFields()
const;
3462 void setDefaultToAllFields(
bool enabled );
3464 QVariantMap toVariantMap()
const override;
3465 bool fromVariantMap(
const QVariantMap &map )
override;
3473 QString mParentLayerParameterName;
3475 bool mAllowMultiple =
false;
3476 bool mDefaultToAllFields =
false;
3492 const QString &
name,
const QString &
description = QString(),
const QList< int > &types = QList< int >(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
3501 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3502 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3504 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3505 QString asScriptCode()
const override;
3507 QString createFileFilter()
const override;
3509 QVariantMap toVariantMap()
const override;
3510 bool fromVariantMap(
const QVariantMap &map )
override;
3536 QVariantMap toVariantMap()
const override;
3537 bool fromVariantMap(
const QVariantMap &map )
override;
3539 QString createFileFilter()
const override;
3625 bool mSupportsNonFileBasedOutputs =
true;
3626 bool mCreateByDefault =
true;
3651 const QString &
name,
3655 bool optional =
false,
3666 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3667 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3668 QString asScriptCode()
const override;
3670 QString defaultFileExtension() const override;
3671 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3672 QString createFileFilter() const override;
3679 virtual QStringList supportedOutputVectorLayerExtensions() const;
3685 Qgis::ProcessingSourceType dataType() const;
3691 bool hasGeometry() const;
3697 void setDataType(
Qgis::ProcessingSourceType type );
3707 bool supportsAppend() const;
3717 void setSupportsAppend(
bool supportsAppend );
3719 QVariantMap toVariantMap() const override;
3720 bool fromVariantMap( const QVariantMap &map ) override;
3721 QString generateTemporaryDestination( const
QgsProcessingContext *context =
nullptr ) const override;
3729 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3730 bool mSupportsAppend = false;
3753 const QString &
name,
3757 bool optional =
false,
3764 static QString
typeName() {
return u
"vectorDestination"_s; }
3767 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3768 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3769 QString asScriptCode()
const override;
3771 QString defaultFileExtension() const override;
3772 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3773 QString createFileFilter() const override;
3780 virtual QStringList supportedOutputVectorLayerExtensions() const;
3786 Qgis::ProcessingSourceType dataType() const;
3792 bool hasGeometry() const;
3798 void setDataType(
Qgis::ProcessingSourceType type );
3800 QVariantMap toVariantMap() const override;
3801 bool fromVariantMap( const QVariantMap &map ) override;
3810 Qgis::ProcessingSourceType mDataType =
Qgis::ProcessingSourceType::VectorAnyGeometry;
3833 static QString
typeName() {
return u
"rasterDestination"_s; }
3836 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3837 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3839 QString defaultFileExtension() const override;
3847 QString defaultFileFormat() const;
3849 QString createFileFilter() const override;
3857 Q_DECL_DEPRECATED virtual QStringList supportedOutputRasterLayerExtensions() const
SIP_DEPRECATED;
3864 virtual QList<QPair<QString, QString>> supportedOutputRasterLayerFormatAndExtensions() const;
3908 static QString
typeName() {
return u
"fileDestination"_s; }
3911 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3912 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3914 QString defaultFileExtension() const override;
3915 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonOutputType::PythonQgsProcessingAlgorithmSubclass ) const override;
3916 QString createFileFilter() const override;
3922 QString fileFilter() const;
3928 void setFileFilter( const QString &filter );
3930 QVariantMap toVariantMap() const override;
3931 bool fromVariantMap( const QVariantMap &map ) override;
3940 QString mFileFilter;
3960 static QString
typeName() {
return u
"folderDestination"_s; }
3963 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3965 QString defaultFileExtension() const override;
3994 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3995 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3996 QString asScriptCode()
const override;
3997 QStringList dependsOnOtherParameters()
const override;
4004 QString parentLayerParameterName()
const;
4010 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4012 QVariantMap toVariantMap()
const override;
4013 bool fromVariantMap(
const QVariantMap &map )
override;
4025 bool allowMultiple()
const;
4032 void setAllowMultiple(
bool allowMultiple );
4035 QString mParentLayerParameterName;
4036 bool mAllowMultiple =
false;
4064 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4065 QString asScriptCode()
const override;
4101 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4102 QString asScriptCode()
const override;
4104 QVariantMap toVariantMap()
const override;
4105 bool fromVariantMap(
const QVariantMap &map )
override;
4106 QStringList dependsOnOtherParameters()
const override;
4117 QString parentLayoutParameterName()
const;
4123 void setParentLayoutParameterName(
const QString &name );
4132 int itemType()
const;
4141 void setItemType(
int type );
4144 QString mParentLayoutParameterName;
4174 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4175 QString asScriptCode()
const override;
4177 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4178 QVariantMap toVariantMap()
const override;
4179 bool fromVariantMap(
const QVariantMap &map )
override;
4187 bool opacityEnabled()
const;
4196 void setOpacityEnabled(
bool enabled );
4204 bool mAllowOpacity =
true;
4226 const QString &
name,
4231 const QVariant &staticSourceCrs = QVariant(),
4232 const QVariant &staticDestinationCrs = QVariant(),
4233 bool optional =
false
4239 static QString
typeName() {
return u
"coordinateoperation"_s; }
4242 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4243 QString asScriptCode()
const override;
4245 QStringList dependsOnOtherParameters()
const override;
4247 QVariantMap toVariantMap()
const override;
4248 bool fromVariantMap(
const QVariantMap &map )
override;
4312 QString valueAsPythonStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool allowNonStringValues )
const;
4314 QString mSourceParameterName;
4315 QString mDestParameterName;
4316 QVariant mSourceCrs;
4344 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4345 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4346 QString asScriptCode()
const override;
4348 QVariantMap toVariantMap()
const override;
4349 bool fromVariantMap(
const QVariantMap &map )
override;
4377 const QString &
name,
4381 bool optional =
false,
4382 const QDateTime &minValue = QDateTime(),
4383 const QDateTime &maxValue = QDateTime()
4392 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4393 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4394 QString toolTip()
const override;
4404 QDateTime minimum()
const;
4417 void setMinimum(
const QDateTime &minimum );
4426 QDateTime maximum()
const;
4439 void setMaximum(
const QDateTime &maximum );
4453 QVariantMap toVariantMap()
const override;
4454 bool fromVariantMap(
const QVariantMap &map )
override;
4455 QString userFriendlyString(
const QVariant &value )
const override;
4493 static QString
typeName() {
return u
"providerconnection"_s; }
4496 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4497 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4498 QString asScriptCode()
const override;
4500 QVariantMap toVariantMap()
const override;
4501 bool fromVariantMap(
const QVariantMap &map )
override;
4521 QString mProviderId;
4547 const QString &
name,
const QString &
description,
const QString &connectionParameterName = QString(),
const QVariant &
defaultValue = QVariant(),
bool optional =
false
4553 static QString
typeName() {
return u
"databaseschema"_s; }
4556 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4557 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4558 QString asScriptCode()
const override;
4560 QVariantMap toVariantMap()
const override;
4561 bool fromVariantMap(
const QVariantMap &map )
override;
4562 QStringList dependsOnOtherParameters()
const override;
4568 QString parentConnectionParameterName()
const;
4574 void setParentConnectionParameterName(
const QString &name );
4582 QString mParentConnectionParameterName;
4611 const QString &
name,
4613 const QString &connectionParameterName = QString(),
4614 const QString &schemaParameterName = QString(),
4616 bool optional =
false,
4623 static QString
typeName() {
return u
"databasetable"_s; }
4626 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4627 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4628 QString asScriptCode()
const override;
4630 QVariantMap toVariantMap()
const override;
4631 bool fromVariantMap(
const QVariantMap &map )
override;
4632 QStringList dependsOnOtherParameters()
const override;
4638 QString parentConnectionParameterName()
const;
4644 void setParentConnectionParameterName(
const QString &name );
4650 QString parentSchemaParameterName()
const;
4656 void setParentSchemaParameterName(
const QString &name );
4669 bool allowNewTableNames()
const;
4677 void setAllowNewTableNames(
bool allowed );
4680 QString mParentConnectionParameterName;
4681 QString mParentSchemaParameterName;
4682 bool mAllowNewTableNames =
false;
4706 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4707 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4709 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4710 QString createFileFilter()
const override;
4739 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4740 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4742 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4771 static QString
typeName() {
return u
"pointCloudDestination"_s; }
4774 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4775 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4777 QString defaultFileExtension() const override;
4778 QString createFileFilter() const override;
4784 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
4805 const QString &
name,
4810 bool optional =
false,
4820 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4821 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4822 QString asScriptCode()
const override;
4824 QStringList dependsOnOtherParameters()
const override;
4830 QString parentLayerParameterName()
const;
4836 void setParentLayerParameterName(
const QString &parentLayerParameterName );
4842 bool allowMultiple()
const;
4848 void setAllowMultiple(
bool allowMultiple );
4858 bool defaultToAllAttributes()
const;
4868 void setDefaultToAllAttributes(
bool enabled );
4870 QVariantMap toVariantMap()
const override;
4871 bool fromVariantMap(
const QVariantMap &map )
override;
4879 QString mParentLayerParameterName;
4880 bool mAllowMultiple =
false;
4881 bool mDefaultToAllAttributes =
false;
4905 static QString
typeName() {
return u
"vectorTileDestination"_s; }
4908 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4909 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4911 QString defaultFileExtension() const override;
4912 QString createFileFilter() const override;
4918 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.
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.