allow disable of service validation
[enigma2.git] / lib / python / Components / VariableValue.py
1 import skin
2
3 class VariableValue(object):
4         """VariableValue can be used for components which have a variable value (like eSlider), based on any widget with setValue call"""
5         
6         def __init__(self):
7                 self.__value = 0
8
9         def setValue(self, value):
10                 self.__value = value
11                 if self.instance:
12                         self.instance.setValue(self.__value)
13
14         def getValue(self):
15                 return self.__value
16
17         def postWidgetCreate(self, instance):
18                 print self
19                 print self.GUI_WIDGET
20                 self.instance.setValue(self.__value)
21
22         value = property(getValue, setValue)