Class: QgsSldExportContext

Holds SLD export options and other information related to SLD export of a QGIS layer style.

Added in version 3.30.

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:
errors(self) List[str][source]

Returns a list of errors which occurred during the conversion.

See also

pushError()

See also

warnings()

Added in version 3.44.

Return type:

List[str]

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

extraProperties(self) Dict[str, Any][source]

Returns the open ended set of properties that can drive/inform the SLD encoding.

Added in version 3.44.

Return type:

Dict[str, Any]

pushError(self, error: str | None)[source]

Pushes a error message generated during the conversion.

See also

errors()

See also

pushWarning()

Added in version 3.44.

Parameters:

error (Optional[str])

pushWarning(self, warning: str | None)[source]

Pushes a warning message generated during the conversion.

See also

warnings()

See also

pushError()

Added in version 3.44.

Parameters:

warning (Optional[str])

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])

setExtraProperties(self, properties: Dict[str, Any])[source]

Sets the open ended set of properties that can drive/inform the SLD encoding.

Added in version 3.44.

Parameters:

properties (Dict[str, Any])

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

warnings(self) List[str][source]

Returns a list of warnings which occurred during the conversion.

See also

pushWarning()

See also

errors()

Added in version 3.44.

Return type:

List[str]