

def setter(self, widget, value):
    if (self.mapping is not None):
        widget.setValue(self.mapping[1](value))
    elif (self.value_range is not None):
        (imin, imax) = (widget.minimum(), widget.maximum())
        (vmin, vmax) = self.value_range
        widget.setValue(((((value - vmin) / (vmax - vmin)) * (imax - imin)) + imin))
    else:
        widget.setValue(value)

dataset/ETHPy150Open glue-viz/glue/glue/utils/qt/widget_properties.py ValueProperty.setter/original