Class: QgsLayerItem¶
-
class
qgis.core.
QgsLayerItem
¶ Bases:
QgsDataItem
Item that represents a layer that can be opened with one of the providers
Methods
Returns comments of the layer
- param other
- rtype
bool
- rtype
QIcon
- rtype
QIcon
Returns icon for mesh layer type
Returns the icon name of the given
layerType
- rtype
QIcon
- rtype
QIcon
- rtype
QIcon
- rtype
QIcon
- rtype
str
Returns the string representation of the given
layerType
Returns QgsMapLayer.LayerType
- rtype
QgsMimeDataUtils.Uri
Returns provider key
Returns the supported CRS
Returns the supported formats
Returns layer uri or empty string if layer cannot be created
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.
- Return type
str
-
connectNotify
()¶
-
customEvent
()¶
-
deferredDelete
()¶
-
disconnectNotify
()¶
-
equal
(self, other: QgsDataItem) → bool¶ - Parameters
other (QgsDataItem) –
- Return type
bool
-
hasDragEnabled
(self) → bool¶ - Return type
bool
-
iconDefault
() → QIcon¶ - Return type
QIcon
-
iconLine
() → QIcon¶ - Return type
QIcon
-
iconMesh
() → QIcon¶ Returns icon for mesh layer type
- Return type
QIcon
-
iconName
(layerType: QgsLayerItem.LayerType) → str¶ Returns the icon name of the given
layerType
New in version 3.
- Parameters
layerType (QgsLayerItem.LayerType) –
- Return type
str
-
iconPoint
() → QIcon¶ - Return type
QIcon
-
iconPolygon
() → QIcon¶ - Return type
QIcon
-
iconRaster
() → QIcon¶ - Return type
QIcon
-
iconTable
() → QIcon¶ - Return type
QIcon
-
isSignalConnected
()¶
-
layerName
(self) → str¶ - Return type
str
- Returns
the layer name
-
layerTypeAsString
(layerType: QgsLayerItem.LayerType) → str¶ Returns the string representation of the given
layerType
New in version 3.
- Parameters
layerType (QgsLayerItem.LayerType) –
- Return type
str
-
mapLayerType
(self) → QgsMapLayer.LayerType¶ Returns QgsMapLayer.LayerType
- Return type
-
mimeUri
(self) → QgsMimeDataUtils.Uri¶ - Return type
-
populate
()¶
-
providerKey
(self) → str¶ Returns provider key
- Return type
str
-
receivers
()¶
-
refresh
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
supportedCrs
(self) → List[str]¶ Returns the supported CRS
New in version 2.8.
- Return type
List[str]
-
supportedFormats
(self) → List[str]¶ Returns the supported formats
New in version 2.8.
- Return type
List[str]
-
timerEvent
()¶
-
updateIcon
()¶
-
uri
(self) → str¶ Returns layer uri or empty string if layer cannot be created
- Return type
str