QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
A widget showing a browser tree view along with toolbar and toggleable properties pane. More...
#include <qgsbrowserwidget.h>
Public Slots | |
void | refresh () |
Refreshes the browser model and view. More... | |
void | setActiveIndex (const QModelIndex &index) |
Sets the selection to index and expands it. More... | |
void | updateProjectHome () |
Update project home directory. More... | |
Public Slots inherited from QgsPanelWidget | |
void | acceptPanel () |
Accept the panel. More... | |
void | openPanel (QgsPanelWidget *panel) |
Open a panel or dialog depending on dock mode setting If dock mode is true this method will emit the showPanel signal for connected slots to handle the open event. More... | |
Signals | |
void | connectionsChanged () |
Connections changed in the browser. More... | |
void | handleDropUriList (const QgsMimeDataUtils::UriList &) |
Emitted when drop uri list needs to be handled. More... | |
void | openFile (const QString &fileName, const QString &fileTypeHint=QString()) |
Emitted when a file needs to be opened. More... | |
Signals inherited from QgsPanelWidget | |
void | panelAccepted (QgsPanelWidget *panel) |
Emitted when the panel is accepted by the user. More... | |
void | showPanel (QgsPanelWidget *panel) |
Emit when you require a panel to be show in the interface. More... | |
void | widgetChanged () |
Emitted when the widget state changes. More... | |
Public Member Functions | |
QgsBrowserWidget (QgsBrowserGuiModel *browserModel, QWidget *parent=nullptr) | |
Constructor for QgsBrowserWidget. More... | |
~QgsBrowserWidget () override | |
QgsMessageBar * | messageBar () |
Returns the message bar associated with the widget. More... | |
void | setDisabledDataItemsKeys (const QStringList &filter) |
Sets the customization for data items based on item's data provider key. More... | |
void | setMessageBar (QgsMessageBar *bar) |
Sets a message bar to use alongside the widget. More... | |
Public Member Functions inherited from QgsPanelWidget | |
QgsPanelWidget (QWidget *parent=nullptr) | |
Base class for any widget that can be shown as a inline panel. More... | |
virtual bool | applySizeConstraintsToStack () const |
Returns true if the size constraints and hints for the panel widget should be applied to the parent QgsPanelWidgetStack which this panel is shown in. More... | |
bool | autoDelete () |
The the auto delete property on the widget. More... | |
void | connectChildPanel (QgsPanelWidget *panel) |
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. More... | |
void | connectChildPanels (const QList< QgsPanelWidget * > &panels) |
Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. More... | |
bool | dockMode () |
Returns the dock mode state. More... | |
virtual QMenu * | menuButtonMenu () |
Returns the menu to use for the menu button for this panel, or nullptr if no menu button is required. More... | |
virtual QString | menuButtonTooltip () const |
Returns the (translated) tooltip text to use for the menu button for this panel. More... | |
QString | panelTitle () |
The title of the panel. More... | |
void | setAutoDelete (bool autoDelete) |
The the auto delete property on the widget. More... | |
virtual void | setDockMode (bool dockMode) |
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs. More... | |
void | setPanelTitle (const QString &panelTitle) |
Set the title of the panel when shown in the interface. More... | |
Protected Member Functions | |
void | showEvent (QShowEvent *event) override |
Protected Member Functions inherited from QgsPanelWidget | |
void | keyPressEvent (QKeyEvent *event) override |
Overridden key press event to handle the esc event on the widget. More... | |
Friends | |
class | QgsBrowserDockWidget |
Additional Inherited Members | |
Static Public Member Functions inherited from QgsPanelWidget | |
static QgsPanelWidget * | findParentPanel (QWidget *widget) |
Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget. More... | |
A widget showing a browser tree view along with toolbar and toggleable properties pane.
Definition at line 39 of file qgsbrowserwidget.h.
|
explicit |
Constructor for QgsBrowserWidget.
browserModel | instance of the (shared) browser model |
parent | parent widget |
Definition at line 53 of file qgsbrowserwidget.cpp.
|
overridedefault |
|
signal |
Connections changed in the browser.
|
signal |
Emitted when drop uri list needs to be handled.
QgsMessageBar * QgsBrowserWidget::messageBar | ( | ) |
Returns the message bar associated with the widget.
Definition at line 272 of file qgsbrowserwidget.cpp.
|
signal |
Emitted when a file needs to be opened.
|
slot |
Refreshes the browser model and view.
Definition at line 287 of file qgsbrowserwidget.cpp.
|
slot |
Sets the selection to index and expands it.
Definition at line 533 of file qgsbrowserwidget.cpp.
void QgsBrowserWidget::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 277 of file qgsbrowserwidget.cpp.
void QgsBrowserWidget::setMessageBar | ( | QgsMessageBar * | bar | ) |
Sets a message bar to use alongside the 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 266 of file qgsbrowserwidget.cpp.
|
overrideprotected |
Definition at line 116 of file qgsbrowserwidget.cpp.
|
slot |
Update project home directory.
Definition at line 431 of file qgsbrowserwidget.cpp.
|
friend |
Definition at line 173 of file qgsbrowserwidget.h.