add possibility to use ValueRange as ValueEqual Converter
[enigma2.git] / lib / python / Components / Converter / Converter.py
index b75d253..424a232 100644 (file)
@@ -1,18 +1,12 @@
-from Tools.Event import Event
+from Components.Element import Element
 
-class Converter:
-       def __init__(self):
-               self.changed = Event(start = self.start, stop = self.stop)
-       
-       def connect(self, source):
-               source.changed.listen(self.changed)
-               self.source = source
-       
-       def disconnect(self):
-               self.source.changed.unlisten(self.changed)
+class Converter(Element):
+       def __init__(self, arguments):
+               Element.__init__(self)
+               self.converter_arguments = arguments
 
-       def start(self):
-               pass
-       
-       def stop(self):
-               pass
+       def __repr__(self):
+               return str(type(self)) + "(" + self.converter_arguments + ")"
+
+       def handleCommand(self, cmd):
+               self.source.handleCommand(cmd)