Class: QgsMapInfoSymbolConverter¶
Handles conversion of MapInfo symbols to QGIS symbology.
Added in version 3.20.
Static Methods
Converts the MapInfo fill symbol with the specified identifier to a |
|
Converts the MapInfo line symbol with the specified identifier to a |
|
Converts the MapInfo marker symbol with the specified identifier to a |
- class qgis.core.QgsMapInfoSymbolConverter[source]¶
Bases:
object
- static convertFillSymbol(identifier: int, context: QgsMapInfoSymbolConversionContext, foreColor: QColor | Qt.GlobalColor, backColor: QColor | Qt.GlobalColor = QColor()) QgsFillSymbol | None [source]¶
Converts the MapInfo fill symbol with the specified
identifier
to aQgsFillSymbol
.The caller takes ownership of the returned symbol.
- Parameters:
identifier (int)
context (QgsMapInfoSymbolConversionContext)
foreColor (Union[QColor, Qt.GlobalColor])
backColor (Union[QColor, Qt.GlobalColor] = QColor())
- Return type:
Optional[QgsFillSymbol]
- static convertLineSymbol(identifier: int, context: QgsMapInfoSymbolConversionContext, foreColor: QColor | Qt.GlobalColor, size: float, sizeUnit: Qgis.RenderUnit, interleaved: bool = False) QgsLineSymbol | None [source]¶
Converts the MapInfo line symbol with the specified
identifier
to aQgsLineSymbol
.The caller takes ownership of the returned symbol.
- Parameters:
identifier (int)
context (QgsMapInfoSymbolConversionContext)
foreColor (Union[QColor, Qt.GlobalColor])
size (float)
sizeUnit (Qgis.RenderUnit)
interleaved (bool = False)
- Return type:
Optional[QgsLineSymbol]
- static convertMarkerSymbol(identifier: int, context: QgsMapInfoSymbolConversionContext, color: QColor | Qt.GlobalColor, size: float, sizeUnit: Qgis.RenderUnit) QgsMarkerSymbol | None [source]¶
Converts the MapInfo marker symbol with the specified
identifier
to aQgsMarkerSymbol
.This method will convert a MapInfo “MapInfo 3.0 Compatible” symbol with a specific
identifier
to aQgsMarkerSymbol
.The caller takes ownership of the returned symbol.
- Parameters:
identifier (int)
context (QgsMapInfoSymbolConversionContext)
color (Union[QColor, Qt.GlobalColor])
size (float)
sizeUnit (Qgis.RenderUnit)
- Return type:
Optional[QgsMarkerSymbol]