57 if (
dynamic_cast< QgsProcessingModelAlgorithm *
>( sipCpp ) != NULL )
58 sipType = sipType_QgsProcessingModelAlgorithm;
60 sipType = sipType_QgsProcessingFeatureBasedAlgorithm;
62 sipType = sipType_QgsProcessingAlgorithm;
71 FlagHideFromToolbox = 1 << 1,
72 FlagHideFromModeler = 1 << 2,
73 FlagSupportsBatch = 1 << 3,
74 FlagCanCancel = 1 << 4,
75 FlagRequiresMatchingCrs = 1 << 5,
76 FlagNoThreading = 1 << 6,
77 FlagDisplayNameIsLiteral = 1 << 7,
78 FlagSupportsInPlaceEdits = 1 << 8,
79 FlagKnownIssues = 1 << 9,
80 FlagCustomException = 1 << 10,
81 FlagPruneModelBranchesBasedOnAlgorithmResults = 1 << 11,
82 FlagSkipGenericModelLogging = 1 << 12,
83 FlagNotAvailableInStandaloneTool = 1 << 13,
84 FlagRequiresProject = 1 << 14,
85 FlagDeprecated = FlagHideFromToolbox | FlagHideFromModeler,
87 Q_DECLARE_FLAGS( Flags, Flag )
148 virtual QString name() const = 0;
168 virtual QString displayName() const = 0;
175 virtual QString shortDescription() const;
181 virtual QStringList tags()
const {
return QStringList(); }
189 virtual QString shortHelpString()
const;
198 Q_DECL_DEPRECATED
virtual QString helpString() const
SIP_DEPRECATED;
205 virtual QString helpUrl() const;
211 virtual QIcon icon() const;
217 virtual QString svgIconPath() const;
225 virtual QString group()
const {
return QString(); }
234 virtual QString
groupId()
const {
return QString(); }
240 virtual Flags flags()
const;
248 virtual bool canExecute( QString *errorMessage
SIP_OUT =
nullptr )
const;
257 virtual bool checkParameterValues(
const QVariantMap ¶meters,
267 virtual QVariantMap preprocessParameters(
const QVariantMap ¶meters );
293 int countVisibleParameters()
const;
319 bool hasHtmlOutputs()
const;
367 const QVariantMap ¶meters,
369 const QMap< QString, QgsProcessingAlgorithm::VectorProperties > &sourceProperties )
const;
435 virtual QWidget *createCustomParametersWidget( QWidget *parent =
nullptr ) const
SIP_FACTORY;
452 virtual
bool validateInputCrs( const QVariantMap ¶meters,
462 virtual QString asPythonCommand( const QVariantMap ¶meters,
QgsProcessingContext &context ) const;
485 virtual QVariantMap asMap( const QVariantMap ¶meters,
QgsProcessingContext &context ) const;
519 virtual
void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) = 0;
544 void removeParameter( const QString &name );
656 QString parameterAsString( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
661 QString parameterAsExpression( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
666 double parameterAsDouble( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
671 int parameterAsInt( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
677 QList<
int> parameterAsInts( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
682 int parameterAsEnum( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
687 QList<
int> parameterAsEnums( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
693 QString parameterAsEnumString( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
699 QStringList parameterAsEnumStrings( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
704 bool parameterAsBool( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
710 bool parameterAsBoolean( const QVariantMap ¶meters, const QString &name, const
QgsProcessingContext &context ) const;
760 QString parameterAsCompatibleSourceLayerPath( const QVariantMap ¶meters, const QString &name,
792 QString parameterAsCompatibleSourceLayerPathAndLayerName( const QVariantMap ¶meters, const QString &name,
827 QString parameterAsOutputLayer( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
832 QString parameterAsFileOutput( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
918 QString parameterAsFile( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
924 QVariantList parameterAsMatrix( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
937 QStringList parameterAsFileList( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
942 QList<
double> parameterAsRange( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
956 QStringList parameterAsStrings( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
983 QColor parameterAsColor( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
990 QString parameterAsConnectionName( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
997 QString parameterAsSchema( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
1004 QString parameterAsDatabaseTableName( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
1011 QDateTime parameterAsDateTime( const QVariantMap ¶meters, const QString &name,
QgsProcessingContext &context ) const;
1053 static QString invalidSourceError( const QVariantMap ¶meters, const QString &name );
1068 static QString invalidRasterError( const QVariantMap ¶meters, const QString &name );
1083 static QString invalidSinkError( const QVariantMap ¶meters, const QString &name );
1098 static QString invalidPointCloudError( const QVariantMap ¶meters, const QString &name );
1111 static QString writeFeatureError(
QgsFeatureSink *sink, const QVariantMap ¶meters, const QString &name );
1120 virtual
bool supportInPlaceEdit( const
QgsMapLayer *layer ) const;
1127 bool mHasPrepared = false;
1128 bool mHasExecuted = false;
1129 bool mHasPostProcessed = false;
1136 friend class TestQgsProcessing;
1137 friend class QgsProcessingModelAlgorithm;