fix inverted setting (meaning was inverted too)
[enigma2.git] / lib / python / Components / VariableValue.py
1 import skin
2
3 class VariableValue:
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                 self.instance = None
9         
10         def setValue(self, value):
11                 self.value = value
12                 if self.instance:
13                         self.instance.setValue(self.value)
14
15         def getValue(self):
16                 return self.value
17                 
18         def GUIcreate(self, parent):
19                 self.instance = self.createWidget(parent)
20                 self.instance.setValue(self.value)
21         
22         def GUIdelete(self):
23                 self.removeWidget(self.instance)
24                 self.instance = None
25         
26         def removeWidget(self, instance):
27                 pass