nexxT.services.gui.GuiLogger module
This module provides the gui logging service for nexxT.
- class nexxT.services.gui.GuiLogger.GuiLogger[source]
Bases:
ConsoleLoggerLogging service in GUI mode.
- __init__(self, /, parent: PySide6.QtCore.QObject | None = None, *, objectName: str | None = None) None[source]
Initialize self. See help(type(self)) for accurate signature.
- staticMetaObject = PySide6.QtCore.QMetaObject("GuiLogger" inherits "ConsoleLogger": Methods: #5 type=Slot, signature=detach() )
- class nexxT.services.gui.GuiLogger.LogHandler(logView)[source]
Bases:
HandlerPython logging handler which passes python log records to the gui.
- class nexxT.services.gui.GuiLogger.LogView[source]
Bases:
QTableViewClass implementing the GUI log display.
- class LogModel[source]
Bases:
QAbstractItemModelModel/view model for log entries. The entries are held in a python list.
- __init__(self, /, parent: PySide6.QtCore.QObject | None = None) None[source]
Initialize self. See help(type(self)) for accurate signature.
- columnCount(parent)[source]
Overwritten from QAbstractItemModel
- Parameters:
parent – a QModelIndex instance
- Returns:
the number of columns (constant)
- data(modelIndex, role)[source]
Overwritten from QAbstractItemModel
- Parameters:
modelIndex – a QModelIndex instance
role – the role
- Returns:
the requested data
- headerData(section, orientation, role)[source]
Overwritten from QAbstractItemModel
- Parameters:
section – the section index
orientation – the orientation
role – the item role
- Returns:
the section label
- index(row, column, parent)[source]
Overwritten from QAbstractItemModel
- Parameters:
row – integer
column – integer
parent – a QModelIndex instance
- Returns:
a QModelIndex for the specified item
- parent(index)[source]
Overwritten from QAbstractItemModel
- Parameters:
index
- Returns:
invalid model index (because we have a 2D table)
- rowCount(parent)[source]
Overwritten from QAbstractItemModel
- Parameters:
parent – a QModelIndex instance
- Returns:
number of log entries
- setSingleLineMode(enabled)[source]
called from the table view to indicate single line mode (in this mode only the last line of a log message is displayed.
- Parameters:
enabled – boolean
- Returns:
- staticMetaObject = PySide6.QtCore.QMetaObject("LogModel" inherits "QAbstractItemModel": )
- __init__(self, /, parent: PySide6.QtWidgets.QWidget | None = None, *, showGrid: bool | None = None, gridStyle: PySide6.QtCore.Qt.PenStyle | None = None, sortingEnabled: bool | None = None, wordWrap: bool | None = None, cornerButtonEnabled: bool | None = None) None[source]
Initialize self. See help(type(self)) for accurate signature.
- addLogRecord(items)[source]
Add a log record to the synchronized queue
- Parameters:
items – a tuple of (timestamp[str], level[int], message[str], modulename[str], filename[str], lineno[int])
- Returns:
None
- changeEvent(event)[source]
This for instance happens when the style sheet changed. It may affect the calculated row height. So invalidate:
- Parameters:
event – the event causing the change
- Returns:
- setUniformRowHeights(enabled)[source]
Takeover from QTreeView, see also here https://stackoverflow.com/questions/50943356/qtableview-performance
- Parameters:
enabled
- Returns:
- sizeHintForRow(row)[source]
return a size hint for the given row index
- Parameters:
row – the row index as integer
- Returns:
the height of the row as integer
- staticMetaObject = PySide6.QtCore.QMetaObject("LogView" inherits "QTableView": )