#NEWLINE# def update_widget( self ) : #NEWLINE# #INDENT# layout = QtGui . QVBoxLayout ( ) #NEWLINE# config = self . get_configuration ( ) #NEWLINE# self . mode_widgets = [ ] #NEWLINE# self . found_modes = set ( ) #NEWLINE# mode_layouts = [ ] #NEWLINE# for mode in self . module . module_descriptor . module . get_sorted_mode_list ( ) : #NEWLINE# #INDENT# mode_config = None #NEWLINE# if ( mode . mode_type in config ) : #NEWLINE# #INDENT# mode_config = config [ mode . mode_type ] #NEWLINE# #UNINDENT# mode_w = self . build_mode_config ( layout , mode , mode_config ) #NEWLINE# mode_layouts . append ( mode_w . layout ( ) ) #NEWLINE# self . found_modes . add ( mode . mode_type ) #NEWLINE# #UNINDENT# for ( mode_type , mode_config ) in config . iteritems ( ) : #NEWLINE# #INDENT# if ( mode_type not in self . found_modes ) : #NEWLINE# #INDENT# mode_w = self . build_mode_config ( layout , None , mode_config , title = mode_type ) #NEWLINE# mode_layouts . append ( mode_w . layout ( ) ) #NEWLINE# self . found_modes . add ( mode_type ) #NEWLINE# #UNINDENT# #UNINDENT# width = 0 #NEWLINE# for mode_layout in mode_layouts : #NEWLINE# #INDENT# for row in xrange ( mode_layout . rowCount ( ) ) : #NEWLINE# #INDENT# item = mode_layout . itemAtPosition ( row , 0 ) #NEWLINE# if ( item and item . widget ( ) ) : #NEWLINE# #INDENT# width = max ( width , item . widget ( ) . sizeHint ( ) . width ( ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for mode_layout in mode_layouts : #NEWLINE# #INDENT# mode_layout . setColumnMinimumWidth ( 0 , width ) #NEWLINE# #UNINDENT# layout . addStretch ( 5 ) #NEWLINE# scroll_area = QtGui . QScrollArea ( ) #NEWLINE# inner_widget = QtGui . QWidget ( ) #NEWLINE# inner_widget . setLayout ( layout ) #NEWLINE# scroll_area . setWidget ( mode ) #NEWLINE# scroll_area . setWidgetResizable ( True ) #NEWLINE# self . setLayout ( QtGui . QVBoxLayout ( ) ) #NEWLINE# self . layout ( ) . addWidget ( scroll_area , 1 ) #NEWLINE# self . layout ( ) . addLayout ( self . create_buttons ( ) ) #NEWLINE# self . layout ( ) . setContentsMargins ( 0 , 0 , 0 , 0 )