QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality. More...
#include <qgsbrowsertreeview.h>
Public Member Functions | |
QgsBrowserTreeView (QWidget *parent=nullptr) | |
Constructor for QgsBrowserTreeView. | |
QgsBrowserGuiModel * | browserModel () |
Returns the browser model. | |
void | expandPath (const QString &path, bool selectPath=false) |
Expands out a file path in the view. | |
bool | hasExpandedDescendant (const QModelIndex &index) const |
void | hideEvent (QHideEvent *e) override |
void | setBrowserModel (QgsBrowserGuiModel *model) |
Sets the browser model. | |
void | setModel (QAbstractItemModel *model) override |
bool | setSelectedItem (QgsDataItem *item) |
Sets the item currently selected in the view. | |
void | setSettingsSection (const QString §ion) |
void | showEvent (QShowEvent *e) override |
Protected Slots | |
void | rowsInserted (const QModelIndex &parentIndex, int start, int end) override |
Protected Member Functions | |
void | keyPressEvent (QKeyEvent *event) override |
The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality.
Definition at line 39 of file qgsbrowsertreeview.h.
QgsBrowserTreeView::QgsBrowserTreeView | ( | QWidget * | parent = nullptr | ) |
Constructor for QgsBrowserTreeView.
Definition at line 33 of file qgsbrowsertreeview.cpp.
|
inline |
Returns the browser model.
Definition at line 61 of file qgsbrowsertreeview.h.
void QgsBrowserTreeView::expandPath | ( | const QString & | path, |
bool | selectPath = false |
||
) |
Expands out a file path in the view.
The path must correspond to a valid directory existing on the file system.
Since QGIS 3.38 the selectPath argument can be used to automatically select the path too.
Definition at line 181 of file qgsbrowsertreeview.cpp.
bool QgsBrowserTreeView::hasExpandedDescendant | ( | const QModelIndex & | index | ) | const |
Definition at line 164 of file qgsbrowsertreeview.cpp.
|
override |
Definition at line 71 of file qgsbrowsertreeview.cpp.
|
overrideprotected |
Definition at line 41 of file qgsbrowsertreeview.cpp.
|
overrideprotectedslot |
Definition at line 328 of file qgsbrowsertreeview.cpp.
void QgsBrowserTreeView::setBrowserModel | ( | QgsBrowserGuiModel * | model | ) |
Sets the browser model.
Definition at line 57 of file qgsbrowsertreeview.cpp.
|
override |
Definition at line 49 of file qgsbrowsertreeview.cpp.
bool QgsBrowserTreeView::setSelectedItem | ( | QgsDataItem * | item | ) |
Sets the item currently selected in the view.
Returns true
if the item was found and could be selected.
Definition at line 309 of file qgsbrowsertreeview.cpp.
|
inline |
Definition at line 69 of file qgsbrowsertreeview.h.
|
override |
Definition at line 62 of file qgsbrowsertreeview.cpp.