PluginBrowser.py: update pluginlist max every 60 minutes (thx to
[enigma2.git] / lib / python / Components / VariableValue.py
1 class VariableValue(object):
2         """VariableValue can be used for components which have a variable value (like eSlider), based on any widget with setValue call"""
3         
4         def __init__(self):
5                 self.__value = 0
6
7         def setValue(self, value):
8                 self.__value = value
9                 if self.instance:
10                         try:
11                                 self.instance.setValue(self.__value)
12                         except TypeError:
13                                 self.instance.setValue(0)
14
15         def getValue(self):
16                 return self.__value
17
18         def postWidgetCreate(self, instance):
19                 print self
20                 print self.GUI_WIDGET
21                 self.instance.setValue(self.__value)
22
23         value = property(getValue, setValue)