def __init__(self, parent=None, name=None, flags=0): QtImport.QWidget.__init__(self, parent, QtImport.Qt.WindowFlags(flags)) if not name: self.setObjectName("SADWidgetLayout") # Hardware objects ---------------------------------------------------- # Internal variables -------------------------------------------------- # Graphic elements ---------------------------------------------------- self.optimised_sad_cbx = QtImport.QCheckBox("Optimised SAD", self) self.automatic_resolution_radio = QtImport.QRadioButton(self) _optimal_sad_widget = QtImport.QWidget(self) self.optimal_sad_radio = QtImport.QRadioButton( "Optimal SAD for given resolution:", _optimal_sad_widget ) self.sad_bgroup = QtImport.QButtonGroup(self) self.sad_bgroup.addButton(self.automatic_resolution_radio) self.sad_bgroup.addButton(self.optimal_sad_radio) self.sad_resolution_ledit = QtImport.QLineEdit(_optimal_sad_widget) self.sad_resolution_ledit.setMinimumSize(50, 0) self.sad_resolution_ledit.setMaximumSize(50, 32767) # Layout -------------------------------------------------------------- _optimal_sad_widget_hlayout = QtImport.QHBoxLayout(_optimal_sad_widget) _optimal_sad_widget_hlayout.addWidget(self.optimal_sad_radio) _optimal_sad_widget_hlayout.addWidget(self.sad_resolution_ledit) _optimal_sad_widget_hlayout.setSpacing(0) _optimal_sad_widget_hlayout.setContentsMargins(0, 0, 0, 0) _main_vlayout = QtImport.QVBoxLayout(self) _main_vlayout.addWidget(self.optimised_sad_cbx) _main_vlayout.addWidget(self.automatic_resolution_radio) _main_vlayout.addWidget(_optimal_sad_widget) _main_vlayout.addStretch(0) _main_vlayout.setSpacing(2) _main_vlayout.setContentsMargins(2, 2, 2, 2) self.automatic_resolution_radio.setText( self.trUtf8( "\x52\x65\x73\x6f\x6c\x75\x74\x69\x6f\x6e\x20\x73\x65\x6c\x65\x63\x74\x65\x64\x20\x61\x75\x74\x6f\x6d\x61\x74\x69\x63\x61\x6c\x6c\x79\x2c\x20\x72\x6f\x74\x61\x74\x69\x6f\x6e\x20\x69\x6e\x74\x65\x72\x76\x61\x6c\x3a\x20\x33\x36\x30\xc2\xb0" ) )
def __init__(self, parent=None, name=None, flags=0): QtImport.QWidget.__init__(self, parent, QtImport.Qt.WindowFlags(flags)) if not name: self.setObjectName("RoutineDCWidgetLayout") # Hardware objects ---------------------------------------------------- # Internal variables -------------------------------------------------- # Graphic elements ---------------------------------------------------- self.min_dose_radio = QtImport.QRadioButton(self) self.min_time_radio = QtImport.QRadioButton(self) self.dose_time_bgroup = QtImport.QButtonGroup(self) self.dose_time_bgroup.addButton(self.min_dose_radio) self.dose_time_bgroup.addButton(self.min_time_radio) self.dose_limit_cbx = QtImport.QCheckBox(self) self.time_limit_cbx = QtImport.QCheckBox(self) self.dose_ledit = QtImport.QLineEdit(self) self.dose_ledit.setMinimumSize(50, 0) self.dose_ledit.setMaximumSize(50, 32767) self.time_ledit = QtImport.QLineEdit(self) self.time_ledit.setMinimumSize(50, 0) self.time_ledit.setMaximumSize(50, 32767) self.radiation_damage_cbx = QtImport.QCheckBox(self) # Layout -------------------------------------------------------------- _main_gridlayout = QtImport.QGridLayout(self) _main_gridlayout.addWidget(self.min_dose_radio, 0, 0) # , 2, 1) _main_gridlayout.addWidget(self.min_time_radio, 1, 0) _main_gridlayout.addWidget(self.dose_limit_cbx, 0, 1) _main_gridlayout.addWidget(self.time_limit_cbx, 1, 1) _main_gridlayout.addWidget(self.dose_ledit, 0, 2) _main_gridlayout.addWidget(self.time_ledit, 1, 2) _main_gridlayout.addWidget(self.radiation_damage_cbx, 2, 0, 1, 2) _main_gridlayout.setColumnStretch(3, 0) # SizePolicies -------------------------------------------------------- # Qt signal/slot connections ------------------------------------------ # Other --------------------------------------------------------------- self.languageChange()