Class: QgsIconUtils

Contains utility functions for working with icons.

Added in version 3.20.

Static Methods

iconDefaultLayer

Returns a default icon for layers, which aren't the standard raster/vector/.

iconForGeometryType

Returns the icon for a vector layer whose geometry typeGroup is provided.

iconForLayer

Returns the icon corresponding to a specified map layer.

iconForLayerType

Returns the default icon for the specified layer type.

iconForWkbType

Returns the icon for a vector layer whose geometry type is provided.

iconGeometryCollection

Returns an icon representing geometry collections.

iconLine

Returns an icon representing line geometries.

iconMesh

Returns an icon representing mesh layers.

iconPoint

Returns an icon representing point geometries.

iconPointCloud

Returns an icon representing point cloud layers.

iconPolygon

Returns an icon representing polygon geometries.

iconRaster

Returns an icon representing raster layers.

iconTable

Returns an icon representing non-spatial layers (tables).

iconTiledScene

Returns an icon representing tiled scene layers.

iconVectorTile

Returns an icon representing vector tile layers.

class qgis.core.QgsIconUtils[source]

Bases: object

static iconDefaultLayer() QIcon[source]

Returns a default icon for layers, which aren’t the standard raster/vector/… types.

Return type:

QIcon

static iconForGeometryType(typeGroup: Qgis.GeometryType) QIcon[source]

Returns the icon for a vector layer whose geometry typeGroup is provided.

Added in version 3.28.

Parameters:

typeGroup (Qgis.GeometryType)

Return type:

QIcon

static iconForLayer(layer: QgsMapLayer | None) QIcon[source]

Returns the icon corresponding to a specified map layer.

Parameters:

layer (Optional[QgsMapLayer])

Return type:

QIcon

static iconForLayerType(type: Qgis.LayerType) QIcon[source]

Returns the default icon for the specified layer type.

Added in version 3.22.

Parameters:

type (Qgis.LayerType)

Return type:

QIcon

static iconForWkbType(type: Qgis.WkbType) QIcon[source]

Returns the icon for a vector layer whose geometry type is provided.

Parameters:

type (Qgis.WkbType)

Return type:

QIcon

static iconGeometryCollection() QIcon[source]

Returns an icon representing geometry collections.

Added in version 3.22.

Return type:

QIcon

static iconLine() QIcon[source]

Returns an icon representing line geometries.

Return type:

QIcon

static iconMesh() QIcon[source]

Returns an icon representing mesh layers.

Return type:

QIcon

static iconPoint() QIcon[source]

Returns an icon representing point geometries.

Return type:

QIcon

static iconPointCloud() QIcon[source]

Returns an icon representing point cloud layers.

Return type:

QIcon

static iconPolygon() QIcon[source]

Returns an icon representing polygon geometries.

Return type:

QIcon

static iconRaster() QIcon[source]

Returns an icon representing raster layers.

Return type:

QIcon

static iconTable() QIcon[source]

Returns an icon representing non-spatial layers (tables).

Return type:

QIcon

static iconTiledScene() QIcon[source]

Returns an icon representing tiled scene layers.

Added in version 3.34.

Return type:

QIcon

static iconVectorTile() QIcon[source]

Returns an icon representing vector tile layers.

Return type:

QIcon