QgsBrowserDockWidget class
The QgsBrowserDockWidget class.
Contents
Base classes
- class QgsDockWidget
- QgsDockWidget subclass with more fine-grained control over how the widget is closed or opened.
Constructors, destructors, conversion operators
- QgsBrowserDockWidget(const QString& name, QgsBrowserModel* browserModel, QWidget* parent = nullptr) explicit
- Constructor for QgsBrowserDockWidget.
Public functions
- auto addFavoriteDirectory(const QString& favDir, const QString& name = QString()) -> Q_DECL_DEPRECATED void deprecated
- Add directory to favorites.
- auto messageBar() -> QgsMessageBar*
- Returns the message bar associated with the dock.
- void setMessageBar(QgsMessageBar* bar)
- Sets a message bar to use alongside the dock widget.
Signals
- void connectionsChanged()
- Connections changed in the browser.
-
void handleDropUriList(const QgsMimeDataUtils::
UriList&) - Emitted when drop uri list needs to be handled.
- void openFile(const QString& fileName, const QString& fileTypeHint = QString())
- Emitted when a file needs to be opened.
Public slots
- auto addFavorite() -> Q_DECL_DEPRECATED void deprecated
- Add current item to favorite.
- auto addFavoriteDirectory() -> Q_DECL_DEPRECATED void deprecated
- Add directory from file dialog to favorite.
- auto addLayerAtIndex(const QModelIndex& index) -> Q_DECL_DEPRECATED bool deprecated
- Adds the layer corresponding to the specified model index.
- void addSelectedLayers()
- Add selected layers to the project.
- void enablePropertiesWidget(bool enable)
- Enable/disable properties widget.
- void hideItem()
- Hide current item.
- void refresh()
- Refresh browser view model (and view)
- auto removeFavorite() -> Q_DECL_DEPRECATED void deprecated
- Remove from favorite.
- void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected)
- Selection has changed.
- void setCaseSensitive(bool caseSensitive)
- Sets filter case sensitivity.
- void setFilter()
- Apply filter to the model.
- void setFilterSyntax(QAction*)
- Sets filter syntax.
- void showContextMenu(QPoint)
- Show context menu.
- void showFilterWidget(bool visible)
- Show/hide filter widget.
- void showProperties()
- Show the layer properties.
- void splitterMoved()
- Splitter has been moved.
- auto toggleFastScan() -> Q_DECL_DEPRECATED void deprecated
- Toggle fast scan.
- void updateProjectHome()
- Update project home directory.
Protected functions
- void showEvent(QShowEvent* event) override
- Show event override.
Function documentation
QgsBrowserDockWidget:: QgsBrowserDockWidget(const QString& name,
QgsBrowserModel* browserModel,
QWidget* parent = nullptr) explicit
Constructor for QgsBrowserDockWidget.
| Parameters | |
|---|---|
| name | name of the widget |
| browserModel | instance of the (shared) browser model |
| parent | parent widget |
Q_DECL_DEPRECATED void QgsBrowserDockWidget:: addFavoriteDirectory(const QString& favDir,
const QString& name = QString())
Add directory to favorites.
QgsMessageBar* QgsBrowserDockWidget:: messageBar()
Returns the message bar associated with the dock.
void QgsBrowserDockWidget:: setMessageBar(QgsMessageBar* bar)
Sets a message bar to use alongside the dock widget.
Setting this allows items to utilize the message bar to provide non-blocking feedback to users, e.g. success or failure of actions.
Q_DECL_DEPRECATED void QgsBrowserDockWidget:: addFavorite() public slot
Add current item to favorite.
Q_DECL_DEPRECATED void QgsBrowserDockWidget:: addFavoriteDirectory() public slot
Add directory from file dialog to favorite.
Q_DECL_DEPRECATED bool QgsBrowserDockWidget:: addLayerAtIndex(const QModelIndex& index) public slot
Adds the layer corresponding to the specified model index.
Returns true if the index was successfully intrepreted as a map layer and loaded, or false if the index is not a map layer or could not be loaded.
Q_DECL_DEPRECATED void QgsBrowserDockWidget:: removeFavorite() public slot
Remove from favorite.
Q_DECL_DEPRECATED void QgsBrowserDockWidget:: toggleFastScan() public slot
Toggle fast scan.