add 'progress' source, 'progress to text' converter
[vuplus_dvbapp] / lib / python / Components / Sources / Progress.py
diff --git a/lib/python/Components/Sources/Progress.py b/lib/python/Components/Sources/Progress.py
new file mode 100644 (file)
index 0000000..b96065b
--- /dev/null
@@ -0,0 +1,16 @@
+from Source import Source
+
+class Progress(Source):
+       def __init__(self, value = 0, range = 100):
+               Source.__init__(self)
+               self.__value = value
+               self.range = range
+
+       def getValue(self):
+               return self.__value
+
+       def setValue(self, value):
+               self.__value = value
+               self.changed((self.CHANGED_ALL,))
+
+       value = property(getValue, setValue)