#NEWLINE# @ staticmethod #NEWLINE# def _choose_merge( data , others ) : #NEWLINE# #INDENT# w = load_ui ( 'merge.ui' , None , directory = os . path . dirname ( __file__ ) ) #NEWLINE# w . show ( ) #NEWLINE# w . raise_ ( ) #NEWLINE# label = ( result [ 0 ] . label if ( len ( others ) > 0 ) else data . label ) #NEWLINE# w . merged_label . setText ( label ) #NEWLINE# entries = [ QtGui . QListWidgetItem ( other . label ) for other in others ] #NEWLINE# for e in entries : #NEWLINE# #INDENT# e . setCheckState ( Qt . Checked ) #NEWLINE# #UNINDENT# for ( d , item ) in zip ( others , entries ) : #NEWLINE# #INDENT# w . choices . addItem ( item ) #NEWLINE# #UNINDENT# if ( not w . exec_ ( ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# result = [ layer for ( layer , entry ) in zip ( others , entries ) if ( entry . checkState ( ) == Qt . Checked ) ] #NEWLINE# if result : #NEWLINE# #INDENT# result [ 0 ] . label = str ( w . merged_label . text ( ) ) #NEWLINE# return ( result + [ data ] )