Class: QgsBrowserGuiModel

class qgis.gui.QgsBrowserGuiModel

Bases: QgsBrowserModel

A model for showing available data sources and other items in a structured tree.

QgsBrowserGuiModel is the foundation for the QGIS browser panel, and includes items for the different data providers and folders accessible to users.

Added in version 3.10.

QgsBrowserGuiModel(parent: Optional[QObject] = None) Constructor for QgsBrowserGuiModel, with the specified parent object.

addRootItems(self)

Populates the model

beginInsertColumns(self, parent: QModelIndex, first: int, last: int)
beginInsertRows(self, parent: QModelIndex, first: int, last: int)
beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) bool
beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) bool
beginRemoveColumns(self, parent: QModelIndex, first: int, last: int)
beginRemoveRows(self, parent: QModelIndex, first: int, last: int)
beginResetModel(self)
changePersistentIndex(self, from_: QModelIndex, to: QModelIndex)
changePersistentIndexList(self, from_: Iterable[QModelIndex], to: Iterable[QModelIndex])
childEvent(self, a0: QChildEvent | None)
connectNotify(self, signal: QMetaMethod)
createIndex(self, row: int, column: int, object: Any = None) QModelIndex
customEvent(self, a0: QEvent | None)
decodeData(self, row: int, column: int, parent: QModelIndex, stream: QDataStream) bool
disconnectNotify(self, signal: QMetaMethod)
dropMimeData(self, data: QMimeData | None, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool
Parameters:
  • data (Optional[QMimeData])

  • action (Qt.DropAction)

  • row (int)

  • column (int)

  • parent (QModelIndex)

Return type:

bool

encodeData(self, indexes: Iterable[QModelIndex], stream: QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
flags(self, index: QModelIndex) Qt.ItemFlags
Parameters:

index (QModelIndex)

Return type:

Qt.ItemFlags

isSignalConnected(self, signal: QMetaMethod) bool
persistentIndexList(self) List[QModelIndex]
receivers(self, signal: PYQT_SIGNAL) int
removeRootItems(self)
resetInternalData(self)
sender(self) QObject | None
senderSignalIndex(self) int
setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) bool
Parameters:
  • index (QModelIndex)

  • value (Any)

  • role (int = Qt.EditRole)

Return type:

bool

setMessageBar(self, bar: QgsMessageBar | None)

Sets message bar that will be passed in QgsDataItemGuiContext to data items

Parameters:

bar (Optional[QgsMessageBar])

timerEvent(self, a0: QTimerEvent | None)