#NEWLINE# def __init__( self , alias , vtparam , parent = None ) : #NEWLINE# #INDENT# QtGui . QWidget . __init__ ( self , parent ) #NEWLINE# self . alias = alias #NEWLINE# self . vtparam = vtparam #NEWLINE# self . palette ( ) . setColor ( QtGui . QPalette . Window , CurrentTheme . METHOD_SELECT_COLOR ) #NEWLINE# label = QtGui . QLabel ( alias . name ) #NEWLINE# label . font ( ) . setBold ( True ) #NEWLINE# if ( self . alias . component . type == 'Integer' ) : #NEWLINE# #INDENT# self . value = QNumericStepperIntegerWidget ( param = vtparam , parent = self ) #NEWLINE# self . value . setRange ( int ( alias . component . minVal ) , int ( alias . component . maxVal ) ) #NEWLINE# self . value . setSingleStep ( int ( alias . component . stepSize ) ) #NEWLINE# self . value . setContents ( self . alias . component . val ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . alias . component . type == 'Float' ) : #NEWLINE# #INDENT# self . value = QNumericStepperFloatWidget ( param = vtparam , parent = vtparam ) #NEWLINE# self . value . setRange ( float ( alias . component . minVal ) , float ( alias . component . maxVal ) ) #NEWLINE# self . value . setSingleStep ( float ( alias . component . stepSize ) ) #NEWLINE# self . value . setContents ( self . alias . component . val ) #NEWLINE# #UNINDENT# #UNINDENT# self . connect ( self . value , QtCore . SIGNAL ( 'contentsChanged' ) , self . contents_changed ) #NEWLINE# hbox = QtGui . QHBoxLayout ( ) #NEWLINE# hbox . setMargin ( 8 ) #NEWLINE# hbox . addWidget ( label ) #NEWLINE# hbox . addWidget ( self . value ) #NEWLINE# self . setLayout ( hbox )