Class: QgsZipItem

class qgis.core.QgsZipItem

Bases: QgsDataCollectionItem

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

QgsZipItem(parent: Optional[QgsDataItem], name: Optional[str], path: Optional[str]) Constructor

QgsZipItem(parent: Optional[QgsDataItem], name: Optional[str], filePath: Optional[str], path: Optional[str], providerKey: Optional[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

Attributes

sProviderNames

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

List[QgsDataItem]

customEvent(self, a0: QEvent | None)
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, signal: QMetaMethod)
getZipFileList(self) List[str]
Return type:

List[str]

hasDragEnabled(self) bool
Return type:

bool

homeDirIcon(fillColor: QColor | Qt.GlobalColor = QColor(), strokeColor: QColor | Qt.GlobalColor = 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.

Added in version 3.4.

iconZip() QIcon
Return type:

QIcon

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

Creates a new data item from the specified path.

Note

available in Python as itemFromFilePath

Parameters:
  • parent (Optional[QgsDataItem])

  • filePath (Optional[str])

  • name (Optional[str])

  • path (Optional[str])

Return type:

Optional[QgsDataItem]

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

Creates a new data item from the specified path.

Parameters:
  • parent (Optional[QgsDataItem])

  • path (Optional[str])

  • name (Optional[str])

Return type:

Optional[QgsDataItem]

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

List[QgsMimeDataUtils.Uri]

openDirIcon(fillColor: QColor | Qt.GlobalColor = QColor(), strokeColor: QColor | Qt.GlobalColor = 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.

Added in version 3.4.

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

Refresh the items from a specified list of child items.

refresh(self)

sProviderNames = []
sender(self) QObject | None
senderSignalIndex(self) int
timerEvent(self, a0: QTimerEvent | None)
updateIcon(self)

Will request a repaint of this icon.

vsiPrefix(uri: str | None) str

Deprecated since version Will: be removed in QGIS 4.0

Parameters:

uri (Optional[str])

Return type:

str