Class: Qgs3DSymbolRegistry¶
- class qgis.core.Qgs3DSymbolRegistry¶
Bases:
sip.wrapper
Registry of available 3D symbol classes.
Qgs3DSymbolRegistry is not usually directly created, but rather accessed through
QgsApplication.symbol3DRegistry()
.Added in version 3.16:
Methods
Registers a new symbol type.
Creates a new instance of a symbol of the specified
type
.Creates a new instance of the default 3D symbol for the specified geometry
type
.Returns metadata for specified symbol
type
.Returns a list of all available symbol types.
- addSymbolType(self, metadata: Qgs3DSymbolAbstractMetadata | None) bool ¶
Registers a new symbol type. Takes ownership of the
metadata
instance.- Parameters:
metadata (Optional[Qgs3DSymbolAbstractMetadata])
- Return type:
bool
- createSymbol(self, type: str | None) QgsAbstract3DSymbol | None ¶
Creates a new instance of a symbol of the specified
type
.The caller takes ownership of the returned symbol.
Returns
None
if the specified type is not found in the registry.- Parameters:
type (Optional[str])
- Return type:
Optional[QgsAbstract3DSymbol]
- defaultSymbolForGeometryType(self, type: Qgis.GeometryType) QgsAbstract3DSymbol | None ¶
Creates a new instance of the default 3D symbol for the specified geometry
type
.The caller takes ownership of the returned symbol.
- Parameters:
type (Qgis.GeometryType)
- Return type:
Optional[QgsAbstract3DSymbol]
- symbolMetadata(self, type: str | None) Qgs3DSymbolAbstractMetadata | None ¶
Returns metadata for specified symbol
type
. ReturnsNone
if not found- Parameters:
type (Optional[str])
- Return type:
Optional[Qgs3DSymbolAbstractMetadata]
- symbolTypes(self) List[str] ¶
Returns a list of all available symbol types.
- Return type:
List[str]