Skip to content
Permalink
Browse files

trying to add missing parameter in modeler

  • Loading branch information
ghtmtt authored and nyalldawson committed May 4, 2018
1 parent 9b22d99 commit 94ad85997c2c379b16e35c4f3c7bb3044ba1b9cb
@@ -115,6 +115,36 @@ class CORE_EXPORT QgsProcessingParameterTypeBoolean : public QgsProcessingParame
}
};

/**
* An expression parameter for processing algorithms.
*
* \since QGIS 3.2
* \ingroup core
* \note No Python bindings available. Get your copy from QgsApplication.processingRegistry().parameterType()
*/
class CORE_EXPORT QgsProcessingParameterTypeExpression : public QgsProcessingParameterType
{
virtual QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY
{
return new QgsProcessingParameterExpression( name );
}

virtual QString description() const override
{
return QCoreApplication::translate( "Processing", "An expression parameter, to add custom expressions based on layer fields." );
}

virtual QString name() const override
{
return QCoreApplication::translate( "Processing", "Expression" );
}

virtual QString id() const override
{
return QStringLiteral( "expression" );
}
};

/**
* A crs parameter for processing algorithms.
*
@@ -25,6 +25,7 @@ QgsProcessingRegistry::QgsProcessingRegistry( QObject *parent SIP_TRANSFERTHIS )
addParameterType( new QgsProcessingParameterTypeRasterLayer() );
addParameterType( new QgsProcessingParameterTypeVectorLayer() );
addParameterType( new QgsProcessingParameterTypeBoolean() );
addParameterType( new QgsProcessingParameterTypeExpression() );
addParameterType( new QgsProcessingParameterTypeCrs() );
addParameterType( new QgsProcessingParameterTypeRange() );
addParameterType( new QgsProcessingParameterTypePoint() );
@@ -42,6 +43,7 @@ QgsProcessingRegistry::QgsProcessingRegistry( QObject *parent SIP_TRANSFERTHIS )
addParameterType( new QgsProcessingParameterTypeFeatureSource() );
addParameterType( new QgsProcessingParameterTypeNumber() );
addParameterType( new QgsProcessingParameterTypeDistance() );
addParameterType( new QgsProcessingParameterTypeBand() );
}

QgsProcessingRegistry::~QgsProcessingRegistry()

0 comments on commit 94ad859

Please sign in to comment.
You can’t perform that action at this time.