nexxT.services.gui.BrowserWidget module
This module provides a widget for browsing the filesystem.
- class nexxT.services.gui.BrowserWidget.BrowserWidget(parent=None)[source]
Bases:
QWidgetThis class puts together a TabCompletionLineEdit and a list view of teh FolderListModel in one single widget.
- activated
- setActive(activeFile)[source]
set the activated file
- Parameters:
activeFile – a string or Path instance
- Returns:
- setFilter(flt)[source]
Set the name filter of the file browser
- Parameters:
flt – a string instance or a list of strings
- Returns:
- setFolder(folder)[source]
Sets the current folder
- Parameters:
folder – a string or a Path instance
- Returns:
- staticMetaObject = PySide6.QtCore.QMetaObject("BrowserWidget" inherits "QWidget": Methods: #33 type=Signal, signature=activated(QString), parameters=QString )
- class nexxT.services.gui.BrowserWidget.FolderListModel(parent)[source]
Bases:
QAbstractTableModelThis class provides a model for browsing a folder.
- columnCount(index=<PySide6.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]
overwritten from base class
- Parameters:
index
- Returns:
- fileToIndex(filename)[source]
return the given file name to a model index.
- Parameters:
filename – a string or Path instance
- Returns:
a QModelIndex instance
- folderChanged
- headerData(section, orientation, role)[source]
overwritten from base class
- Parameters:
section
orientation
role
- Returns:
- rowCount(index=<PySide6.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]
overwritten from base class
- Parameters:
index
- Returns:
- setFilter(flt)[source]
Set the filter of this browser
- Parameters:
flt – string or a list of strings containing glob-style patterns
- Returns:
- setFolder(folder)[source]
set the folder of this browser
- Parameters:
folder – a Path or string instance
- Returns:
- statCache = <nexxT.services.gui.BrowserWidget.StatCache object>
- staticMetaObject = PySide6.QtCore.QMetaObject("FolderListModel" inherits "QAbstractTableModel": Methods: #76 type=Signal, signature=folderChanged(QString), parameters=QString )
- class nexxT.services.gui.BrowserWidget.StatCache[source]
Bases:
objectClass for caching file-system related accesses to prevent unnecessary slowliness for network drives.
- MAX_NUM_CACHE_ENTRIES = 1048576
- class nexxT.services.gui.BrowserWidget.TabCompletionLineEdit(completer, parent=None)[source]
Bases:
QLineEditThis class provides a line edit which changes the tab-key semantics to interact with a completer.
- keyPressEvent(event)[source]
Overwritten from QWidget, intermit paste events to log in the text directly after pasting.
- nextCompletion(direction)[source]
interacts with the completer, selects next / previous item
- Parameters:
direction – the direction, either -1 or +1
- Returns:
- pasted
- staticMetaObject = PySide6.QtCore.QMetaObject("TabCompletionLineEdit" inherits "QLineEdit": Methods: #49 type=Signal, signature=pasted() )