def create_spinbox(self, v): sb = ScientificDoubleSpinBox(self.ui.table) sb.setKeyboardTracking(False) sb.setValue(float(v)) sb.valueChanged.connect(self.update_params) size_policy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) sb.setSizePolicy(size_policy) return sb
def create_thermal_factor_spinbox(self, v): sb = ScientificDoubleSpinBox(self.ui.table) sb.setKeyboardTracking(False) sb.setMinimum(THERMAL_FACTOR_MIN) sb.setMaximum(THERMAL_FACTOR_MAX) sb.setValue(v) sb.valueChanged.connect(self.update_config) size_policy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) sb.setSizePolicy(size_policy) self.thermal_factor_spinboxes.append(sb) return sb
def create_occupancy_spinbox(self, v): sb = ScientificDoubleSpinBox(self.ui.table) sb.setKeyboardTracking(False) sb.setMinimum(OCCUPATION_MIN) sb.setMaximum(OCCUPATION_MAX) sb.setValue(v) sb.valueChanged.connect(self.update_config) size_policy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) sb.setSizePolicy(size_policy) self.occupancy_spinboxes.append(sb) return sb