From bf52e20ac1d227427cddfdef1437e33a55ab502b Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 14 Apr 2008 23:27:01 +0000 Subject: add 'progress' source, 'progress to text' converter --- lib/python/Components/Sources/Makefile.am | 2 +- lib/python/Components/Sources/Progress.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lib/python/Components/Sources/Progress.py (limited to 'lib/python/Components/Sources') 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) -- cgit v1.2.3