X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/aa3e781f31a04223416f0a34b25ab95fc0bef429..d6ed3400b2cdfd156aa9f6504079aeab53db1f69:/lib/python/Components/VariableValue.py diff --git a/lib/python/Components/VariableValue.py b/lib/python/Components/VariableValue.py index c94218fe..288de01a 100644 --- a/lib/python/Components/VariableValue.py +++ b/lib/python/Components/VariableValue.py @@ -1,25 +1,22 @@ -class VariableValue: +import skin + +class VariableValue(object): """VariableValue can be used for components which have a variable value (like eSlider), based on any widget with setValue call""" def __init__(self): - self.value = 0 - self.instance = None - + self.__value = 0 + def setValue(self, value): - self.value = value + self.__value = value if self.instance: - self.instance.setValue(self.value) + self.instance.setValue(self.__value) def getValue(self): - return self.value - - def GUIcreate(self, parent, skindata): - self.instance = self.createWidget(parent, skindata) - self.instance.setValue(self.value) - - def GUIdelete(self): - self.removeWidget(self.instance) - self.instance = None - - def removeWidget(self, instance): - pass + return self.__value + + def postWidgetCreate(self, instance): + print self + print self.GUI_WIDGET + self.instance.setValue(self.__value) + + value = property(getValue, setValue)