Qudi
Public Member Functions | Public Attributes | List of all members
logwidget.LogFilter Class Reference

A subclass of QProxyFilterModel that determines which log entries contained in the log model are shown in the view. More...

Inheritance diagram for logwidget.LogFilter:
Inheritance graph
[legend]
Collaboration diagram for logwidget.LogFilter:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, parent=None)
 Create the LogFilter. More...
 
def filterAcceptsRow (self, sourceRow, sourceParent)
 Determine wheter row (log entry) should be shown. More...
 
def lessThan (self, left, right)
 Comparison function for sorting rows (log entries) More...
 
def setLevels (self, levels)
 Set which types of messages are shown through the filter. More...
 

Public Attributes

 show_levels
 

Detailed Description

A subclass of QProxyFilterModel that determines which log entries contained in the log model are shown in the view.

Constructor & Destructor Documentation

◆ __init__()

def logwidget.LogFilter.__init__ (   self,
  parent = None 
)

Create the LogFilter.

Parameters
QObjectparent: parent object of filter

Member Function Documentation

◆ filterAcceptsRow()

def logwidget.LogFilter.filterAcceptsRow (   self,
  sourceRow,
  sourceParent 
)

Determine wheter row (log entry) should be shown.

Parameters
QModelIndexsourceRow: the row in the source model that we need to judege
QModelIndexsourceParent: 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
QModelIndexleft: index pointing to the first cell for comparison
QModelIndexright: 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: