def configureAttribute(self, attr_info): QTangoAttributeBase.configureAttribute(self, attr_info) try: min_warning = float(self.attrInfo.alarms.min_warning) except ValueError: min_warning = -np.inf try: max_warning = float(self.attrInfo.alarms.max_warning) except ValueError: max_warning = np.inf self.setWarningLimits((min_warning, max_warning)) self.setUnit(self.attrInfo.unit)
def configureAttribute(self, attr_info): QTangoAttributeBase.configureAttribute(self, attr_info) try: min_warning = float(self.attrInfo.alarms.min_warning) except ValueError: min_warning = -np.inf try: max_warning = float(self.attrInfo.alarms.max_warning) except ValueError: max_warning = np.inf self.setAttributeWarningLimits((min_warning, max_warning)) self.valueSpinbox.setSuffix(''.join((' ', self.attrInfo.unit)))
def configureAttribute(self, attr_info): logger.debug("Configuring attribute {0}".format(attr_info.name)) QTangoAttributeBase.configureAttribute(self, attr_info) try: min_warning = float(self.attrInfo.alarms.min_warning) except ValueError: min_warning = -np.inf try: max_warning = float(self.attrInfo.alarms.max_warning) except ValueError: max_warning = np.inf logger.debug("min_warning {0}, max_warning {1}".format( min_warning, max_warning)) self.setAttributeWarningLimits((min_warning, max_warning))
def configureAttribute(self, attr_info): logger.debug("Configuring attribute {0}".format(attr_info.name)) QTangoAttributeBase.configureAttribute(self, attr_info) try: min_warning = float(self.attrInfo.alarms.min_warning) except ValueError: min_warning = -np.inf try: max_warning = float(self.attrInfo.alarms.max_warning) except ValueError: max_warning = np.inf logger.debug("min_warning {0}, max_warning {1}".format( min_warning, max_warning)) self.setAttributeWarningLimits((min_warning, max_warning)) logger.debug("unit {0}".format(self.attrInfo.unit)) self.setUnit(self.attrInfo.unit) self.valueLabel.data_format = attr_info.format if self.is_write_widget is True: self.writeValueEdit.dataFormat = attr_info.format