Class: QgsProcessingParameterDxfLayers¶
A parameter for Processing algorithms that need a list of input vector layers to export as DXF file.
This parameter provides Processing framework’s adapter for
QList<QgsDxfExport
.DxfLayer>.
A valid value for this parameter is a list (QVariantList), where each item is a map (QVariantMap) in this form:
{
'layer': string or QgsMapLayer,
'attributeIndex': int
}
Also it can accept lists (either string lists or
QgsVectorLayer
list) as well as individual layer object or
string representing layer source.
Static functions parametersAsLayers()
,
variantMapAsLayer()
, layerAsVariantMap()
provide
conversion between QgsDxfExport
.DxfLayer representation and
QVariant representation.
Added in version 3.18.
Class Hierarchy¶
Base classes¶
Base class for the definition of processing parameters. |
Static Methods
Converts a single input layer to QVariant representation (a QVariantMap) |
|
Converts a QVariant value (a QVariantList) to a list of input layers |
|
Returns the type name for the parameter class. |
|
Converts a QVariant value (a QVariantMap) to a single input layer |
- class qgis.core.QgsProcessingParameterDxfLayers[source]¶
Bases:
QgsProcessingParameterDefinition
- __init__(name: str | None, description: str | None = '')
Constructor for QgsProcessingParameterDxfLayers.
- Parameters:
name (Optional[str])
description (Optional[str] = '')
- __init__(a0: QgsProcessingParameterDxfLayers)
- Parameters:
- static layerAsVariantMap(layer: QgsDxfExport.DxfLayer) Dict[str, Any] [source]¶
Converts a single input layer to QVariant representation (a QVariantMap)
- Parameters:
layer (QgsDxfExport.DxfLayer)
- Return type:
Dict[str, Any]
- static parameterAsLayers(layersVariant: Any, context: QgsProcessingContext) List[QgsDxfExport.DxfLayer] ¶
Converts a QVariant value (a QVariantList) to a list of input layers
- Parameters:
layersVariant (Any)
context (QgsProcessingContext)
- Return type:
List[QgsDxfExport.DxfLayer]
- static variantMapAsLayer(layerVariantMap: Dict[str, Any], context: QgsProcessingContext) QgsDxfExport.DxfLayer [source]¶
Converts a QVariant value (a QVariantMap) to a single input layer
- Parameters:
layerVariantMap (Dict[str, Any])
context (QgsProcessingContext)
- Return type: