18#ifndef QGSPROCESSINGPARAMETERS_H
19#define QGSPROCESSINGPARAMETERS_H
66 FlagOverrideDefaultGeometryCheck = 1 << 0,
67 FlagCreateIndividualOutputPerInputFeature = 1 << 1,
69 Q_DECLARE_FLAGS( Flags, Flag )
87 , selectedFeaturesOnly( selectedFeaturesOnly )
88 , featureLimit( featureLimit )
90 , geometryCheck( geometryCheck )
109 , selectedFeaturesOnly( selectedFeaturesOnly )
110 , featureLimit( featureLimit )
112 , geometryCheck( geometryCheck )
131 long long featureLimit = -1;
138 Flags flags = Flags();
156 QVariant toVariant()
const;
164 bool loadVariant(
const QVariantMap &map );
169 return source == other.
source
172 && flags == other.
flags
178 return !( *
this == other );
182 operator QVariant()
const
184 return QVariant::fromValue( *
this );
212 , destinationProject( destinationProject )
222 , destinationProject( destinationProject )
285 QVariant toVariant()
const;
293 bool loadVariant(
const QVariantMap &map );
296 operator QVariant()
const
298 return QVariant::fromValue( *
this );
307 bool mUseRemapping =
false;
347 sipType = sipType_QgsProcessingParameterBoolean;
349 sipType = sipType_QgsProcessingParameterCrs;
351 sipType = sipType_QgsProcessingParameterMapLayer;
353 sipType = sipType_QgsProcessingParameterExtent;
355 sipType = sipType_QgsProcessingParameterPoint;
357 sipType = sipType_QgsProcessingParameterGeometry;
359 sipType = sipType_QgsProcessingParameterFile;
361 sipType = sipType_QgsProcessingParameterMatrix;
363 sipType = sipType_QgsProcessingParameterMultipleLayers;
365 sipType = sipType_QgsProcessingParameterNumber;
367 sipType = sipType_QgsProcessingParameterDistance;
369 sipType = sipType_QgsProcessingParameterDuration;
371 sipType = sipType_QgsProcessingParameterScale;
373 sipType = sipType_QgsProcessingParameterRange;
375 sipType = sipType_QgsProcessingParameterRasterLayer;
377 sipType = sipType_QgsProcessingParameterMeshLayer;
379 sipType = sipType_QgsProcessingParameterEnum;
381 sipType = sipType_QgsProcessingParameterString;
383 sipType = sipType_QgsProcessingParameterExpression;
385 sipType = sipType_QgsProcessingParameterAuthConfig;
387 sipType = sipType_QgsProcessingParameterVectorLayer;
389 sipType = sipType_QgsProcessingParameterField;
391 sipType = sipType_QgsProcessingParameterFeatureSource;
393 sipType = sipType_QgsProcessingParameterFeatureSink;
395 sipType = sipType_QgsProcessingParameterVectorDestination;
397 sipType = sipType_QgsProcessingParameterRasterDestination;
399 sipType = sipType_QgsProcessingParameterPointCloudDestination;
401 sipType = sipType_QgsProcessingParameterFileDestination;
403 sipType = sipType_QgsProcessingParameterFolderDestination;
405 sipType = sipType_QgsProcessingParameterBand;
407 sipType = sipType_QgsProcessingParameterLayout;
409 sipType = sipType_QgsProcessingParameterLayoutItem;
411 sipType = sipType_QgsProcessingParameterColor;
413 sipType = sipType_QgsProcessingParameterCoordinateOperation;
415 sipType = sipType_QgsProcessingParameterMapTheme;
417 sipType = sipType_QgsProcessingParameterDateTime;
419 sipType = sipType_QgsProcessingParameterProviderConnection;
421 sipType = sipType_QgsProcessingParameterDatabaseSchema;
423 sipType = sipType_QgsProcessingParameterDatabaseTable;
425 sipType = sipType_QgsProcessingParameterFieldMapping;
427 sipType = sipType_QgsProcessingParameterTinInputLayers;
429 sipType = sipType_QgsProcessingParameterVectorTileWriterLayers;
431 sipType = sipType_QgsProcessingParameterDxfLayers;
433 sipType = sipType_QgsProcessingParameterMeshDatasetGroups;
435 sipType = sipType_QgsProcessingParameterMeshDatasetTime;
437 sipType = sipType_QgsProcessingParameterPointCloudLayer;
439 sipType = sipType_QgsProcessingParameterAnnotationLayer;
450 FlagAdvanced = 1 << 1,
452 FlagOptional = 1 << 3,
453 FlagIsModelOutput = 1 << 4,
455 Q_DECLARE_FLAGS( Flags, Flag )
461 bool optional =
false,
const QString &help = QString() );
473 virtual QString
type()
const = 0;
487 QString
name()
const {
return mName; }
494 void setName(
const QString &name ) { mName = name; }
508 void setDescription(
const QString &description ) { mDescription = description; }
519 QString
help()
const {
return mHelp; }
530 void setHelp(
const QString &help ) { mHelp = help; }
593 Flags
flags()
const {
return mFlags; }
608 virtual bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const;
617 virtual QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const;
630 virtual QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const;
667 virtual QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const;
673 virtual QString asScriptCode()
const;
691 virtual QVariantMap toVariantMap()
const;
698 virtual bool fromVariantMap(
const QVariantMap &map );
720 void setMetadata(
const QVariantMap &metadata ) { mMetadata = metadata; }
746 virtual QString toolTip()
const;
853 AllowMapLayerValues = 1 << 0,
855 Q_DECLARE_FLAGS( ValueAsStringFlags, ValueAsStringFlag )
868 QString valueAsStringPrivate(
const QVariant &value,
QgsProcessingContext &context,
bool &ok, ValueAsStringFlags flags )
const;
876 QVariant valueAsJsonObjectPrivate(
const QVariant &value,
QgsProcessingContext &context, ValueAsStringFlags flags )
const;
904 bool mIsDynamic =
false;
956 static bool isDynamic(
const QVariantMap ¶meters,
const QString &name );
1163 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;
1186 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;
1725 static QString descriptionFromName(
const QString &name );
1736 static bool parseScriptCodeParameterOptions(
const QString &code,
bool &isOptional, QString &name, QString &type, QString &definition );
1755 bool optional =
false );
1760 static QString
typeName() {
return QStringLiteral(
"boolean" ); }
1763 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1764 QString asScriptCode()
const override;
1785 QgsProcessingParameterCrs(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1786 bool optional =
false );
1791 static QString
typeName() {
return QStringLiteral(
"crs" ); }
1794 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1795 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1797 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1820 bool optional =
false );
1825 static QString
typeName() {
return QStringLiteral(
"extent" ); }
1828 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1829 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1831 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
1854 QgsProcessingParameterPoint(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
1855 bool optional =
false );
1860 static QString
typeName() {
return QStringLiteral(
"point" ); }
1863 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1864 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1890 QgsProcessingParameterGeometry(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
bool optional =
false,
const QList< int > &geometryTypes = QList< int >(),
bool allowMultipart =
true );
1895 static QString
typeName() {
return QStringLiteral(
"geometry" ); }
1898 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1899 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
1900 QString asScriptCode()
const override;
1902 QVariantMap toVariantMap()
const override;
1903 bool fromVariantMap(
const QVariantMap &map )
override;
1938 QList<int> mGeomTypes;
1939 bool mAllowMultipart;
1967 QgsProcessingParameterFile(
const QString &name,
const QString &description = QString(), Behavior behavior = File,
const QString &extension = QString(),
const QVariant &defaultValue = QVariant(),
1968 bool optional =
false,
const QString &fileFilter = QString() );
1973 static QString
typeName() {
return QStringLiteral(
"file" ); }
1976 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
1977 QString asScriptCode()
const override;
1979 QString createFileFilter()
const override;
2011 void setExtension(
const QString &extension );
2019 QString fileFilter()
const;
2030 void setFileFilter(
const QString &filter );
2032 QVariantMap toVariantMap()
const override;
2033 bool fromVariantMap(
const QVariantMap &map )
override;
2038 static QgsProcessingParameterFile *fromScriptCode(
const QString &name,
const QString &description,
bool isOptional,
const QString &definition, Behavior behavior = File )
SIP_FACTORY;
2042 Behavior mBehavior = File;
2044 QString mFileFilter;
2061 bool hasFixedNumberRows =
false,
const QStringList &headers = QStringList(),
2062 const QVariant &defaultValue = QVariant(),
2063 bool optional =
false );
2068 static QString
typeName() {
return QStringLiteral(
"matrix" ); }
2071 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2072 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2079 QStringList headers()
const;
2085 void setHeaders(
const QStringList &headers );
2093 int numberRows()
const;
2101 void setNumberRows(
int rows );
2108 bool hasFixedNumberRows()
const;
2115 void setHasFixedNumberRows(
bool hasFixedNumberRows );
2117 QVariantMap toVariantMap()
const override;
2118 bool fromVariantMap(
const QVariantMap &map )
override;
2127 QStringList mHeaders;
2128 int mNumberRows = 3;
2129 bool mFixedNumberRows =
false;
2147 const QVariant &defaultValue = QVariant(),
2148 bool optional =
false );
2153 static QString
typeName() {
return QStringLiteral(
"multilayer" ); }
2156 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2157 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2159 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2160 QString asScriptCode()
const override;
2162 QString createFileFilter()
const override;
2181 int minimumNumberInputs()
const;
2188 void setMinimumNumberInputs(
int minimum );
2190 QVariantMap toVariantMap()
const override;
2191 bool fromVariantMap(
const QVariantMap &map )
override;
2201 int mMinimumNumberInputs = 0;
2238 Type type = Integer,
2239 const QVariant &defaultValue = QVariant(),
2240 bool optional =
false,
2241 double minValue = std::numeric_limits<double>::lowest() + 1,
2242 double maxValue = std::numeric_limits<double>::max()
2248 static QString
typeName() {
return QStringLiteral(
"number" ); }
2251 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2252 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2253 QString toolTip()
const override;
2260 double minimum()
const;
2266 void setMinimum(
double minimum );
2272 double maximum()
const;
2278 void setMaximum(
double maximum );
2284 Type dataType()
const;
2290 void setDataType( Type type );
2292 QVariantMap toVariantMap()
const override;
2293 bool fromVariantMap(
const QVariantMap &map )
override;
2302 double mMin = std::numeric_limits<double>::lowest() + 1;
2303 double mMax = std::numeric_limits<double>::max();
2304 Type mDataType = Integer;
2334 const QVariant &defaultValue = QVariant(),
2335 const QString &parentParameterName = QString(),
2336 bool optional =
false,
2337 double minValue = std::numeric_limits<double>::lowest() + 1,
2338 double maxValue = std::numeric_limits<double>::max() );
2343 static QString
typeName() {
return QStringLiteral(
"distance" ); }
2347 QString type() const override;
2348 QStringList dependsOnOtherParameters() const override;
2349 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2355 QString parentParameterName() const;
2361 void setParentParameterName( const QString &parentParameterName );
2379 QVariantMap toVariantMap()
const override;
2380 bool fromVariantMap(
const QVariantMap &map )
override;
2384 QString mParentParameterName;
2404 const QVariant &defaultValue = QVariant(),
2405 bool optional =
false,
2406 double minValue = std::numeric_limits<double>::lowest() + 1,
2407 double maxValue = std::numeric_limits<double>::max() );
2412 static QString
typeName() {
return QStringLiteral(
"duration" ); }
2416 QString type() const override;
2417 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2433 QVariantMap toVariantMap()
const override;
2434 bool fromVariantMap(
const QVariantMap &map )
override;
2460 const QVariant &defaultValue = QVariant(),
2461 bool optional =
false );
2466 static QString
typeName() {
return QStringLiteral(
"scale" ); }
2470 QString type() const override;
2471 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
2495 const QVariant &defaultValue = QVariant(),
2496 bool optional =
false );
2501 static QString
typeName() {
return QStringLiteral(
"range" ); }
2504 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2505 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2520 QVariantMap toVariantMap()
const override;
2521 bool fromVariantMap(
const QVariantMap &map )
override;
2547 bool optional =
false );
2552 static QString
typeName() {
return QStringLiteral(
"raster" ); }
2555 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2556 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2558 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2559 QString createFileFilter()
const override;
2593 QgsProcessingParameterEnum(
const QString &name,
const QString &description = QString(),
const QStringList &options = QStringList(),
2594 bool allowMultiple =
false,
2595 const QVariant &defaultValue = QVariant(),
2596 bool optional =
false,
2597 bool usesStaticStrings =
false );
2602 static QString
typeName() {
return QStringLiteral(
"enum" ); }
2605 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2606 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2607 QString valueAsPythonComment(
const QVariant &value,
QgsProcessingContext &context )
const override;
2608 QString asScriptCode()
const override;
2615 QStringList options()
const;
2621 void setOptions(
const QStringList &options );
2627 bool allowMultiple()
const;
2633 void setAllowMultiple(
bool allowMultiple );
2641 bool usesStaticStrings()
const;
2649 void setUsesStaticStrings(
bool usesStaticStrings );
2651 QVariantMap toVariantMap()
const override;
2652 bool fromVariantMap(
const QVariantMap &map )
override;
2661 QStringList mOptions;
2662 bool mAllowMultiple =
false;
2663 bool mUsesStaticStrings =
false;
2701 bool multiLine =
false,
2702 bool optional =
false );
2707 static QString
typeName() {
return QStringLiteral(
"string" ); }
2710 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2711 QString asScriptCode()
const override;
2718 bool multiLine()
const;
2724 void setMultiLine(
bool multiLine );
2726 QVariantMap toVariantMap()
const override;
2727 bool fromVariantMap(
const QVariantMap &map )
override;
2736 bool mMultiLine =
false;
2761 bool optional =
false );
2766 static QString
typeName() {
return QStringLiteral(
"authcfg" ); }
2769 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2770 QString asScriptCode()
const override;
2793 const QString &parentLayerParameterName = QString(),
2794 bool optional =
false );
2799 static QString
typeName() {
return QStringLiteral(
"expression" ); }
2802 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2803 QStringList dependsOnOtherParameters()
const override;
2810 QString parentLayerParameterName()
const;
2816 void setParentLayerParameterName(
const QString &parentLayerParameterName );
2818 QVariantMap toVariantMap()
const override;
2819 bool fromVariantMap(
const QVariantMap &map )
override;
2828 QString mParentLayerParameterName;
2852 QList< int > dataTypes()
const;
2858 void setDataTypes(
const QList< int > &types );
2881 const QString &description = QString(),
2882 const QList< int > &types = QList< int >(),
2883 const QVariant &defaultValue = QVariant(),
2884 bool optional =
false );
2889 static QString
typeName() {
return QStringLiteral(
"vector" ); }
2892 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2893 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2895 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2897 QString createFileFilter()
const override;
2899 QVariantMap toVariantMap()
const override;
2900 bool fromVariantMap(
const QVariantMap &map )
override;
2923 const QString &description = QString(),
2924 const QVariant &defaultValue = QVariant(),
2925 bool optional =
false );
2930 static QString
typeName() {
return QStringLiteral(
"mesh" ); }
2933 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2934 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2936 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2937 QString createFileFilter()
const override;
2959 bool optional =
false,
2960 const QList< int > &types = QList< int >() );
2965 static QString
typeName() {
return QStringLiteral(
"layer" ); }
2968 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
2969 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
2971 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
2972 QString asScriptCode()
const override;
2974 QString createFileFilter()
const override;
2976 QVariantMap toVariantMap()
const override;
2977 bool fromVariantMap(
const QVariantMap &map )
override;
3008 QgsProcessingParameterField(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3009 const QString &parentLayerParameterName = QString(),
3010 DataType type = Any,
3011 bool allowMultiple =
false,
3012 bool optional =
false,
3013 bool defaultToAllFields =
false );
3018 static QString
typeName() {
return QStringLiteral(
"field" ); }
3021 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3022 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3023 QString asScriptCode()
const override;
3025 QStringList dependsOnOtherParameters()
const override;
3031 QString parentLayerParameterName()
const;
3037 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3043 DataType dataType()
const;
3049 void setDataType( DataType type );
3055 bool allowMultiple()
const;
3061 void setAllowMultiple(
bool allowMultiple );
3072 bool defaultToAllFields()
const;
3083 void setDefaultToAllFields(
bool enabled );
3085 QVariantMap toVariantMap()
const override;
3086 bool fromVariantMap(
const QVariantMap &map )
override;
3095 QString mParentLayerParameterName;
3096 DataType mDataType = Any;
3097 bool mAllowMultiple =
false;
3098 bool mDefaultToAllFields =
false;
3117 const QList< int > &types = QList< int >(),
3118 const QVariant &defaultValue = QVariant(),
bool optional =
false );
3123 static QString
typeName() {
return QStringLiteral(
"source" ); }
3126 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3127 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3129 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
3130 QString asScriptCode()
const override;
3132 QString createFileFilter()
const override;
3134 QVariantMap toVariantMap()
const override;
3135 bool fromVariantMap(
const QVariantMap &map )
override;
3162 bool optional =
false,
bool createByDefault =
true );
3165 QVariantMap toVariantMap()
const override;
3166 bool fromVariantMap(
const QVariantMap &map )
override;
3168 QString createFileFilter()
const override;
3201 virtual QString generateTemporaryDestination()
const;
3224 bool createByDefault()
const;
3231 void setCreateByDefault(
bool createByDefault );
3256 bool mSupportsNonFileBasedOutputs =
true;
3257 bool mCreateByDefault =
true;
3259 friend class QgsProcessingModelAlgorithm;
3260 friend class TestQgsProcessing;
3261 friend class TestQgsProcessingModelAlgorithm;
3284 bool optional =
false,
bool createByDefault =
true,
bool supportsAppend =
false );
3289 static QString
typeName() {
return QStringLiteral(
"sink" ); }
3292 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3293 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3294 QString asScriptCode()
const override;
3296 QString defaultFileExtension() const override;
3297 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3298 QString createFileFilter() const override;
3305 virtual QStringList supportedOutputVectorLayerExtensions() const;
3317 bool hasGeometry() const;
3333 bool supportsAppend() const;
3343 void setSupportsAppend(
bool supportsAppend );
3345 QVariantMap toVariantMap() const override;
3346 bool fromVariantMap( const QVariantMap &map ) override;
3347 QString generateTemporaryDestination() const override;
3357 bool mSupportsAppend = false;
3382 bool optional =
false,
bool createByDefault =
true );
3387 static QString
typeName() {
return QStringLiteral(
"vectorDestination" ); }
3390 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3391 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3392 QString asScriptCode()
const override;
3394 QString defaultFileExtension() const override;
3395 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3396 QString createFileFilter() const override;
3403 virtual QStringList supportedOutputVectorLayerExtensions() const;
3415 bool hasGeometry() const;
3423 QVariantMap toVariantMap() const override;
3424 bool fromVariantMap( const QVariantMap &map ) override;
3455 const QVariant &defaultValue = QVariant(),
3456 bool optional =
false,
3457 bool createByDefault =
true );
3462 static QString
typeName() {
return QStringLiteral(
"rasterDestination" ); }
3465 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3466 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3468 QString defaultFileExtension() const override;
3469 QString createFileFilter() const override;
3476 virtual QStringList supportedOutputRasterLayerExtensions() const;
3516 const QString &fileFilter = QString(),
3517 const QVariant &defaultValue = QVariant(),
3518 bool optional =
false,
3519 bool createByDefault =
true );
3524 static QString
typeName() {
return QStringLiteral(
"fileDestination" ); }
3527 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3528 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3530 QString defaultFileExtension() const override;
3531 QString asPythonString(
QgsProcessing::PythonOutputType outputType =
QgsProcessing::PythonQgsProcessingAlgorithmSubclass ) const override;
3532 QString createFileFilter() const override;
3538 QString fileFilter() const;
3544 void setFileFilter( const QString &filter );
3546 QVariantMap toVariantMap() const override;
3547 bool fromVariantMap( const QVariantMap &map ) override;
3557 QString mFileFilter;
3575 const QVariant &defaultValue = QVariant(),
3576 bool optional =
false,
3577 bool createByDefault =
true );
3582 static QString
typeName() {
return QStringLiteral(
"folderDestination" ); }
3585 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3587 QString defaultFileExtension() const override;
3609 QgsProcessingParameterBand(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3610 const QString &parentLayerParameterName = QString(),
3611 bool optional =
false,
3612 bool allowMultiple =
false );
3617 static QString
typeName() {
return QStringLiteral(
"band" ); }
3620 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3621 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3622 QString asScriptCode()
const override;
3623 QStringList dependsOnOtherParameters()
const override;
3630 QString parentLayerParameterName()
const;
3636 void setParentLayerParameterName(
const QString &parentLayerParameterName );
3638 QVariantMap toVariantMap()
const override;
3639 bool fromVariantMap(
const QVariantMap &map )
override;
3651 bool allowMultiple()
const;
3658 void setAllowMultiple(
bool allowMultiple );
3662 QString mParentLayerParameterName;
3663 bool mAllowMultiple =
false;
3685 bool optional =
false );
3690 static QString
typeName() {
return QStringLiteral(
"layout" ); }
3693 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3694 QString asScriptCode()
const override;
3723 const QString &parentLayoutParameterName = QString(),
3725 bool optional =
false );
3730 static QString
typeName() {
return QStringLiteral(
"layoutitem" ); }
3733 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3734 QString asScriptCode()
const override;
3736 QVariantMap toVariantMap()
const override;
3737 bool fromVariantMap(
const QVariantMap &map )
override;
3738 QStringList dependsOnOtherParameters()
const override;
3749 QString parentLayoutParameterName()
const;
3755 void setParentLayoutParameterName(
const QString &name );
3764 int itemType()
const;
3773 void setItemType(
int type );
3776 QString mParentLayoutParameterName;
3798 QgsProcessingParameterColor(
const QString &name,
const QString &description = QString(),
const QVariant &defaultValue = QVariant(),
3799 bool opacityEnabled =
true,
3800 bool optional =
false );
3805 static QString
typeName() {
return QStringLiteral(
"color" ); }
3808 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3809 QString asScriptCode()
const override;
3811 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3812 QVariantMap toVariantMap()
const override;
3813 bool fromVariantMap(
const QVariantMap &map )
override;
3821 bool opacityEnabled()
const;
3830 void setOpacityEnabled(
bool enabled );
3839 bool mAllowOpacity =
true;
3861 const QString &sourceCrsParameterName = QString(),
const QString &destinationCrsParameterName = QString(),
3862 const QVariant &staticSourceCrs = QVariant(),
const QVariant &staticDestinationCrs = QVariant(),
3863 bool optional =
false );
3868 static QString
typeName() {
return QStringLiteral(
"coordinateoperation" ); }
3871 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3872 QString asScriptCode()
const override;
3874 QStringList dependsOnOtherParameters()
const override;
3876 QVariantMap toVariantMap()
const override;
3877 bool fromVariantMap(
const QVariantMap &map )
override;
3942 QString mSourceParameterName;
3943 QString mDestParameterName;
3944 QVariant mSourceCrs;
3967 bool optional =
false );
3972 static QString
typeName() {
return QStringLiteral(
"maptheme" ); }
3975 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
3976 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
3977 QString asScriptCode()
const override;
3979 QVariantMap toVariantMap()
const override;
3980 bool fromVariantMap(
const QVariantMap &map )
override;
4018 Type type = DateTime,
4019 const QVariant &defaultValue = QVariant(),
4020 bool optional =
false,
4021 const QDateTime &minValue = QDateTime(),
4022 const QDateTime &maxValue = QDateTime()
4028 static QString
typeName() {
return QStringLiteral(
"datetime" ); }
4031 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4032 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4033 QString toolTip()
const override;
4043 QDateTime minimum()
const;
4056 void setMinimum(
const QDateTime &minimum );
4065 QDateTime maximum()
const;
4078 void setMaximum(
const QDateTime &maximum );
4084 Type dataType()
const;
4090 void setDataType( Type type );
4092 QVariantMap toVariantMap()
const override;
4093 bool fromVariantMap(
const QVariantMap &map )
override;
4104 Type mDataType = DateTime;
4129 bool optional =
false );
4134 static QString
typeName() {
return QStringLiteral(
"providerconnection" ); }
4137 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4138 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4139 QString asScriptCode()
const override;
4141 QVariantMap toVariantMap()
const override;
4142 bool fromVariantMap(
const QVariantMap &map )
override;
4163 QString mProviderId;
4189 QgsProcessingParameterDatabaseSchema(
const QString &name,
const QString &description,
const QString &connectionParameterName = QString(),
const QVariant &defaultValue = QVariant(),
4190 bool optional =
false );
4195 static QString
typeName() {
return QStringLiteral(
"databaseschema" ); }
4198 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4199 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4200 QString asScriptCode()
const override;
4202 QVariantMap toVariantMap()
const override;
4203 bool fromVariantMap(
const QVariantMap &map )
override;
4204 QStringList dependsOnOtherParameters()
const override;
4210 QString parentConnectionParameterName()
const;
4216 void setParentConnectionParameterName(
const QString &name );
4225 QString mParentConnectionParameterName;
4253 const QString &connectionParameterName = QString(),
4254 const QString &schemaParameterName = QString(),
4255 const QVariant &defaultValue = QVariant(),
4256 bool optional =
false,
4257 bool allowNewTableNames =
false );
4262 static QString
typeName() {
return QStringLiteral(
"databasetable" ); }
4265 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4266 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4267 QString asScriptCode()
const override;
4269 QVariantMap toVariantMap()
const override;
4270 bool fromVariantMap(
const QVariantMap &map )
override;
4271 QStringList dependsOnOtherParameters()
const override;
4277 QString parentConnectionParameterName()
const;
4283 void setParentConnectionParameterName(
const QString &name );
4289 QString parentSchemaParameterName()
const;
4295 void setParentSchemaParameterName(
const QString &name );
4308 bool allowNewTableNames()
const;
4316 void setAllowNewTableNames(
bool allowed );
4320 QString mParentConnectionParameterName;
4321 QString mParentSchemaParameterName;
4322 bool mAllowNewTableNames =
false;
4340 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4345 static QString
typeName() {
return QStringLiteral(
"pointcloud" ); }
4348 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4349 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4351 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4352 QString createFileFilter()
const override;
4375 const QVariant &defaultValue = QVariant(),
bool optional =
false );
4380 static QString
typeName() {
return QStringLiteral(
"annotation" ); }
4383 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4384 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4386 QVariant valueAsJsonObject(
const QVariant &value,
QgsProcessingContext &context )
const override;
4412 const QVariant &defaultValue = QVariant(),
4413 bool optional =
false,
4414 bool createByDefault =
true );
4419 static QString
typeName() {
return QStringLiteral(
"pointCloudDestination" ); }
4422 bool checkValueIsAcceptable(
const QVariant &input,
QgsProcessingContext *context =
nullptr )
const override;
4423 QString valueAsPythonString(
const QVariant &value,
QgsProcessingContext &context )
const override;
4425 QString defaultFileExtension() const override;
4426 QString createFileFilter() const override;
4432 virtual QStringList supportedOutputPointCloudLayerExtensions() const;
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
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.
QgsProcessingFeatureSourceDefinition(const QgsProperty &source, bool selectedFeaturesOnly=false, long long featureLimit=-1, QgsProcessingFeatureSourceDefinition::Flags flags=QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck=QgsFeatureRequest::GeometryAbortOnInvalid)
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.
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.
void setDefaultUnit(QgsUnitTypes::DistanceUnit unit)
Sets the default distance unit for the parameter.
static QString typeName()
Returns the type name for the parameter class.
A double numeric parameter for duration values.
void setDefaultUnit(QgsUnitTypes::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.
Helper functions for various unit types.
DistanceUnit
Units of distance.
@ DistanceUnknownUnit
Unknown distance unit.
TemporalUnit
Temporal units.
@ TemporalMilliseconds
Milliseconds.
Represents a vector layer which manages a vector based data sets.
Type
The WKB type describes the number of dimensions a geometry has.
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