Class: QgsZipItem

class qgis.core.QgsZipItem

Bases: QgsDataCollectionItem

A zip file: contains layers, using GDAL/OGR VSIFILE mechanism

QgsZipItem(parent: QgsDataItem, name: str, path: str) Constructor

QgsZipItem(parent: QgsDataItem, name: str, filePath: str, path: str, providerKey: str = ‘’) Constructor

Methods

childEvent

connectNotify

createChildren

rtype:

List[QgsDataItem]

customEvent

deferredDelete

The item is scheduled to be deleted.

disconnectNotify

getZipFileList

rtype:

List[str]

hasDragEnabled

rtype:

bool

homeDirIcon

Shared home directory icon.

iconZip

rtype:

QIcon

isSignalConnected

itemFromFilePath

Creates a new data item from the specified path.

itemFromPath

Creates a new data item from the specified path.

mimeUris

rtype:

List[QgsMimeDataUtils.Uri]

openDirIcon

Shared open directory icon.

populate

receivers

refresh

Refresh the items from a specified list of child items.

sender

senderSignalIndex

timerEvent

updateIcon

Will request a repaint of this icon.

vsiPrefix

param uri:

Attributes

sProviderNames

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
createChildren(self) List[QgsDataItem]
Return type:

List[QgsDataItem]

customEvent(self, QEvent)
deferredDelete(self) bool

The item is scheduled to be deleted. E.g. if deleteLater() is called when item is in Populating state (createChildren() running in another thread), the deferredDelete() returns True and item will be deleted once Populating finished. Items with slow reateChildren() (for example network or database based) may check during createChildren() if deferredDelete() returns True and return from createChildren() immediately because result will be useless.

disconnectNotify(self, QMetaMethod)
getZipFileList(self) List[str]
Return type:

List[str]

hasDragEnabled(self) bool
Return type:

bool

homeDirIcon(fillColor: QColor | Qt.GlobalColor | QGradient = QColor(), strokeColor: QColor | Qt.GlobalColor | QGradient = QColor()) QIcon

Shared home directory icon.

Since QGIS 3.20 the optional fillColor and strokeColor arguments can be used to specify a fill and stroke color for the icon.

New in version 3.4.

iconZip() QIcon
Return type:

QIcon

isSignalConnected(self, QMetaMethod) bool
itemFromFilePath(parent: QgsDataItem, filePath: str, name: str, path: str) QgsDataItem

Creates a new data item from the specified path.

Note

available in Python as itemFromFilePath

Parameters:
  • parent (QgsDataItem) –

  • filePath (str) –

  • name (str) –

  • path (str) –

Return type:

QgsDataItem

itemFromPath(parent: QgsDataItem, path: str, name: str) QgsDataItem

Creates a new data item from the specified path.

Parameters:
  • parent (QgsDataItem) –

  • path (str) –

  • name (str) –

Return type:

QgsDataItem

mimeUris(self) List[QgsMimeDataUtils.Uri]
Return type:

List[QgsMimeDataUtils.Uri]

openDirIcon(fillColor: QColor | Qt.GlobalColor | QGradient = QColor(), strokeColor: QColor | Qt.GlobalColor | QGradient = QColor()) QIcon

Shared open directory icon.

Since QGIS 3.20 the optional fillColor and strokeColor arguments can be used to specify a fill and stroke color for the icon.

New in version 3.4.

populate(self, children: Iterable[QgsDataItem])
populate(self, foreground: bool = False) None
receivers(self, PYQT_SIGNAL) int
refresh(self, children: Iterable[QgsDataItem])

Refresh the items from a specified list of child items.

refresh(self)

sProviderNames = []
sender(self) QObject
senderSignalIndex(self) int
timerEvent(self, QTimerEvent)
updateIcon(self)

Will request a repaint of this icon.

New in version 3.0.

vsiPrefix(uri: str) str
Parameters:

uri (str) –

Return type:

str