Class: QgsLayerItem¶
-
class
qgis.core.
QgsLayerItem
¶ Bases:
qgis._core.QgsDataItem
Item that represents a layer that can be opened with one of the providers
Enums
Methods
Returns comments of the layer
Delete this layer item
Returns icon for mesh layer type
Returns the icon name of the given
layerType
- return
the layer name
Returns the string representation of the given
layerType
Returns
QgsMapLayerType
Returns provider key
Returns the supported CRS
Returns the supported formats
Returns the layer item type corresponding to a
QgsMapLayer
layer
.Returns layer uri or empty string if layer cannot be created
Signals
Attributes
-
Database
= 7¶
-
class
LayerType
¶ Bases:
int
-
baseClass
¶ alias of
QgsLayerItem
-
-
Line
= 4¶
-
Mesh
= 10¶
-
NoType
= 0¶
-
Plugin
= 9¶
-
Point
= 3¶
-
Polygon
= 5¶
-
Raster
= 2¶
-
Table
= 8¶
-
TableLayer
= 6¶
-
Vector
= 1¶
-
childEvent
()¶
-
comments
(self) → str¶ Returns comments of the layer
New in version 2.12.
-
connectNotify
()¶
-
customEvent
()¶
-
deferredDelete
()¶
-
deleteLayer
(self) → bool¶ Delete this layer item
-
disconnectNotify
()¶
-
equal
(self, other: QgsDataItem) → bool¶
-
hasDragEnabled
(self) → bool¶
-
iconDefault
() → QIcon¶
-
iconLine
() → QIcon¶
-
iconMesh
() → QIcon¶ Returns icon for mesh layer type
-
iconName
(layerType: QgsLayerItem.LayerType) → str¶ Returns the icon name of the given
layerType
New in version 3.
-
iconPoint
() → QIcon¶
-
iconPolygon
() → QIcon¶
-
iconRaster
() → QIcon¶
-
iconTable
() → QIcon¶
-
isSignalConnected
()¶
-
layerName
(self) → str¶ - Returns
the layer name
-
layerTypeAsString
(layerType: QgsLayerItem.LayerType) → str¶ Returns the string representation of the given
layerType
New in version 3.
-
mapLayerType
(self) → QgsMapLayerType¶ Returns
QgsMapLayerType
-
mimeUri
(self) → QgsMimeDataUtils.Uri¶
-
populate
()¶
-
providerKey
(self) → str¶ Returns provider key
-
receivers
()¶
-
refresh
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
supportedCrs
(self) → List[str]¶ Returns the supported CRS
New in version 2.8.
-
supportedFormats
(self) → List[str]¶ Returns the supported formats
New in version 2.8.
-
timerEvent
()¶
-
typeFromMapLayer
(layer: QgsMapLayer) → QgsLayerItem.LayerType¶ Returns the layer item type corresponding to a
QgsMapLayer
layer
.New in version 3.6.
-
updateIcon
()¶
-
uri
(self) → str¶ Returns layer uri or empty string if layer cannot be created