A subclass of QProxyFilterModel that determines which log entries contained in the log model are shown in the view.
More...
A subclass of QProxyFilterModel that determines which log entries contained in the log model are shown in the view.
◆ __init__()
def logwidget.LogFilter.__init__ |
( |
|
self, |
|
|
|
parent = None |
|
) |
| |
Create the LogFilter.
- Parameters
-
QObject | parent: parent object of filter |
◆ filterAcceptsRow()
def logwidget.LogFilter.filterAcceptsRow |
( |
|
self, |
|
|
|
sourceRow, |
|
|
|
sourceParent |
|
) |
| |
Determine wheter row (log entry) should be shown.
- Parameters
-
QModelIndex | sourceRow: the row in the source model that we need to judege |
QModelIndex | sourceParent: parent model index |
- Returns
- bool: True if row (log entry) should be shown, False otherwise
◆ lessThan()
def logwidget.LogFilter.lessThan |
( |
|
self, |
|
|
|
left, |
|
|
|
right |
|
) |
| |
Comparison function for sorting rows (log entries)
- Parameters
-
QModelIndex | left: index pointing to the first cell for comparison |
QModelIndex | right: index pointing to the second cell for comparison |
- Returns
- bool: result of comparison left data < right data
◆ setLevels()
def logwidget.LogFilter.setLevels |
( |
|
self, |
|
|
|
levels |
|
) |
| |
Set which types of messages are shown through the filter.
- Parameters
-
list(str) | levels: list of all levels that should be shown |
The documentation for this class was generated from the following file: