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.New in version 3.10.
QgsBrowserGuiModel(parent: QObject = None) Constructor for
QgsBrowserGuiModel
, with the specifiedparent
object.Note
QgsBrowserModel
models are not initially populated and use a deferred initialization approach. After constructing aQgsBrowserModel
, a call must be made toinitialize()
in order to populate the model.Methods
Populates the model
- param data:
- param index:
- param index:
Sets message bar that will be passed in
QgsDataItemGuiContext
to data items- addRootItems(self)¶
Populates the model
- beginInsertColumns(self, QModelIndex, int, int)¶
- beginInsertRows(self, QModelIndex, int, int)¶
- beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) bool ¶
- beginRemoveColumns(self, QModelIndex, int, int)¶
- beginRemoveRows(self, QModelIndex, int, int)¶
- beginResetModel(self)¶
- changePersistentIndex(self, QModelIndex, QModelIndex)¶
- changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])¶
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- createIndex(self, int, int, object: object = 0) QModelIndex ¶
- customEvent(self, QEvent)¶
- decodeData(self, int, int, QModelIndex, QDataStream) bool ¶
- disconnectNotify(self, QMetaMethod)¶
- dropMimeData(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool ¶
- Parameters:
data (QMimeData) –
action (Qt.DropAction) –
row (int) –
column (int) –
parent (QModelIndex) –
- Return type:
bool
- encodeData(self, Iterable[QModelIndex], 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, QMetaMethod) bool ¶
- persistentIndexList(self) List[QModelIndex] ¶
- receivers(self, PYQT_SIGNAL) int ¶
- removeRootItems(self)¶
- resetInternalData(self)¶
- sender(self) QObject ¶
- 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)¶
Sets message bar that will be passed in
QgsDataItemGuiContext
to data items- Parameters:
bar (QgsMessageBar) –
- timerEvent(self, QTimerEvent)¶