22QString QgsLoadLayerAlgorithm::name()
const
24 return QStringLiteral(
"loadlayer" );
32QString QgsLoadLayerAlgorithm::displayName()
const
34 return QObject::tr(
"Load layer into project" );
37QStringList QgsLoadLayerAlgorithm::tags()
const
39 return QObject::tr(
"load,open,layer,raster,vector,project" ).split(
',' );
42QString QgsLoadLayerAlgorithm::group()
const
44 return QObject::tr(
"Modeler tools" );
47QString QgsLoadLayerAlgorithm::groupId()
const
49 return QStringLiteral(
"modelertools" );
52QString QgsLoadLayerAlgorithm::shortHelpString()
const
54 return QObject::tr(
"This algorithm loads a layer to the current project." );
57QgsLoadLayerAlgorithm *QgsLoadLayerAlgorithm::createInstance()
const
59 return new QgsLoadLayerAlgorithm();
62void QgsLoadLayerAlgorithm::initAlgorithm(
const QVariantMap & )
71 QgsMapLayer *layer = parameterAsLayer( parameters, QStringLiteral(
"INPUT" ), context );
72 const QString name = parameterAsString( parameters, QStringLiteral(
"NAME" ), context );
82 details.forceName =
true;
86 results.insert( QStringLiteral(
"OUTPUT" ), layer->
id() );
QFlags< ProcessingAlgorithmFlag > ProcessingAlgorithmFlags
Flags indicating how and when an algorithm operates and should be exposed to users.
@ NotAvailableInStandaloneTool
Algorithm should not be available from the standalone "qgis_process" tool. Used to flag algorithms wh...
@ HideFromToolbox
Algorithm should be hidden from the toolbox.
Base class for all map layer types.
void setName(const QString &name)
Set the display name of the layer.
Details for layers to load into projects.
Contains information about the context in which a processing algorithm is executed.
void addLayerToLoadOnCompletion(const QString &layer, const QgsProcessingContext::LayerDetails &details)
Adds a layer to load (by ID or datasource) into the canvas upon completion of the algorithm or model.
QgsProject * project() const
Returns the project in which the algorithm is being executed.
Custom exception class for processing related exceptions.
Base class for providing feedback from a processing algorithm.
A map layer output for processing algorithms, where layers may be either vector or raster.
A map layer parameter for processing algorithms.
A string parameter for processing algorithms.