#NEWLINE# def __init__( self , connection ) : #NEWLINE# #INDENT# QTabWidget . __init__ ( self ) #NEWLINE# self . connection = connection #NEWLINE# self . setupUi ( self ) #NEWLINE# self . tableProcessList . verticalHeader ( ) . hide ( ) #NEWLINE# cur = self . connection . cursor ( ) #NEWLINE# cur . execute ( "SHOW TABLES IN information_schema LIKE 'PROCESSLIST'" ) #NEWLINE# self . processListInInfoSchema = cur . rowcount #NEWLINE# if self . processListInInfoSchema : #NEWLINE# #INDENT# self . processListColumns = [ ] #NEWLINE# cur . execute ( 'SHOW COLUMNS IN information_schema.PROCESSLIST' ) #NEWLINE# for column in cur . fetchall ( ) : #NEWLINE# #INDENT# self . processListColumns . append ( column [ 0 ] ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . processListColumns . remove ( 'TIME_MS' ) #NEWLINE# idx_time = self . processListColumns . index ( 'TIME' ) #NEWLINE# self . processListColumns [ idx_time ] = 'TIME + TIME_MS/1000 AS TIME' #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . chkShowIdle . hide ( ) #NEWLINE# #UNINDENT# self . refresh ( ) #NEWLINE# self . timer = QTimer ( self ) #NEWLINE# self . timer . timeout . connect ( self . on_timer_timeout ) #NEWLINE# self . on_spinSeconds_valueChanged ( self . spinSeconds . value ( ) ) #NEWLINE# self . on_chkAutoRefresh_stateChanged ( )