#NEWLINE# def __init__( self , wf_exec , parent = None ) : #NEWLINE# #INDENT# ( v_name , v_id , log_id , v_version , version_name , e_id , ts_start , ts_end , user , completed , thumb ) = wf_exec #NEWLINE# version = ( version_name if version_name else v_version ) #NEWLINE# completed = { #NEWLINE# #INDENT# '-1' : 'Error' , #NEWLINE# '0' : 'No' , #NEWLINE# '1' : 'Yes' , #NEWLINE# #UNINDENT# } . get ( str ( completed ) , 'Unknown' ) #NEWLINE# labels = ( str ( v_name ) , str ( version ) , str ( ts_start ) , str ( ts_end ) , str ( completed ) ) #NEWLINE# QtGui . QTreeWidgetItem . __init__ ( self , labels ) #NEWLINE# self . wf_exec = wf_exec #NEWLINE# self . setToolTip ( 0 , ( 'vistrail:%s version:%s log:%s wf_exec:%s user:%s' % ( v_id , v_version , log_id , e_id , user ) ) ) #NEWLINE# if thumb : #NEWLINE# #INDENT# pixmap = QtGui . QPixmap ( ) #NEWLINE# pixmap . loadFromData ( thumb ) #NEWLINE# self . setIcon ( 1 , QtGui . QIcon ( pixmap ) ) #NEWLINE# tooltip = ( '<img border=0 src="data:image/png;base64,%s">' % thumb . encode ( 'base64' ) ) #NEWLINE# self . setToolTip ( 1 , tooltip )