Subgroup: other

Class: QgsMimeDataUtils

class qgis.core.QgsMimeDataUtils

Bases: sip.wrapper

QgsMimeDataUtils(QgsMimeDataUtils)

Methods

decodeUriList
encodeUriList
isUriList
layerTreeNodesToUriList Returns encoded URI list from a list of layer tree nodes.

Signals

Attributes

class Uri

Bases: sip.wrapper

Constructs invalid URI

QgsMimeDataUtils.Uri(encData: str) Constructs URI from encoded data

QgsMimeDataUtils.Uri(QgsMimeDataUtils.Uri)

data(self) → str

Returns encoded representation of the object

isValid(self) → bool

Returns whether the object contains valid data

New in version 3.0.

layerType
meshLayer(self, error: str) → Tuple[QgsMeshLayer, bool]

Gets mesh layer from uri if possible, otherwise returns 0 and error is set

Parameters:
  • owner – set to true if caller becomes owner
  • error – set to error message if cannot get raster
name
providerKey
rasterLayer(self, error: str) → Tuple[QgsRasterLayer, bool]

Gets raster layer from uri if possible, otherwise returns 0 and error is set

Parameters:
  • owner – set to true if caller becomes owner
  • error – set to error message if cannot get raster
supportedCrs
supportedFormats
uri
vectorLayer(self, error: str) → Tuple[QgsVectorLayer, bool]

Gets vector layer from uri if possible, otherwise returns 0 and error is set

Parameters:
  • owner – set to true if caller becomes owner
  • error – set to error message if cannot get vector
decodeUriList(data: QMimeData) → object
encodeUriList(layers: object) → QMimeData
isUriList(data: QMimeData) → bool
layerTreeNodesToUriList(nodes: Iterable[QgsLayerTreeNode]) → QByteArray

Returns encoded URI list from a list of layer tree nodes.

New in version 3.0.