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/Progress.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/python/Components/Sources/Progress.py (limited to '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 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