QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | List of all members
QgsBrowserDockWidget Class Reference

A dock widget containing a QgsBrowserWidget for navigating and managing data sources. More...

#include <qgsbrowserdockwidget.h>

Inheritance diagram for QgsBrowserDockWidget:
Inheritance graph
[legend]

Public Slots

Q_DECL_DEPRECATED void addFavorite ()
 Add current item to favorite.
 
Q_DECL_DEPRECATED void addFavoriteDirectory ()
 Add directory from file dialog to favorite.
 
Q_DECL_DEPRECATED bool addLayerAtIndex (const QModelIndex &index)
 Adds the layer corresponding to the specified model index.
 
Q_DECL_DEPRECATED void addSelectedLayers ()
 Add selected layers to the project.
 
Q_DECL_DEPRECATED void enablePropertiesWidget (bool enable)
 Enable/disable properties widget.
 
Q_DECL_DEPRECATED void hideItem ()
 Hide current item.
 
void refresh ()
 Refresh the browser model and view.
 
Q_DECL_DEPRECATED void removeFavorite ()
 Remove from favorite.
 
Q_DECL_DEPRECATED void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
 Selection has changed.
 
Q_DECL_DEPRECATED void setActiveIndex (const QModelIndex &index)
 Sets the selection to index and expand it.
 
Q_DECL_DEPRECATED void setCaseSensitive (bool caseSensitive)
 Sets filter case sensitivity.
 
Q_DECL_DEPRECATED void setFilter ()
 Apply filter to the model.
 
Q_DECL_DEPRECATED void setFilterSyntax (QAction *)
 Sets filter syntax.
 
Q_DECL_DEPRECATED void showContextMenu (QPoint)
 Show context menu.
 
Q_DECL_DEPRECATED void showFilterWidget (bool visible)
 Show/hide filter widget.
 
Q_DECL_DEPRECATED void showProperties ()
 Show the layer properties.
 
Q_DECL_DEPRECATED void splitterMoved ()
 Splitter has been moved.
 
Q_DECL_DEPRECATED void toggleFastScan ()
 Toggle fast scan.
 
Q_DECL_DEPRECATED void updateProjectHome ()
 Update project home directory.
 
- Public Slots inherited from QgsDockWidget
void setUserVisible (bool visible)
 Sets the dock widget as visible to a user, ie both shown and raised to the front.
 
void toggleUserVisible ()
 Toggles whether the dock is user visible.
 

Signals

void connectionsChanged ()
 Connections changed in the browser.
 
void handleDropUriList (const QgsMimeDataUtils::UriList &uris)
 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.
 
- Signals inherited from QgsDockWidget
void closed ()
 Emitted when dock widget is closed.
 
void closedStateChanged (bool wasClosed)
 Emitted when dock widget is closed (or opened).
 
void opened ()
 Emitted when dock widget is opened.
 
void openedStateChanged (bool wasOpened)
 Emitted when dock widget is opened (or closed).
 

Public Member Functions

 QgsBrowserDockWidget (const QString &name, QgsBrowserGuiModel *browserModel, QWidget *parent=nullptr)
 Constructor for QgsBrowserDockWidget.
 
 ~QgsBrowserDockWidget () override
 
Q_DECL_DEPRECATED void addFavoriteDirectory (const QString &favDir, const QString &name=QString())
 Add directory to favorites.
 
QgsBrowserWidgetbrowserWidget ()
 Returns a pointer to the QgsBrowserWidget used by the dock widget.
 
QgsMessageBarmessageBar ()
 Returns the message bar associated with the dock.
 
void setDisabledDataItemsKeys (const QStringList &filter)
 Sets the customization for data items based on item's data provider key.
 
void setMessageBar (QgsMessageBar *bar)
 Sets a message bar to use alongside the dock widget.
 
- Public Member Functions inherited from QgsDockWidget
 QgsDockWidget (const QString &title, QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
 Constructor for QgsDockWidget.
 
 QgsDockWidget (QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
 Constructor for QgsDockWidget.
 
bool isUserVisible () const
 Returns true if the dock is both opened and raised to the front (ie not hidden by any other tabs.
 
void setToggleVisibilityAction (QAction *action)
 Links an action to the dock, so that toggling the action will automatically set the dock's visibility to suit (and changing the dock visibility will update the action's state).
 
QAction * toggleVisibilityAction ()
 Returns the action linked to the dock.
 

Additional Inherited Members

- Protected Member Functions inherited from QgsDockWidget
void closeEvent (QCloseEvent *) override
 
void showEvent (QShowEvent *event) override
 

Detailed Description

A dock widget containing a QgsBrowserWidget for navigating and managing data sources.

Definition at line 30 of file qgsbrowserdockwidget.h.

Constructor & Destructor Documentation

◆ QgsBrowserDockWidget()

QgsBrowserDockWidget::QgsBrowserDockWidget ( const QString &  name,
QgsBrowserGuiModel browserModel,
QWidget *  parent = nullptr 
)
explicit

Constructor for QgsBrowserDockWidget.

Parameters
namename of the widget
browserModelinstance of the (shared) browser model
parentparent widget

Definition at line 28 of file qgsbrowserdockwidget.cpp.

◆ ~QgsBrowserDockWidget()

QgsBrowserDockWidget::~QgsBrowserDockWidget ( )
overridedefault

Member Function Documentation

◆ addFavorite

void QgsBrowserDockWidget::addFavorite ( )
slot

Add current item to favorite.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 - use the methods in QgsBrowserModel instead.

Definition at line 60 of file qgsbrowserdockwidget.cpp.

◆ addFavoriteDirectory [1/2]

void QgsBrowserDockWidget::addFavoriteDirectory ( )
slot

Add directory from file dialog to favorite.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 - use the methods in QgsBrowserModel instead.

Definition at line 76 of file qgsbrowserdockwidget.cpp.

◆ addFavoriteDirectory() [2/2]

void QgsBrowserDockWidget::addFavoriteDirectory ( const QString &  favDir,
const QString &  name = QString() 
)

Add directory to favorites.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 - use the methods in QgsBrowserModel instead.

Definition at line 87 of file qgsbrowserdockwidget.cpp.

◆ addLayerAtIndex

bool QgsBrowserDockWidget::addLayerAtIndex ( const QModelIndex &  index)
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.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 - retrieve the QgsLayerItem itself and manually add to project.

Definition at line 117 of file qgsbrowserdockwidget.cpp.

◆ addSelectedLayers

void QgsBrowserDockWidget::addSelectedLayers ( )
slot

Add selected layers to the project.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 147 of file qgsbrowserdockwidget.cpp.

◆ browserWidget()

QgsBrowserWidget * QgsBrowserDockWidget::browserWidget ( )

Returns a pointer to the QgsBrowserWidget used by the dock widget.

Since
QGIS 3.22

Definition at line 50 of file qgsbrowserdockwidget.cpp.

◆ connectionsChanged

void QgsBrowserDockWidget::connectionsChanged ( )
signal

Connections changed in the browser.

◆ enablePropertiesWidget

void QgsBrowserDockWidget::enablePropertiesWidget ( bool  enable)
slot

Enable/disable properties widget.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 217 of file qgsbrowserdockwidget.cpp.

◆ handleDropUriList

void QgsBrowserDockWidget::handleDropUriList ( const QgsMimeDataUtils::UriList uris)
signal

Emitted when drop uri list needs to be handled.

◆ hideItem

void QgsBrowserDockWidget::hideItem ( )
slot

Hide current item.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 152 of file qgsbrowserdockwidget.cpp.

◆ messageBar()

QgsMessageBar * QgsBrowserDockWidget::messageBar ( )

Returns the message bar associated with the dock.

See also
setMessageBar()
Since
QGIS 3.6

Definition at line 97 of file qgsbrowserdockwidget.cpp.

◆ openFile

void QgsBrowserDockWidget::openFile ( const QString &  fileName,
const QString &  fileTypeHint = QString() 
)
signal

Emitted when a file needs to be opened.

◆ refresh

void QgsBrowserDockWidget::refresh ( )
slot

Refresh the browser model and view.

Definition at line 112 of file qgsbrowserdockwidget.cpp.

◆ removeFavorite

void QgsBrowserDockWidget::removeFavorite ( )
slot

Remove from favorite.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 - use the methods in QgsBrowserModel instead.

Definition at line 107 of file qgsbrowserdockwidget.cpp.

◆ selectionChanged

void QgsBrowserDockWidget::selectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
)
slot

Selection has changed.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 212 of file qgsbrowserdockwidget.cpp.

◆ setActiveIndex

void QgsBrowserDockWidget::setActiveIndex ( const QModelIndex &  index)
slot

Sets the selection to index and expand it.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 222 of file qgsbrowserdockwidget.cpp.

◆ setCaseSensitive

void QgsBrowserDockWidget::setCaseSensitive ( bool  caseSensitive)
slot

Sets filter case sensitivity.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 207 of file qgsbrowserdockwidget.cpp.

◆ setDisabledDataItemsKeys()

void QgsBrowserDockWidget::setDisabledDataItemsKeys ( const QStringList &  filter)

Sets the customization for data items based on item's data provider key.

By default browser model shows all items from all available data items provider and few special items (e.g. Favorites). To customize the behavior, set the filter to not load certain data items. The items that are not based on data item providers (e.g. Favorites, Home) have prefix "special:"

Used in the proxy browser model to hide items

Since
QGIS 3.12

Definition at line 102 of file qgsbrowserdockwidget.cpp.

◆ setFilter

void QgsBrowserDockWidget::setFilter ( )
slot

Apply filter to the model.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 192 of file qgsbrowserdockwidget.cpp.

◆ setFilterSyntax

void QgsBrowserDockWidget::setFilterSyntax ( QAction *  action)
slot

Sets filter syntax.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 202 of file qgsbrowserdockwidget.cpp.

◆ setMessageBar()

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.

See also
messageBar()
Since
QGIS 3.6

Definition at line 92 of file qgsbrowserdockwidget.cpp.

◆ showContextMenu

void QgsBrowserDockWidget::showContextMenu ( QPoint  pt)
slot

Show context menu.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 55 of file qgsbrowserdockwidget.cpp.

◆ showFilterWidget

void QgsBrowserDockWidget::showFilterWidget ( bool  visible)
slot

Show/hide filter widget.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 187 of file qgsbrowserdockwidget.cpp.

◆ showProperties

void QgsBrowserDockWidget::showProperties ( )
slot

Show the layer properties.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 157 of file qgsbrowserdockwidget.cpp.

◆ splitterMoved

void QgsBrowserDockWidget::splitterMoved ( )
slot

Splitter has been moved.

Deprecated:
QGIS 3.40. No longer used.

Definition at line 227 of file qgsbrowserdockwidget.cpp.

◆ toggleFastScan

void QgsBrowserDockWidget::toggleFastScan ( )
slot

Toggle fast scan.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0.

Definition at line 162 of file qgsbrowserdockwidget.cpp.

◆ updateProjectHome

void QgsBrowserDockWidget::updateProjectHome ( )
slot

Update project home directory.

Deprecated:
QGIS 3.40. Will be removed in QGIS 4.0 – this method is not intended for public use.

Definition at line 197 of file qgsbrowserdockwidget.cpp.


The documentation for this class was generated from the following files: