From edf2e7b1a646ca0a35ac2bc92e97a4b4b29c74f7 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Thu, 24 Jan 2008 03:49:08 +0000 Subject: add videowizard --- .../Plugins/SystemPlugins/Videomode/VideoWizard.py | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py (limited to 'lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py') diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py new file mode 100644 index 00000000..f0fe1403 --- /dev/null +++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py @@ -0,0 +1,89 @@ +from Screens.Wizard import Wizard, wizardManager +import sys +from VideoHardware import video_hw + +from Components.Pixmap import Pixmap, MovingPixmap +from Components.config import config, ConfigBoolean, configfile + +class VideoWizard(Wizard): + skin = """ + + + + + + + + + + + + + """ + + def __init__(self, session): + # FIXME anyone knows how to use relative paths from the plugin's directory? + self.xmlfile = sys.path[0] + "/Plugins/SystemPlugins/Videomode/videowizard.xml" + self.hw = video_hw + + Wizard.__init__(self, session, showSteps = False) + self["wizard"] = Pixmap() + self["rc"] = MovingPixmap() + self["arrowdown"] = MovingPixmap() + self["arrowup"] = MovingPixmap() + self["arrowup2"] = MovingPixmap() + + self.port = None + self.mode = None + + def createSummary(self): + print "++++++++++++***++**** VideoWizard-createSummary" + from Screens.Wizard import WizardSummary + return WizardSummary + + def markDone(self): + pass + + def listInputChannels(self): + list = [] + + for port in self.hw.getPortList(): + list.append((port, port)) + return list + + def inputSelectionMade(self, index): + print "inputSelectionMade:", index + self.port = index + + def inputSelectionMoved(self): + print "selection moved:", self.selection + + def listModes(self): + list = [] + print "modes for port", self.port + for mode in self.hw.getModeList(self.port): + list.append((mode[0], mode[0])) + return list + + def modeSelectionMade(self, index): + print "modeSelectionMade:", index + self.mode = index + + def modeSelectionMoved(self): + print "selection moved:", self.selection + + def listRates(self): + list = [] + print "modes for port", self.port + for mode in self.hw.getModeList(self.port): + print mode + if mode[0] == self.mode: + for rate in mode[1]: + list.append((rate, rate)) + return list + + def rateSelectionMade(self, index): + print "rateSelectionMade:", index + + def rateSelectionMoved(self): + print "selection moved:", self.selection \ No newline at end of file -- cgit v1.2.3