#NEWLINE# def checkBoxFromPort( self , port , input_ = False ) : #NEWLINE# #INDENT# checkBox = QtGui . QCheckBox ( port . name ) #NEWLINE# if input_ : #NEWLINE# #INDENT# port_visible = ( port . name in self . module . visible_input_ports ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# port_visible = ( port . name in self . module . visible_output_ports ) #NEWLINE# #UNINDENT# if ( ( not port . optional ) or port_visible ) : #NEWLINE# #INDENT# checkBox . setCheckState ( QtCore . Qt . Checked ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# checkBox . setCheckState ( QtCore . Qt . Unchecked ) #NEWLINE# #UNINDENT# if ( ( not port . optional ) or ( input_ and ( port . sigstring == '()' ) ) ) : #NEWLINE# #INDENT# checkBox . setEnabled ( False ) #NEWLINE# #UNINDENT# return checkBox