Class: QgsBrowserGuiModel¶
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.
Class Hierarchy¶
Base classes¶
A model for showing available data sources and other items in a structured tree. |
|
Methods
Sets the associated map canvas that will be passed in |
|
Sets message bar that will be passed in |
- class qgis.gui.QgsBrowserGuiModel[source]¶
Bases:
QgsBrowserModel- __init__(parent: QObject | None = None)
Constructor for QgsBrowserGuiModel, with the specified
parentobject.Note
QgsBrowserModelmodels 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.- Parameters:
parent (Optional[QObject] = None)
- setMapCanvas(self, canvas: QgsMapCanvas | None)[source]¶
Sets the associated map
canvasthat will be passed inQgsDataItemGuiContextto data items.Added in version 3.44.
- Parameters:
canvas (Optional[QgsMapCanvas])
- setMessageBar(self, bar: QgsMessageBar | None)[source]¶
Sets message bar that will be passed in
QgsDataItemGuiContextto data items- Parameters:
bar (Optional[QgsMessageBar])