Skip to content
Permalink
Browse files

also MapLayer

  • Loading branch information
ghtmtt authored and nyalldawson committed May 4, 2018
1 parent 94ad859 commit df4ddf2d3786baa9641a2b2934ad2a6b2f729e6f
@@ -85,6 +85,36 @@ class CORE_EXPORT QgsProcessingParameterTypeVectorLayer : public QgsProcessingPa
}
};

/**
* A generic map layer 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 QgsProcessingParameterTypeMapLayer : public QgsProcessingParameterType
{
virtual QgsProcessingParameterDefinition *create( const QString &name ) const override SIP_FACTORY
{
return new QgsProcessingParameterMapLayer( name );
}

virtual QString description() const override
{
return QCoreApplication::translate( "Processing", "A generic map layer parameter, which accepts either vector or raster layers." );
}

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

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

/**
* A boolean parameter for processing algorithms.
*
@@ -24,6 +24,7 @@ QgsProcessingRegistry::QgsProcessingRegistry( QObject *parent SIP_TRANSFERTHIS )
{
addParameterType( new QgsProcessingParameterTypeRasterLayer() );
addParameterType( new QgsProcessingParameterTypeVectorLayer() );
addParameterType( new QgsProcessingParameterTypeMapLayer() );
addParameterType( new QgsProcessingParameterTypeBoolean() );
addParameterType( new QgsProcessingParameterTypeExpression() );
addParameterType( new QgsProcessingParameterTypeCrs() );

0 comments on commit df4ddf2

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