Class: QgsBrowserTreeView¶
- class qgis.gui.QgsBrowserTreeView¶
Bases:
PyQt5.QtWidgets.QTreeView
The
QgsBrowserTreeView
class extends QTreeView with save/restore tree state functionality.See also
New in version 2.8.
QgsBrowserTreeView(parent: QWidget = None) Constructor for QgsBrowserTreeView
Methods
Returns the browser model
columnCountChanged
columnResized
currentChanged
Expands out a file
path
in the view.- param index:
- param e:
- param event:
rowsAboutToBeRemoved
- param parentIndex:
rowsRemoved
scrollContentsBy
scrollDirtyRegion
selectionChanged
Sets the browser model
- param model:
Sets the
item
currently selected in the view.- param section:
- param e:
- actionEvent(self, QActionEvent)¶
- browserModel(self) QgsBrowserGuiModel ¶
Returns the browser model
- Return type:
- changeEvent(self, QEvent)¶
- childEvent(self, QChildEvent)¶
- closeEditor(self, QWidget, QAbstractItemDelegate.EndEditHint)¶
- closeEvent(self, QCloseEvent)¶
- QgsBrowserTreeView.columnCountChanged(self, int, int)
- columnMoved(self)¶
- QgsBrowserTreeView.columnResized(self, int, int, int)
- commitData(self, QWidget)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- QgsBrowserTreeView.currentChanged(self, QModelIndex, QModelIndex)
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- dirtyRegionOffset(self) QPoint ¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- drawBranches(self, QPainter, QRect, QModelIndex)¶
- drawFrame(self, QPainter)¶
- drawRow(self, QPainter, QStyleOptionViewItem, QModelIndex)¶
- drawTree(self, QPainter, QRegion)¶
- dropEvent(self, QDropEvent)¶
- dropIndicatorPosition(self) QAbstractItemView.DropIndicatorPosition ¶
- edit(self, QModelIndex)¶
- edit(self, QModelIndex, QAbstractItemView.EditTrigger, QEvent) bool
- editorDestroyed(self, QObject)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) bool ¶
- eventFilter(self, QObject, QEvent) bool ¶
- executeDelayedItemsLayout(self)¶
- expandPath(self, path: str)¶
Expands out a file
path
in the view.The
path
must correspond to a valid directory existing on the file system.New in version 3.28.
- Parameters:
path (str) –
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) bool ¶
- focusNextPrevChild(self, bool) bool ¶
- focusOutEvent(self, QFocusEvent)¶
- focusPreviousChild(self) bool ¶
- hasExpandedDescendant(self, index: QModelIndex) bool ¶
- Parameters:
index (QModelIndex) –
- Return type:
bool
- hideEvent(self, e: QHideEvent)¶
- Parameters:
e (QHideEvent) –
- horizontalOffset(self) int ¶
- horizontalScrollbarAction(self, int)¶
- horizontalScrollbarValueChanged(self, int)¶
- indexRowSizeHint(self, QModelIndex) int ¶
- initPainter(self, QPainter)¶
- initStyleOption(self, QStyleOptionFrame)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isIndexHidden(self, QModelIndex) bool ¶
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, event: QKeyEvent)¶
- Parameters:
event (QKeyEvent) –
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, QMouseEvent)¶
- mouseReleaseEvent(self, QMouseEvent)¶
- moveCursor(self, QAbstractItemView.CursorAction, Union[Qt.KeyboardModifiers, Qt.KeyboardModifier]) QModelIndex ¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) int ¶
- reexpand(self)¶
- resizeEvent(self, QResizeEvent)¶
- rowHeight(self, QModelIndex) int ¶
- QgsBrowserTreeView.rowsAboutToBeRemoved(self, QModelIndex, int, int)
- rowsInserted(self, parentIndex: QModelIndex, start: int, end: int)¶
- Parameters:
parentIndex (QModelIndex) –
start (int) –
end (int) –
- QgsBrowserTreeView.rowsRemoved(self, QModelIndex, int, int)
- scheduleDelayedItemsLayout(self)¶
- QgsBrowserTreeView.scrollContentsBy(self, int, int)
- QgsBrowserTreeView.scrollDirtyRegion(self, int, int)
- selectedIndexes(self) List[QModelIndex] ¶
- QgsBrowserTreeView.selectionChanged(self, QItemSelection, QItemSelection)
- selectionCommand(self, QModelIndex, event: QEvent = None) QItemSelectionModel.SelectionFlags ¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setBrowserModel(self, model: QgsBrowserGuiModel)¶
Sets the browser model
- Parameters:
model (QgsBrowserGuiModel) –
- setDirtyRegion(self, QRegion)¶
- setModel(self, model: QAbstractItemModel)¶
- Parameters:
model (QAbstractItemModel) –
- setSelectedItem(self, item: QgsDataItem) bool ¶
Sets the
item
currently selected in the view.Returns
True
if the item was found and could be selected.New in version 3.28.
- Parameters:
item (QgsDataItem) –
- Return type:
bool
- setSelection(self, QRect, Union[QItemSelectionModel.SelectionFlags, QItemSelectionModel.SelectionFlag])¶
- setSettingsSection(self, section: str)¶
- Parameters:
section (str) –
- setState(self, QAbstractItemView.State)¶
- QgsBrowserTreeView.setViewportMargins(self, int, int, int, int)
- setViewportMargins(self, QMargins) None ¶
- showEvent(self, e: QShowEvent)¶
- Parameters:
e (QShowEvent) –
- sizeHintForColumn(self, int) int ¶
- startDrag(self, Union[Qt.DropActions, Qt.DropAction])¶
- state(self) QAbstractItemView.State ¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateEditorData(self)¶
- updateEditorGeometries(self)¶
- updateGeometries(self)¶
- updateMicroFocus(self)¶
- verticalOffset(self) int ¶
- verticalScrollbarAction(self, int)¶
- verticalScrollbarValueChanged(self, int)¶
- viewOptions(self) QStyleOptionViewItem ¶
- viewportEvent(self, QEvent) bool ¶
- viewportMargins(self) QMargins ¶
- viewportSizeHint(self) QSize ¶
- visualRegionForSelection(self, QItemSelection) QRegion ¶
- wheelEvent(self, QWheelEvent)¶