18#ifndef QGSPROCESSINGPARAMETERS_H
19#define QGSPROCESSINGPARAMETERS_H
66 FlagOverrideDefaultGeometryCheck = 1 << 0,
67 FlagCreateIndividualOutputPerInputFeature = 1 << 1,
69 Q_DECLARE_FLAGS( Flags, Flag )
90 , selectedFeaturesOnly( selectedFeaturesOnly )
91 , featureLimit( featureLimit )
92 , filterExpression( filterExpression )
94 , geometryCheck( geometryCheck )
116 , selectedFeaturesOnly( selectedFeaturesOnly )
117 , featureLimit( featureLimit )
118 , filterExpression( filterExpression )
120 , geometryCheck( geometryCheck )
139 long long featureLimit = -1;
153 Flags flags = Flags();
171 QVariant toVariant()
const;
179 bool loadVariant(
const QVariantMap &map );
184 return source == other.
source
188 && flags == other.
flags
194 return !( *
this == other );
198 operator QVariant()
const
200 return QVariant::fromValue( *
this );
228 , destinationProject( destinationProject )
238 , destinationProject( destinationProject )
301 QVariant toVariant()
const;
309 bool loadVariant(
const QVariantMap &map );
312 operator QVariant()
const
314 return QVariant::fromValue( *
this );
323 bool mUseRemapping =
false;
363 sipType = sipType_QgsProcessingParameterBoolean;
365 sipType = sipType_QgsProcessingParameterCrs;
367 sipType = sipType_QgsProcessingParameterMapLayer;
369 sipType = sipType_QgsProcessingParameterExtent;
371 sipType = sipType_QgsProcessingParameterPoint;
373 sipType = sipType_QgsProcessingParameterGeometry;
375 sipType = sipType_QgsProcessingParameterFile;
377 sipType = sipType_QgsProcessingParameterMatrix;
379 sipType = sipType_QgsProcessingParameterMultipleLayers;
381 sipType = sipType_QgsProcessingParameterNumber;
383 sipType = sipType_QgsProcessingParameterDistance;
385 sipType = sipType_QgsProcessingParameterDuration;
387 sipType = sipType_QgsProcessingParameterScale;
389 sipType = sipType_QgsProcessingParameterRange;
391 sipType = sipType_QgsProcessingParameterRasterLayer;
393 sipType = sipType_QgsProcessingParameterMeshLayer;
395 sipType = sipType_QgsProcessingParameterEnum;
397 sipType = sipType_QgsProcessingParameterString;
399 sipType = sipType_QgsProcessingParameterExpression;
401 sipType = sipType_QgsProcessingParameterAuthConfig;
403 sipType = sipType_QgsProcessingParameterVectorLayer;
405 sipType = sipType_QgsProcessingParameterField;
407 sipType = sipType_QgsProcessingParameterFeatureSource;
409 sipType = sipType_QgsProcessingParameterFeatureSink;
411 sipType = sipType_QgsProcessingParameterVectorDestination;
413 sipType = sipType_QgsProcessingParameterRasterDestination;
415 sipType = sipType_QgsProcessingParameterPointCloudDestination;
417 sipType = sipType_QgsProcessingParameterFileDestination;
419 sipType = sipType_QgsProcessingParameterFolderDestination;
421 sipType = sipType_QgsProcessingParameterBand;
423 sipType = sipType_QgsProcessingParameterLayout;
425 sipType = sipType_QgsProcessingParameterLayoutItem;
427 sipType = sipType_QgsProcessingParameterColor;
429 sipType = sipType_QgsProcessingParameterCoordinateOperation;
431 sipType = sipType_QgsProcessingParameterMapTheme;
433 sipType = sipType_QgsProcessingParameterDateTime;
435 sipType = sipType_QgsProcessingParameterProviderConnection;
437 sipType = sipType_QgsProcessingParameterDatabaseSchema;
439 sipType = sipType_QgsProcessingParameterDatabaseTable;
441 sipType = sipType_QgsProcessingParameterFieldMapping;
443 sipType = sipType_QgsProcessingParameterTinInputLayers;
445 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
447 sipType = sipType_QgsProcessingParameterDxfLayers;
449 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
451 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
453 sipType = sipType_QgsProcessingParameterPointCloudLayer;
455 sipType = sipType_QgsProcessingParameterAnnotationLayer;
466 FlagAdvanced = 1 << 1,
468 FlagOptional = 1 << 3,
469 FlagIsModelOutput = 1 << 4,
471 Q_DECLARE_FLAGS( Flags, Flag )
477 bool optional =
false,
const QString &help = QString() );
489 virtual QString
type()
const = 0;
503 QString
name()
const {
return mName; }
510 void setName(
const QString &name ) { mName = name; }
524 void setDescription(
const QString &description ) { mDescription = description; }
535 QString
help()
const {
return mHelp; }
546 void setHelp(
const QString &help ) { mHelp = help; }
609 Flags
flags()
const {
return mFlags; }
624 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
633 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
646 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
683 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
689 virtual QString asScriptCode()
const;
707 virtual QVariantMap toVariantMap()
const;
714 virtual bool fromVariantMap(
const QVariantMap &map );
736 void setMetadata(
const QVariantMap &metadata ) { mMetadata = metadata; }
762 virtual QString toolTip()
const;
869 AllowMapLayerValues = 1 << 0,
871 Q_DECLARE_FLAGS( ValueAsStringFlags, ValueAsStringFlag )
884 QString valueAsStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool &ok, ValueAsStringFlags flags )
const;
892 QVariant valueAsJsonObjectPrivate(
const QVariant &value,
QgsProcessingContext &context, ValueAsStringFlags flags )
const;
920 bool mIsDynamic =
false;
972 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1179 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_FACTORY;
1202 QgsProcessingContext &context, QString &destinationIdentifier
SIP_OUT, QgsFeatureSink::SinkFlags sinkFlags = QgsFeatureSink::SinkFlags(),
const QVariantMap &createOptions = QVariantMap(),
const QStringList &datasourceOptions = QStringList(),
const QStringList &layerOptions = QStringList() )
SIP_THROW(
QgsProcessingException )
SIP_FACTORY;
1741 static QString descriptionFromName(
const QString &name );
1752 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1771 bool optional =
false );
1776 static QString
typeName() {
return QStringLiteral(
"boolean" ); }
1779 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1780 QString asScriptCode()
const override;
1801 QgsProcessingParameterCrs(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1802 bool optional =
false );
1807 static QString
typeName() {
return QStringLiteral(
"crs" ); }
1810 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1811 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1813 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1836 bool optional =
false );
1841 static QString
typeName() {
return QStringLiteral(
"extent" ); }
1844 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1845 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1847 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1870 QgsProcessingParameterPoint(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1871 bool optional =
false );
1876 static QString
typeName() {
return QStringLiteral(
"point" ); }
1879 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1880 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1906 QgsProcessingParameterGeometry(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
bool optional =
false,
const QList< int > &geometryTypes = QList< int >(),
bool allowMultipart =
true );
1911 static QString
typeName() {
return QStringLiteral(
"geometry" ); }
1914 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1915 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1916 QString asScriptCode()
const override;
1918 QVariantMap toVariantMap()
const override;
1919 bool fromVariantMap(
const QVariantMap &map )
override;
1954 QList<int> mGeomTypes;
1955 bool mAllowMultipart;
1983 QgsProcessingParameterFile(
const QString &name,
const QString &description = QString(), Behavior behavior = File,
const QString &extension = QString(),
const QVariant &defaultValue = QVariant(),
1984 bool optional =
false,
const QString &fileFilter = QString() );
1989 static QString
typeName() {
return QStringLiteral(
"file" ); }
1992 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1993 QString asScriptCode()
const override;
1995 QString createFileFilter()
const override;
2027 void setExtension(
const QString &extension );
2035 QString fileFilter()
const;
2046 void setFileFilter(
const QString &filter );
2048 QVariantMap toVariantMap()
const override;
2049 bool fromVariantMap(
const QVariantMap &map )
override;
2054 static QgsProcessingParameterFile *fromScriptCode(
const QString &name,
const QString &description,
bool isOptional,
const QString &definition, Behavior behavior = File )
SIP_FACTORY;
2058 Behavior mBehavior = File;
2060 QString mFileFilter;
2077 bool hasFixedNumberRows =
false,
const QStringList &headers = QStringList(),
2078 const QVariant &defaultValue = QVariant(),
2079 bool optional =
false );
2084 static QString
typeName() {
return QStringLiteral(
"matrix" ); }
2087 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2088 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2095 QStringList headers()
const;
2101 void setHeaders(
const QStringList &headers );
2109 int numberRows()
const;
2117 void setNumberRows(
int rows );
2124 bool hasFixedNumberRows()
const;
2131 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2133 QVariantMap toVariantMap()
const override;
2134 bool fromVariantMap(
const QVariantMap &map )
override;
2143 QStringList mHeaders;
2144 int mNumberRows = 3;
2145 bool mFixedNumberRows =
false;
2163 const QVariant &defaultValue = QVariant(),
2164 bool optional =
false );
2169 static QString
typeName() {
return QStringLiteral(
"multilayer" ); }
2172 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2173 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2175 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2176 QString asScriptCode()
const override;
2178 QString createFileFilter()
const override;
2197 int minimumNumberInputs()
const;
2204 void setMinimumNumberInputs(
int minimum );
2206 QVariantMap toVariantMap()
const override;
2207 bool fromVariantMap(
const QVariantMap &map )
override;
2217 int mMinimumNumberInputs = 0;
2254 Type type = Integer,
2255 const QVariant &defaultValue = QVariant(),
2256 bool optional =
false,
2257 double minValue = std::numeric_limits<double>::lowest() + 1,
2258 double maxValue = std::numeric_limits<double>::max()
2264 static QString
typeName() {
return QStringLiteral(
"number" ); }
2267 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2268 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2269 QString toolTip()
const override;
2276 double minimum()
const;
2282 void setMinimum(
double minimum );
2288 double maximum()
const;
2294 void setMaximum(
double maximum );
2300 Type dataType()
const;
2306 void setDataType( Type type );
2308 QVariantMap toVariantMap()
const override;
2309 bool fromVariantMap(
const QVariantMap &map )
override;
2318 double mMin = std::numeric_limits<double>::lowest() + 1;
2319 double mMax = std::numeric_limits<double>::max();
2320 Type mDataType = Integer;
2350 const QVariant &defaultValue = QVariant(),
2351 const QString &parentParameterName = QString(),
2352 bool optional =
false,
2353 double minValue = std::numeric_limits<double>::lowest() + 1,
2354 double maxValue = std::numeric_limits<double>::max() );
2359 static QString
typeName() {
return QStringLiteral(
"distance" ); }
2363 QString type() const override;
2364 QStringList dependsOnOtherParameters() const override;
2365 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2371 QString parentParameterName() const;
2377 void setParentParameterName( const QString &parentParameterName );
2385 Qgis::DistanceUnit defaultUnit()
const {
return mDefaultUnit; }
2395 QVariantMap toVariantMap()
const override;
2396 bool fromVariantMap(
const QVariantMap &map )
override;
2400 QString mParentParameterName;
2420 const QVariant &defaultValue = QVariant(),
2421 bool optional =
false,
2422 double minValue = std::numeric_limits<double>::lowest() + 1,
2423 double maxValue = std::numeric_limits<double>::max() );
2428 static QString
typeName() {
return QStringLiteral(
"duration" ); }
2432 QString type() const override;
2433 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2440 Qgis::TemporalUnit defaultUnit()
const {
return mDefaultUnit; }
2449 QVariantMap toVariantMap()
const override;
2450 bool fromVariantMap(
const QVariantMap &map )
override;
2476 const QVariant &defaultValue = QVariant(),
2477 bool optional =
false );
2482 static QString
typeName() {
return QStringLiteral(
"scale" ); }
2486 QString type() const override;
2487 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2511 const QVariant &defaultValue = QVariant(),
2512 bool optional =
false );
2517 static QString
typeName() {
return QStringLiteral(
"range" ); }
2520 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2521 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2536 QVariantMap toVariantMap()
const override;
2537 bool fromVariantMap(
const QVariantMap &map )
override;
2563 bool optional =
false );
2568 static QString
typeName() {
return QStringLiteral(
"raster" ); }
2571 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2572 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2574 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2575 QString createFileFilter()
const override;
2609 QgsProcessingParameterEnum(
const QString &name,
const QString &description = QString(),
const QStringList &options = QStringList(),
2610 bool allowMultiple =
false,
2611 const QVariant &defaultValue = QVariant(),
2612 bool optional =
false,
2613 bool usesStaticStrings =
false );
2618 static QString
typeName() {
return QStringLiteral(
"enum" ); }
2621 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2622 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2623 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
2624 QString asScriptCode()
const override;
2631 QStringList options()
const;
2637 void setOptions(
const QStringList &options );
2643 bool allowMultiple()
const;
2649 void setAllowMultiple(
bool allowMultiple );
2657 bool usesStaticStrings()
const;
2665 void setUsesStaticStrings(
bool usesStaticStrings );
2667 QVariantMap toVariantMap()
const override;
2668 bool fromVariantMap(
const QVariantMap &map )
override;
2677 QStringList mOptions;
2678 bool mAllowMultiple =
false;
2679 bool mUsesStaticStrings =
false;
2717 bool multiLine =
false,
2718 bool optional =
false );
2723 static QString
typeName() {
return QStringLiteral(
"string" ); }
2726 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2727 QString asScriptCode()
const override;
2734 bool multiLine()
const;
2740 void setMultiLine(
bool multiLine );
2742 QVariantMap toVariantMap()
const override;
2743 bool fromVariantMap(
const QVariantMap &map )
override;
2752 bool mMultiLine =
false;
2777 bool optional =
false );
2782 static QString
typeName() {
return QStringLiteral(
"authcfg" ); }
2785 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2786 QString asScriptCode()
const override;
2809 const QString &parentLayerParameterName = QString(),
2810 bool optional =
false );
2815 static QString
typeName() {
return QStringLiteral(
"expression" ); }
2818 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2819 QStringList dependsOnOtherParameters()
const override;
2826 QString parentLayerParameterName()
const;
2832 void setParentLayerParameterName(
const QString &parentLayerParameterName );
2834 QVariantMap toVariantMap()
const override;
2835 bool fromVariantMap(
const QVariantMap &map )
override;
2844 QString mParentLayerParameterName;
2868 QList< int > dataTypes()
const;
2874 void setDataTypes(
const QList< int > &types );
2897 const QString &description = QString(),
2898 const QList< int > &types = QList< int >(),
2899 const QVariant &defaultValue = QVariant(),
2900 bool optional =
false );
2905 static QString
typeName() {
return QStringLiteral(
"vector" ); }
2908 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2909 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2911 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2913 QString createFileFilter()
const override;
2915 QVariantMap toVariantMap()
const override;
2916 bool fromVariantMap(
const QVariantMap &map )
override;
2939 const QString &description = QString(),
2940 const QVariant &defaultValue = QVariant(),
2941 bool optional =
false );
2946 static QString
typeName() {
return QStringLiteral(
"mesh" ); }
2949 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2950 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2952 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2953 QString createFileFilter()
const override;
2975 bool optional =
false,
2976 const QList< int > &types = QList< int >() );
2981 static QString
typeName() {
return QStringLiteral(
"layer" ); }
2984 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2985 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2987 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2988 QString asScriptCode()
const override;
2990 QString createFileFilter()
const override;
2992 QVariantMap toVariantMap()
const override;
2993 bool fromVariantMap(
const QVariantMap &map )
override;
3024 QgsProcessingParameterField(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3025 const QString &parentLayerParameterName = QString(),
3026 DataType type = Any,
3027 bool allowMultiple =
false,
3028 bool optional =
false,
3029 bool defaultToAllFields =
false );
3034 static QString
typeName() {
return QStringLiteral(
"field" ); }
3037 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3038 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3039 QString asScriptCode()
const override;
3041 QStringList dependsOnOtherParameters()
const override;
3047 QString parentLayerParameterName()
const;
3053 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3059 DataType dataType()
const;
3065 void setDataType( DataType type );
3071 bool allowMultiple()
const;
3077 void setAllowMultiple(
bool allowMultiple );
3088 bool defaultToAllFields()
const;
3099 void setDefaultToAllFields(
bool enabled );
3101 QVariantMap toVariantMap()
const override;
3102 bool fromVariantMap(
const QVariantMap &map )
override;
3111 QString mParentLayerParameterName;
3112 DataType mDataType = Any;
3113 bool mAllowMultiple =
false;
3114 bool mDefaultToAllFields =
false;
3133 const QList< int > &types = QList< int >(),
3134 const QVariant &defaultValue = QVariant(),
bool optional =
false );
3139 static QString
typeName() {
return QStringLiteral(
"source" ); }
3142 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3143 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3145 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3146 QString asScriptCode()
const override;
3148 QString createFileFilter()
const override;
3150 QVariantMap toVariantMap()
const override;
3151 bool fromVariantMap(
const QVariantMap &map )
override;
3178 bool optional =
false,
bool createByDefault =
true );
3181 QVariantMap toVariantMap()
const override;
3182 bool fromVariantMap(
const QVariantMap &map )
override;
3184 QString createFileFilter()
const override;
3217 virtual QString generateTemporaryDestination()
const;
3240 bool createByDefault()
const;
3247 void setCreateByDefault(
bool createByDefault );
3272 bool mSupportsNonFileBasedOutputs =
true;
3273 bool mCreateByDefault =
true;
3275 friend class QgsProcessingModelAlgorithm;
3276 friend class TestQgsProcessing;
3277 friend class TestQgsProcessingModelAlgorithm;
3300 bool optional =
false,
bool createByDefault =
true,
bool supportsAppend =
false );
3305 static QString
typeName() {
return QStringLiteral(
"sink" ); }
3308 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3309 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3310 QString asScriptCode()
const override;
3312 QString defaultFileExtension() const override;
3313 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3314 QString createFileFilter() const override;
3321 virtual QStringList supportedOutputVectorLayerExtensions() const;
3333 bool hasGeometry() const;
3349 bool supportsAppend() const;
3359 void setSupportsAppend(
bool supportsAppend );
3361 QVariantMap toVariantMap() const override;
3362 bool fromVariantMap( const QVariantMap &map ) override;
3363 QString generateTemporaryDestination() const override;
3373 bool mSupportsAppend = false;
3398 bool optional =
false,
bool createByDefault =
true );
3403 static QString
typeName() {
return QStringLiteral(
"vectorDestination" ); }
3406 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3407 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3408 QString asScriptCode()
const override;
3410 QString defaultFileExtension() const override;
3411 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3412 QString createFileFilter() const override;
3419 virtual QStringList supportedOutputVectorLayerExtensions() const;
3431 bool hasGeometry() const;
3439 QVariantMap toVariantMap() const override;
3440 bool fromVariantMap( const QVariantMap &map ) override;
3471 const QVariant &defaultValue = QVariant(),
3472 bool optional =
false,
3473 bool createByDefault =
true );
3478 static QString
typeName() {
return QStringLiteral(
"rasterDestination" ); }
3481 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3482 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3484 QString defaultFileExtension() const override;
3485 QString createFileFilter() const override;
3492 virtual QStringList supportedOutputRasterLayerExtensions() const;
3532 const QString &fileFilter = QString(),
3533 const QVariant &defaultValue = QVariant(),
3534 bool optional =
false,
3535 bool createByDefault =
true );
3540 static QString
typeName() {
return QStringLiteral(
"fileDestination" ); }
3543 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3544 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3546 QString defaultFileExtension() const override;
3547 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3548 QString createFileFilter() const override;
3554 QString fileFilter() const;
3560 void setFileFilter( const QString &filter );
3562 QVariantMap toVariantMap() const override;
3563 bool fromVariantMap( const QVariantMap &map ) override;
3573 QString mFileFilter;
3591 const QVariant &defaultValue = QVariant(),
3592 bool optional =
false,
3593 bool createByDefault =
true );
3598 static QString
typeName() {
return QStringLiteral(
"folderDestination" ); }
3601 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3603 QString defaultFileExtension() const override;
3625 QgsProcessingParameterBand(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3626 const QString &parentLayerParameterName = QString(),
3627 bool optional =
false,
3628 bool allowMultiple =
false );
3633 static QString
typeName() {
return QStringLiteral(
"band" ); }
3636 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3637 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3638 QString asScriptCode()
const override;
3639 QStringList dependsOnOtherParameters()
const override;
3646 QString parentLayerParameterName()
const;
3652 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3654 QVariantMap toVariantMap()
const override;
3655 bool fromVariantMap(
const QVariantMap &map )
override;
3667 bool allowMultiple()
const;
3674 void setAllowMultiple(
bool allowMultiple );
3678 QString mParentLayerParameterName;
3679 bool mAllowMultiple =
false;
3701 bool optional =
false );
3706 static QString
typeName() {
return QStringLiteral(
"layout" ); }
3709 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3710 QString asScriptCode()
const override;
3739 const QString &parentLayoutParameterName = QString(),
3741 bool optional =
false );
3746 static QString
typeName() {
return QStringLiteral(
"layoutitem" ); }
3749 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3750 QString asScriptCode()
const override;
3752 QVariantMap toVariantMap()
const override;
3753 bool fromVariantMap(
const QVariantMap &map )
override;
3754 QStringList dependsOnOtherParameters()
const override;
3765 QString parentLayoutParameterName()
const;
3771 void setParentLayoutParameterName(
const QString &name );
3780 int itemType()
const;
3789 void setItemType(
int type );
3792 QString mParentLayoutParameterName;
3814 QgsProcessingParameterColor(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3815 bool opacityEnabled =
true,
3816 bool optional =
false );
3821 static QString
typeName() {
return QStringLiteral(
"color" ); }
3824 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3825 QString asScriptCode()
const override;
3827 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3828 QVariantMap toVariantMap()
const override;
3829 bool fromVariantMap(
const QVariantMap &map )
override;
3837 bool opacityEnabled()
const;
3846 void setOpacityEnabled(
bool enabled );
3855 bool mAllowOpacity =
true;
3877 const QString &sourceCrsParameterName = QString(),
const QString &destinationCrsParameterName = QString(),
3878 const QVariant &staticSourceCrs = QVariant(),
const QVariant &staticDestinationCrs = QVariant(),
3879 bool optional =
false );
3884 static QString
typeName() {
return QStringLiteral(
"coordinateoperation" ); }
3887 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3888 QString asScriptCode()
const override;
3890 QStringList dependsOnOtherParameters()
const override;
3892 QVariantMap toVariantMap()
const override;
3893 bool fromVariantMap(
const QVariantMap &map )
override;
3958 QString mSourceParameterName;
3959 QString mDestParameterName;
3960 QVariant mSourceCrs;
3983 bool optional =
false );
3988 static QString
typeName() {
return QStringLiteral(
"maptheme" ); }
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;
3995 QVariantMap toVariantMap()
const override;
3996 bool fromVariantMap(
const QVariantMap &map )
override;
4034 Type type = DateTime,
4035 const QVariant &defaultValue = QVariant(),
4036 bool optional =
false,
4037 const QDateTime &minValue = QDateTime(),
4038 const QDateTime &maxValue = QDateTime()
4044 static QString
typeName() {
return QStringLiteral(
"datetime" ); }
4047 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4048 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4049 QString toolTip()
const override;
4059 QDateTime minimum()
const;
4072 void setMinimum(
const QDateTime &minimum );
4081 QDateTime maximum()
const;
4094 void setMaximum(
const QDateTime &maximum );
4100 Type dataType()
const;
4106 void setDataType( Type type );
4108 QVariantMap toVariantMap()
const override;
4109 bool fromVariantMap(
const QVariantMap &map )
override;
4120 Type mDataType = DateTime;
4145 bool optional =
false );
4150 static QString
typeName() {
return QStringLiteral(
"providerconnection" ); }
4153 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4154 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4155 QString asScriptCode()
const override;
4157 QVariantMap toVariantMap()
const override;
4158 bool fromVariantMap(
const QVariantMap &map )
override;
4179 QString mProviderId;
4205 QgsProcessingParameterDatabaseSchema(
const QString &name,
const QString &description,
const QString &connectionParameterName = QString(),
const QVariant &defaultValue = QVariant(),
4206 bool optional =
false );
4211 static QString
typeName() {
return QStringLiteral(
"databaseschema" ); }
4214 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4215 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4216 QString asScriptCode()
const override;
4218 QVariantMap toVariantMap()
const override;
4219 bool fromVariantMap(
const QVariantMap &map )
override;
4220 QStringList dependsOnOtherParameters()
const override;
4226 QString parentConnectionParameterName()
const;
4232 void setParentConnectionParameterName(
const QString &name );
4241 QString mParentConnectionParameterName;
4269 const QString &connectionParameterName = QString(),
4270 const QString &schemaParameterName = QString(),
4271 const QVariant &defaultValue = QVariant(),
4272 bool optional =
false,
4273 bool allowNewTableNames =
false );
4278 static QString
typeName() {
return QStringLiteral(
"databasetable" ); }
4281 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4282 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4283 QString asScriptCode()
const override;
4285 QVariantMap toVariantMap()
const override;
4286 bool fromVariantMap(
const QVariantMap &map )
override;
4287 QStringList dependsOnOtherParameters()
const override;
4293 QString parentConnectionParameterName()
const;
4299 void setParentConnectionParameterName(
const QString &name );
4305 QString parentSchemaParameterName()
const;
4311 void setParentSchemaParameterName(
const QString &name );
4324 bool allowNewTableNames()
const;
4332 void setAllowNewTableNames(
bool allowed );
4336 QString mParentConnectionParameterName;
4337 QString mParentSchemaParameterName;
4338 bool mAllowNewTableNames =
false;
4356 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4361 static QString
typeName() {
return QStringLiteral(
"pointcloud" ); }
4364 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4365 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4367 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4368 QString createFileFilter()
const override;
4391 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4396 static QString
typeName() {
return QStringLiteral(
"annotation" ); }
4399 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4400 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4402 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4428 const QVariant &defaultValue = QVariant(),
4429 bool optional =
false,
4430 bool createByDefault =
true );
4435 static QString
typeName() {
return QStringLiteral(
"pointCloudDestination" ); }
4438 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4439 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4441 QString defaultFileExtension() const override;
4442 QString createFileFilter() const override;
4448 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
The Qgis class provides global constants for use throughout the application.
DistanceUnit
Units of distance.
TemporalUnit
Temporal units.
WkbType
The WKB type describes the number of dimensions a geometry has.
Represents a map layer containing a set of georeferenced annotations, e.g.
This class represents a coordinate reference system (CRS).
This class wraps a request for features to a vector layer (or directly its vector data provider).
InvalidGeometryCheck
Handling of features with invalid geometries.
@ GeometryAbortOnInvalid
Close iterator on encountering any features with invalid geometry. This requires a slow geometry vali...
An interface for objects which accept features via addFeature(s) methods.
Container of fields for a vector layer.
Abstract interface for classes which generate a file filter string.
A geometry is the spatial representation of a feature.
Base class for graphical items within a QgsLayout.
Base class for all map layer types.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Represents a map layer supporting display of point clouds.
A class to represent a 2D point.
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Abstract base class for processing algorithms.
Contains information about the context in which a processing algorithm is executed.
Base class for all parameter definitions which represent file or layer destinations,...
virtual QString defaultFileExtension() const =0
Returns the default file extension for destination file paths associated with this parameter.
bool supportsNonFileBasedOutput() const
Returns true if the destination parameter supports non filed-based outputs, such as memory layers or ...
bool isDestination() const override
Returns true if this parameter represents a file or layer destination, e.g.
virtual QgsProcessingOutputDefinition * toOutputDefinition() const =0
Returns a new QgsProcessingOutputDefinition corresponding to the definition of the destination parame...
QgsProcessingProvider * originalProvider() const
Original (source) provider which this parameter has been derived from.
void setSupportsNonFileBasedOutput(bool supportsNonFileBasedOutput)
Sets whether the destination parameter supports non filed-based outputs, such as memory layers or dir...
Custom exception class for processing related exceptions.
Encapsulates settings relating to a feature source input to a processing algorithm.
Flags flags
Flags which dictate source behavior.
bool operator!=(const QgsProcessingFeatureSourceDefinition &other) const
bool selectedFeaturesOnly
true if only selected features in the source should be used by algorithms.
QgsFeatureRequest::InvalidGeometryCheck geometryCheck
Geometry check method to apply to this source.
bool operator==(const QgsProcessingFeatureSourceDefinition &other) const
QgsProcessingFeatureSourceDefinition(const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, QgsProcessingFeatureSourceDefinition::Flags flags=QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck=QgsFeatureRequest::GeometryAbortOnInvalid, const QString &filterExpression=QString())
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.
QgsProperty source
Source definition.
long long featureLimit
If set to a value > 0, places a limit on the maximum number of features which will be read from the s...
Flag
Flags which control source behavior.
QString filterExpression
Optional expression filter to use for filtering features which will be read from the source.
QgsFeatureSource subclass which proxies methods to an underlying QgsFeatureSource,...
Base class for providing feedback from a processing algorithm.
Base class for the definition of processing outputs.
Encapsulates settings relating to a feature sink or output raster layer for a processing algorithm.
QgsProcessingOutputLayerDefinition(const QgsProperty &sink, QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a QgsProperty sink/layer.
QgsProperty sink
Sink/layer definition.
bool useRemapping() const
Returns true if the output uses a remapping definition.
QgsProcessingOutputLayerDefinition(const QString &sink=QString(), QgsProject *destinationProject=nullptr)
Constructor for QgsProcessingOutputLayerDefinition, accepting a static sink/layer string.
QgsRemappingSinkDefinition remappingDefinition() const
Returns the output remapping definition, if useRemapping() is true.
QString destinationName
Name to use for sink if it's to be loaded into a destination project.
QVariantMap createOptions
Map of optional sink/layer creation options, which are passed to the underlying provider when creatin...
An annotation layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for authentication configuration ID values.
static QString typeName()
Returns the type name for the parameter class.
A raster band parameter for Processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A boolean parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A color parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A coordinate operation parameter for processing algorithms, for selection between available coordinat...
static QString typeName()
Returns the type name for the parameter class.
QVariant sourceCrs() const
Returns the static source CRS, or an invalid value if this is not set.
QString destinationCrsParameterName() const
Returns the name of the destination CRS parameter, or an empty string if this is not set.
void setDestinationCrsParameterName(const QString &name)
Sets the name of the destination CRS parameter.
void setSourceCrs(const QVariant &crs)
Sets the static source crs.
QVariant destinationCrs() const
Returns the static destination CRS, or an invalid value if this is not set.
void setDestinationCrs(const QVariant &crs)
Sets the static destination crs.
void setSourceCrsParameterName(const QString &name)
Sets the name of the source CRS parameter.
QString sourceCrsParameterName() const
Returns the name of the source CRS parameter, or an empty string if this is not set.
A coordinate reference system parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A database schema parameter for processing algorithms, allowing users to select from existing schemas...
static QString typeName()
Returns the type name for the parameter class.
A database table name parameter for processing algorithms, allowing users to select from existing dat...
static QString typeName()
Returns the type name for the parameter class.
A datetime (or pure date or time) parameter for processing algorithms.
@ DateTime
Datetime values.
static QString typeName()
Returns the type name for the parameter class.
Base class for the definition of processing parameters.
QString mHelp
Parameter help.
QVariant defaultValue() const
Returns the default value for the parameter.
void setDefaultValue(const QVariant &value)
Sets the default value for the parameter.
QVariant guiDefaultValueOverride() const
Returns the default value to use in the GUI for the parameter.
QStringList additionalExpressionContextVariables() const
Returns a list of additional expression context variables which are available for use when evaluating...
QStringList mAdditionalExpressionVariables
Additional expression context variables exposed for use by this parameter.
QString help() const
Returns the help for the parameter.
void setMetadata(const QVariantMap &metadata)
Sets the parameter's freeform metadata.
Flags mFlags
Parameter flags.
ValueAsStringFlag
Flags for passing to the valueAsStringPrivate() method.
QString mName
Parameter name.
void setGuiDefaultValueOverride(const QVariant &value)
Sets the default value to use for the parameter in GUI widgets.
QVariantMap metadata() const
Returns the parameter's freeform metadata.
QString description() const
Returns the description for the parameter.
QString mDynamicLayerParameterName
Linked vector layer parameter name for dynamic properties.
QVariant defaultValueForGui() const
Returns the default value to use for the parameter in a GUI.
virtual bool isDestination() const
Returns true if this parameter represents a file or layer destination, e.g.
void setDescription(const QString &description)
Sets the description for the parameter.
void setDynamicLayerParameterName(const QString &name)
Sets the name for the parameter for a layer linked to a dynamic parameter, or an empty string if this...
QString dynamicLayerParameterName() const
Returns the name of the parameter for a layer linked to a dynamic parameter, or an empty string if th...
void setAdditionalExpressionContextVariables(const QStringList &variables)
Sets a list of additional expression context variables which are available for use when evaluating th...
QVariantMap mMetadata
Freeform metadata for parameter. Mostly used by widget wrappers to customize their appearance and beh...
void setName(const QString &name)
Sets the name of the parameter.
QString mDescription
Parameter description.
virtual QgsProcessingParameterDefinition * clone() const =0
Creates a clone of the parameter definition.
virtual QString type() const =0
Unique parameter type name.
void setDynamicPropertyDefinition(const QgsPropertyDefinition &definition)
Sets the property definition for dynamic properties.
Flags flags() const
Returns any flags associated with the parameter.
void setHelp(const QString &help)
Sets the help for the parameter.
QString name() const
Returns the name of the parameter.
QVariant mDefault
Default value for parameter.
virtual QStringList dependsOnOtherParameters() const
Returns a list of other parameter names on which this parameter is dependent (e.g.
void setIsDynamic(bool dynamic)
Sets whether the parameter is dynamic, and can support data-defined values (i.e.
QVariant mGuiDefault
Default value for parameter in GUI.
QgsPropertyDefinition mPropertyDefinition
Data defined property definition.
bool isDynamic() const
Returns true if the parameter supports is dynamic, and can support data-defined values (i....
void setFlags(Flags flags)
Sets the flags associated with the parameter.
virtual ~QgsProcessingParameterDefinition()=default
QVariantMap & metadata()
Returns the parameter's freeform metadata.
QgsPropertyDefinition dynamicPropertyDefinition() const
Returns the property definition for dynamic properties.
A double numeric parameter for distance values.
static QString typeName()
Returns the type name for the parameter class.
void setDefaultUnit(Qgis::DistanceUnit unit)
Sets the default distance unit for the parameter.
A double numeric parameter for duration values.
void setDefaultUnit(Qgis::TemporalUnit unit)
Sets the default duration unit for the parameter.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
An enum based parameter for processing algorithms, allowing for selection from predefined values.
static QString typeName()
Returns the type name for the parameter class.
An expression parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A rectangular map extent parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A feature sink output for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
An input feature source (such as vector layers) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A vector layer or feature source field parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
DataType
Field data types.
A generic file based destination parameter, for specifying the destination path for a file (non-map l...
static QString typeName()
Returns the type name for the parameter class.
An input file or folder parameter for processing algorithms.
QString extension() const
Returns any specified file extension for the parameter.
static QString typeName()
Returns the type name for the parameter class.
void setBehavior(Behavior behavior)
Sets the parameter behavior (e.g.
Behavior
Parameter behavior.
@ Folder
Parameter is a folder.
Behavior behavior() const
Returns the parameter behavior (e.g.
A folder destination parameter, for specifying the destination path for a folder created by the algor...
static QString typeName()
Returns the type name for the parameter class.
A geometry parameter for processing algorithms.
void setGeometryTypes(const QList< int > &geometryTypes)
Sets the allowed geometryTypes, as a list of QgsWkbTypes::GeometryType values.
bool allowMultipart() const
Returns the parameter allow multipart geometries.
QList< int > geometryTypes() const
Returns the parameter allowed geometries, as a list of QgsWkbTypes::GeometryType values.
void setAllowMultipart(bool allowMultipart)
Sets the allow multipart geometries.
static QString typeName()
Returns the type name for the parameter class.
A print layout item parameter, allowing users to select a particular item from a print layout.
static QString typeName()
Returns the type name for the parameter class.
A print layout parameter, allowing users to select a print layout.
static QString typeName()
Returns the type name for the parameter class.
Can be inherited by parameters which require limits to their acceptable data types.
QList< int > mDataTypes
List of acceptable data types for the parameter.
A map layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A map theme parameter for processing algorithms, allowing users to select an existing map theme from ...
static QString typeName()
Returns the type name for the parameter class.
A table (matrix) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A mesh layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A parameter for processing algorithms which accepts multiple map layers.
static QString typeName()
Returns the type name for the parameter class.
A numeric parameter for processing algorithms.
@ Double
Double/float values.
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer destination parameter, for specifying the destination path for a point cloud laye...
static QString typeName()
Returns the type name for the parameter class.
A point cloud layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A point parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A data provider connection parameter for processing algorithms, allowing users to select from availab...
static QString typeName()
Returns the type name for the parameter class.
void setProviderId(const QString &provider)
Sets the ID of the provider associated with the connections.
QString providerId() const
Returns the ID of the provider associated with the connections.
A numeric range parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A raster layer destination parameter, for specifying the destination path for a raster layer created ...
static QString typeName()
Returns the type name for the parameter class.
A raster layer parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for map scale values.
static QString typeName()
Returns the type name for the parameter class.
A string parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
A vector layer destination parameter, for specifying the destination path for a vector layer created ...
static QString typeName()
Returns the type name for the parameter class.
A vector layer (with or without geometry) parameter for processing algorithms.
static QString typeName()
Returns the type name for the parameter class.
static QString typeName()
Returns the type name for the parameter class.
A collection of utilities for working with parameters when running a processing algorithm.
Abstract base class for processing providers.
LayerHint
Layer type hints.
@ UnknownType
Unknown layer type.
Contains enumerations and other constants for use in processing algorithms and parameters.
PythonOutputType
Available Python output types.
@ PythonQgsProcessingAlgorithmSubclass
Full Python QgsProcessingAlgorithm subclass.
SourceType
Data source types enum.
@ TypeVectorAnyGeometry
Any vector layer with geometry.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition for a property.
A store for object properties.
Represents a raster layer.
A rectangle specified with double values.
Defines the parameters used to remap features when creating a QgsRemappingProxyFeatureSink.
Represents a vector layer which manages a vector based data sets.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
#define SIP_THROW(name,...)
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
QList< const QgsProcessingParameterDefinition * > QgsProcessingParameterDefinitions
List of processing parameters.
const QgsCoordinateReferenceSystem & crs