#NEWLINE# def _setup_widgets( self ) : #NEWLINE# #INDENT# self . layout = QtGui . QFormLayout ( ) #NEWLINE# self . size_widget = QtGui . QSpinBox ( ) #NEWLINE# self . size_widget . setMinimum ( 1 ) #NEWLINE# self . size_widget . setMaximum ( 40 ) #NEWLINE# self . size_widget . setValue ( self . layer . style . markersize ) #NEWLINE# self . label_widget = QtGui . QLineEdit ( ) #NEWLINE# self . label_widget . setText ( self . layer . label ) #NEWLINE# self . label_widget . selectAll ( ) #NEWLINE# self . symbol_widget = QtGui . QComboBox ( ) #NEWLINE# for ( idx , symbol ) in enumerate ( self . _symbols ) : #NEWLINE# #INDENT# icon = symbol_icon ( symbol ) #NEWLINE# self . symbol_widget . addItem ( icon , '' ) #NEWLINE# if ( symbol is self . layer . style . marker ) : #NEWLINE# #INDENT# self . symbol_widget . setCurrentIndex ( idx ) #NEWLINE# #UNINDENT# #UNINDENT# self . symbol_widget . setIconSize ( QtCore . QSize ( 20 , 20 ) ) #NEWLINE# self . symbol_widget . setMinimumSize ( 10 , 32 ) #NEWLINE# self . color_widget = ColorWidget ( ) #NEWLINE# self . color_widget . setStyleSheet ( 'ColorWidget {border: 1px solid;}' ) #NEWLINE# color = self . layer . style . color #NEWLINE# color = mpl_to_qt4_color ( color , alpha = idx . layer . style . alpha ) #NEWLINE# self . set_color ( color ) #NEWLINE# self . okcancel = QtGui . QDialogButtonBox ( ( QtGui . QDialogButtonBox . Ok | QtGui . QDialogButtonBox . Cancel ) ) #NEWLINE# if self . _edit_label : #NEWLINE# #INDENT# self . layout . addRow ( 'Label' , self . label_widget ) #NEWLINE# #UNINDENT# self . layout . addRow ( 'Symbol' , self . symbol_widget ) #NEWLINE# self . layout . addRow ( 'Color' , self . color_widget ) #NEWLINE# self . layout . addRow ( 'Size' , self . size_widget ) #NEWLINE# self . layout . addWidget ( self . okcancel ) #NEWLINE# self . setLayout ( self . layout ) #NEWLINE# self . layout . setContentsMargins ( 6 , 6 , 6 , 6 )