Class: QgsIconUtils¶
Contains utility functions for working with icons.
Added in version 3.20.
List of all members, including inherited members
Static Methods
Returns a copy of icon with an overlay icon rendered from the image file at overlayPath. |
|
Returns a default icon for layers, which aren't the standard raster/vector/. |
|
Returns the icon for a vector layer whose geometry typeGroup is provided. |
|
Returns the icon corresponding to a specified map layer. |
|
Returns the default icon for the specified layer type. |
|
Returns the icon for a vector layer whose geometry type is provided. |
|
Returns an icon representing geometry collections. |
|
Returns an icon representing line geometries. |
|
Returns an icon representing mesh layers. |
|
Returns an icon representing point geometries. |
|
Returns an icon representing point cloud layers. |
|
Returns an icon representing polygon geometries. |
|
Returns an icon representing raster layers. |
|
Returns an icon representing non-spatial layers (tables). |
|
Returns an icon representing tiled scene layers. |
|
Returns an icon representing vector tile layers. |
- class qgis.core.QgsIconUtils[source]¶
Bases:
object- static addOverlay(icon: QIcon, overlayPath: str | None, size: QSize = QSize(16, 16)) QIcon[source]¶
Returns a copy of
iconwith an overlay icon rendered from the image file atoverlayPath.- Parameters:
icon (QIcon) – The base icon to which the overlay will be added.
overlayPath (str|None) – The path to the overlay image file.
size (QSize = QSize(16, 16)) – The requested size of the resultant icon. Default value is the standard small icon size 16x16 pixels.
Added in version 4.4.
- Return type:
QIcon
- 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
typeGroupis 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 (QgsMapLayer|None)
- 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
typeis 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 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 iconTable() QIcon[source]¶
Returns an icon representing non-spatial layers (tables).
- Return type:
QIcon