Class: QgsDirectoryItem

class qgis.core.QgsDirectoryItem(parent: QgsDataItem, name: str, path: str)

Bases: QgsDataCollectionItem

QgsDirectoryItem(parent: QgsDataItem, name: str, dirPath: str, path: str) Constructor.

Parameters
  • parent (QgsDataItem) –

  • name (str) – directory name

  • dirPath – path to directory in file system

  • path (str) – item path in the tree, it may be dirPath or dirPath with some prefix, e.g. favorites: *

A directory: contains subdirectories and layers

Methods

childEvent

childrenCreated

connectNotify

createChildren

rtype

object

customEvent

deferredDelete

dirPath

Returns the full path to the directory the item represents.

directoryChanged

disconnectNotify

equal

param other

hasDragEnabled

rtype

bool

hiddenPath

Check if the given path is hidden from the browser model

homeDirIcon

icon

rtype

QIcon

init

isSignalConnected

mimeUri

rtype

QgsMimeDataUtils.Uri

openDirIcon

paramWidget

rtype

QWidget

populate

receivers

refresh

sender

senderSignalIndex

setState

param state

timerEvent

updateIcon

childEvent()
childrenCreated(self)
connectNotify()
createChildren(self) → object
Return type

object

customEvent()
deferredDelete()
dirPath(self) → str

Returns the full path to the directory the item represents.

Return type

str

directoryChanged(self)
disconnectNotify()
equal(self, other: QgsDataItem) → bool
Parameters

other (QgsDataItem) –

Return type

bool

hasDragEnabled(self) → bool
Return type

bool

hiddenPath(path: str) → bool

Check if the given path is hidden from the browser model

Parameters

path (str) –

Return type

bool

homeDirIcon()
icon(self) → QIcon
Return type

QIcon

init(self)
isSignalConnected()
mimeUri(self) → QgsMimeDataUtils.Uri
Return type

QgsMimeDataUtils.Uri

openDirIcon()
paramWidget(self) → QWidget
Return type

QWidget

populate()
receivers()
refresh()
sender()
senderSignalIndex()
setState(self, state: QgsDataItem.State)
Parameters

state (QgsDataItem.State) –

timerEvent()
updateIcon()