aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Sources
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components/Sources')
-rw-r--r--lib/python/Components/Sources/Makefile.am2
-rw-r--r--lib/python/Components/Sources/Progress.py16
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/python/Components/Sources/Makefile.am b/lib/python/Components/Sources/Makefile.am
index 5ac636c8..d04013ff 100644
--- a/lib/python/Components/Sources/Makefile.am
+++ b/lib/python/Components/Sources/Makefile.am
@@ -4,4 +4,4 @@ install_PYTHON = \
__init__.py Clock.py EventInfo.py Source.py List.py CurrentService.py \
FrontendStatus.py Boolean.py Config.py ServiceList.py RdsDecoder.py StreamService.py \
StaticText.py CanvasSource.py ServiceEvent.py Event.py FrontendInfo.py TunerInfo.py \
- RecordState.py
+ RecordState.py Progress.py
diff --git a/lib/python/Components/Sources/Progress.py b/lib/python/Components/Sources/Progress.py
new file mode 100644
index 00000000..b96065b3
--- /dev/null
+++ b/lib/python/Components/Sources/Progress.py
@@ -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)