X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/868ce0acf9b570870c4d24bc0b7e21f018f185a7..e41bc43a71848704ead6e9595924fe3542435f5d:/lib/python/Components/PerServiceDisplay.py diff --git a/lib/python/Components/PerServiceDisplay.py b/lib/python/Components/PerServiceDisplay.py index eab1e086..01e5cc82 100644 --- a/lib/python/Components/PerServiceDisplay.py +++ b/lib/python/Components/PerServiceDisplay.py @@ -1,8 +1,9 @@ from GUIComponent import * from VariableText import * +from VariableValue import * from enigma import pNavigation -from enigma import eLabel +from enigma import eLabel, eSlider class PerServiceDisplay(GUIComponent, VariableText): """Mixin for building components which display something which changes on navigation events, for example "service name" """ @@ -28,3 +29,21 @@ class PerServiceDisplay(GUIComponent, VariableText): g = eLabel(parent) return g + +class PerServiceDisplayProgress(GUIComponent, VariableValue, PerServiceDisplay): + def __init__(self, navcore, eventmap): + GUIComponent.__init__(self) + VariableValue.__init__(self) + self.eventmap = eventmap + self.navcore = navcore + self.navcore.event.append(self.event) + + # start with stopped state, so simulate that + self.event(pNavigation.evStopService) + + + def createWidget(self, parent): + # by default, we use a label to display our data. + self.g = eSlider(parent) + return self.g + \ No newline at end of file