nexxT.services.gui.BrowserWidget module

This module provides a widget for browsing the filesystem.

class nexxT.services.gui.BrowserWidget.BrowserWidget(parent=None)[source]

Bases: QWidget

This class puts together a TabCompletionLineEdit and a list view of teh FolderListModel in one single widget.

__init__(parent=None)[source]
activateNext()[source]

Load next recording in the current directory.

activatePrev()[source]

Load previous recording in the current directory.

activated
active()[source]

The currently activated file

Returns:

a string instance

current()[source]

A synonym for active()

Returns:

a string instance

folder()[source]

Returns the current folder

Returns:

a Path instance

scrollTo(item)[source]

Scrolls to the given item.

Parameters:

item – a string instance

Returns:

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: QAbstractTableModel

This class provides a model for browsing a folder.

__init__(parent)[source]
columnCount(index=<PySide6.QtCore.QModelIndex(-1, -1, 0x0, QObject(0x0))>)[source]

overwritten from base class

Parameters:

index

Returns:

data(index, role)[source]

overwritten from base class

Parameters:
  • index

  • role

Returns:

fileToIndex(filename)[source]

return the given file name to a model index.

Parameters:

filename – a string or Path instance

Returns:

a QModelIndex instance

filter()[source]

Return the current filter

Returns:

a list of strings

folder()[source]

Return the current folder.

Returns:

a Path 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: object

Class for caching file-system related accesses to prevent unnecessary slowliness for network drives.

MAX_NUM_CACHE_ENTRIES = 1048576
__init__()[source]
class nexxT.services.gui.BrowserWidget.TabCompletionLineEdit(completer, parent=None)[source]

Bases: QLineEdit

This class provides a line edit which changes the tab-key semantics to interact with a completer.

__init__(completer, parent=None)[source]
event(event)[source]

overwritten from base class

Parameters:

event

Returns:

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() )