Class: QgsProcessingParameterDxfLayers¶
-
class
qgis.core.
QgsProcessingParameterDxfLayers
(name: str, description: str = '')¶ Bases:
QgsProcessingParameterDefinition
Constructor for QgsProcessingParameterDxfLayers.
QgsProcessingParameterDxfLayers(
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 betweenQgsDxfExport
.DxfLayer representation and QVariant representation.New in version 3.18.
- Parameters
name (str) –
description –
-
asPythonString
(self, outputType: QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) → str¶ - Parameters
outputType (QgsProcessing.PythonOutputType = QgsProcessing.PythonQgsProcessingAlgorithmSubclass) –
- Return type
str
-
checkValueIsAcceptable
(self, input: Any, context: QgsProcessingContext = None) → bool¶ - Parameters
input (Any) –
context (
QgsProcessingContext
= None) –
- Return type
bool
-
clone
(self) → QgsProcessingParameterDefinition¶ - Return type
-
layerAsVariantMap
(layer: QgsDxfExport.DxfLayer) → Dict[str, Any]¶ Converts a single input layer to QVariant representation (a QVariantMap)
- Parameters
layer (QgsDxfExport.DxfLayer) –
- Return type
Dict[str, Any]
-
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]
-
type
(self) → str¶ - Return type
str
-
typeName
() → str¶ Returns the type name for the parameter class.
- Return type
str
-
valueAsPythonString
(self, value: Any, context: QgsProcessingContext) → str¶ - Parameters
value (Any) –
context (QgsProcessingContext) –
- Return type
str
-
variantMapAsLayer
(layerVariantMap: Dict[str, Any], context: QgsProcessingContext) → QgsDxfExport.DxfLayer¶ Converts a QVariant value (a QVariantMap) to a single input layer
- Parameters
layerVariantMap (Dict[str) –
context (QgsProcessingContext) –
- Return type