Class: QgsSldExportContext

The QgsSldExportContext class holds SLD export options and other information related to SLD export of a QGIS layer style.

Added in version 3.30.

Methods

exportFilePath

Returns the export file path for the SLD

exportOptions

Returns the export options

setExportFilePath

Sets the export file path for the SLD to exportFilePath

setExportOptions

Set export options to exportOptions

setVendorExtension

Sets the vendor extensions to vendorExtension

vendorExtensions

Returns the vendor extension enabled for the SLD export

class qgis.core.QgsSldExportContext[source]

Bases: object

__init__()

Constructs a default SLD export context

__init__(other: QgsSldExportContext)
Parameters:

other (QgsSldExportContext)

__init__(options: Qgis.SldExportOptions | Qgis.SldExportOption, vendorExtension: Qgis.SldExportVendorExtension, filePath: str | None)

/brief Create a new QgsSldExportContext /param options SLD export options /param vendorExtension SLD export vendor extension /param filePath SLD export file path

Parameters:
exportFilePath(self) str[source]

Returns the export file path for the SLD

Return type:

str

exportOptions(self) Qgis.SldExportOptions[source]

Returns the export options

Return type:

Qgis.SldExportOptions

setExportFilePath(self, exportFilePath: str | None)[source]

Sets the export file path for the SLD to exportFilePath

Parameters:

exportFilePath (Optional[str])

setExportOptions(self, exportOptions: Qgis.SldExportOptions | Qgis.SldExportOption)[source]

Set export options to exportOptions

Parameters:

exportOptions (Union[Qgis.SldExportOptions, Qgis.SldExportOption])

setVendorExtension(self, vendorExtension: Qgis.SldExportVendorExtension)[source]

Sets the vendor extensions to vendorExtension

Parameters:

vendorExtension (Qgis.SldExportVendorExtension)

vendorExtensions(self) Qgis.SldExportVendorExtension[source]

Returns the vendor extension enabled for the SLD export

Return type:

Qgis.SldExportVendorExtension