QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
A dock widget containing a QgsBrowserWidget for navigating and managing data sources. More...
#include <qgsbrowserdockwidget.h>
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. | |
QgsBrowserWidget * | browserWidget () |
Returns a pointer to the QgsBrowserWidget used by the dock widget. | |
QgsMessageBar * | messageBar () |
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 |
A dock widget containing a QgsBrowserWidget for navigating and managing data sources.
Definition at line 30 of file qgsbrowserdockwidget.h.
|
explicit |
Constructor for QgsBrowserDockWidget.
name | name of the widget |
browserModel | instance of the (shared) browser model |
parent | parent widget |
Definition at line 27 of file qgsbrowserdockwidget.cpp.
|
overridedefault |
|
slot |
Add current item to favorite.
Definition at line 59 of file qgsbrowserdockwidget.cpp.
|
slot |
Add directory from file dialog to favorite.
Definition at line 75 of file qgsbrowserdockwidget.cpp.
void QgsBrowserDockWidget::addFavoriteDirectory | ( | const QString & | favDir, |
const QString & | name = QString() |
||
) |
Add directory to favorites.
Definition at line 86 of file qgsbrowserdockwidget.cpp.
|
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.
Definition at line 116 of file qgsbrowserdockwidget.cpp.
|
slot |
Add selected layers to the project.
Definition at line 146 of file qgsbrowserdockwidget.cpp.
QgsBrowserWidget * QgsBrowserDockWidget::browserWidget | ( | ) |
Returns a pointer to the QgsBrowserWidget used by the dock widget.
Definition at line 49 of file qgsbrowserdockwidget.cpp.
|
signal |
Connections changed in the browser.
|
slot |
Enable/disable properties widget.
Definition at line 216 of file qgsbrowserdockwidget.cpp.
|
signal |
Emitted when drop uri list needs to be handled.
|
slot |
Hide current item.
Definition at line 151 of file qgsbrowserdockwidget.cpp.
QgsMessageBar * QgsBrowserDockWidget::messageBar | ( | ) |
Returns the message bar associated with the dock.
Definition at line 96 of file qgsbrowserdockwidget.cpp.
|
signal |
Emitted when a file needs to be opened.
|
slot |
Refresh the browser model and view.
Definition at line 111 of file qgsbrowserdockwidget.cpp.
|
slot |
Remove from favorite.
Definition at line 106 of file qgsbrowserdockwidget.cpp.
|
slot |
Selection has changed.
Definition at line 211 of file qgsbrowserdockwidget.cpp.
|
slot |
Sets the selection to index and expand it.
Definition at line 221 of file qgsbrowserdockwidget.cpp.
|
slot |
Sets filter case sensitivity.
Definition at line 206 of file qgsbrowserdockwidget.cpp.
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
Definition at line 101 of file qgsbrowserdockwidget.cpp.
|
slot |
Apply filter to the model.
Definition at line 191 of file qgsbrowserdockwidget.cpp.
|
slot |
Sets filter syntax.
Definition at line 201 of file qgsbrowserdockwidget.cpp.
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.
Definition at line 91 of file qgsbrowserdockwidget.cpp.
|
slot |
Show context menu.
Definition at line 54 of file qgsbrowserdockwidget.cpp.
|
slot |
Show/hide filter widget.
Definition at line 186 of file qgsbrowserdockwidget.cpp.
|
slot |
Show the layer properties.
Definition at line 156 of file qgsbrowserdockwidget.cpp.
|
slot |
Splitter has been moved.
Definition at line 226 of file qgsbrowserdockwidget.cpp.
|
slot |
Toggle fast scan.
Definition at line 161 of file qgsbrowserdockwidget.cpp.
|
slot |
Update project home directory.
Definition at line 196 of file qgsbrowserdockwidget.cpp.