1 from Components.VariableValue import VariableValue
2 from Renderer import Renderer
4 from enigma import eSlider
6 class Progress(VariableValue, Renderer):
8 Renderer.__init__(self)
9 VariableValue.__init__(self)
15 def changed(self, what):
16 if what[0] == self.CHANGED_CLEAR:
17 (self.range, self.value) = ((0, 1), 0)
20 range = self.source.range or 100
21 value = self.source.value
24 (self.range, self.value) = ((0, range), value)
28 def postWidgetCreate(self, instance):
29 instance.setRange(self.__start, self.__end)
31 def setRange(self, range):
32 (self.__start, self.__end) = range
33 if self.instance is not None:
34 self.instance.setRange(self.__start, self.__end)
37 return (self.__start, self.__end)
39 range = property(getRange, setRange)