fix caching, allow path= to override last path component (for LCD picons or different...
[enigma2.git] / lib / python / Components / ProgressBar.py
1 from HTMLComponent import HTMLComponent
2 from GUIComponent import GUIComponent
3 from VariableValue import VariableValue
4
5 from enigma import eSlider
6
7 # a general purpose progress bar
8 class ProgressBar(VariableValue, HTMLComponent, GUIComponent, object):
9         def __init__(self):
10                 GUIComponent.__init__(self)
11                 VariableValue.__init__(self)
12                 self.__start = 0
13                 self.__end = 100
14
15         GUI_WIDGET = eSlider
16
17         def postWidgetCreate(self, instance):
18                 instance.setRange(self.__start, self.__end)
19
20         def setRange(self, range):
21                 (__start, __end) = range
22                 if self.instance is not None:
23                         self.instance.setRange(__start, __end)
24
25         def getRange(self):
26                 return (self.__start, self.__end)
27
28         range = property(getRange, setRange)