1 from Screen import Screen
2 from Components.ServiceScan import ServiceScan as CScan
3 from Components.ProgressBar import ProgressBar
4 from Components.Label import Label
5 from Components.ActionMap import ActionMap
6 from Components.FIFOList import FIFOList
7 from Components.Sources.FrontendInfo import FrontendInfo
9 class ServiceScanSummary(Screen):
11 <screen position="0,0" size="132,64">
12 <widget name="Title" position="6,4" size="120,42" font="Regular;16" transparent="1" />
13 <widget name="scan_progress" position="6,50" zPosition="1" borderWidth="1" size="56,12" backgroundColor="dark" />
14 <widget name="Service" position="6,22" size="120,26" font="Regular;12" transparent="1" />
17 def __init__(self, session, parent, showStepSlider = True):
18 Screen.__init__(self, session, parent)
20 self["Title"] = Label(parent.title or "ServiceScan")
21 self["Service"] = Label("No Service")
22 self["scan_progress"] = ProgressBar()
24 def updateProgress(self, value):
25 self["scan_progress"].setValue(value)
27 def updateService(self, name):
28 self["Service"].setText(name)
30 class ServiceScan(Screen):
34 if self["scan"].isDone():
40 def __init__(self, session, scanList):
41 Screen.__init__(self, session)
43 self.scanList = scanList
45 self.session.nav.stopService()
47 self["scan_progress"] = ProgressBar()
48 self["scan_state"] = Label(_("scan state"))
49 self["network"] = Label()
50 self["transponder"] = Label()
52 self["pass"] = Label("")
53 self["servicelist"] = FIFOList(len=10)
54 self["FrontendInfo"] = FrontendInfo()
56 self["actions"] = ActionMap(["OkCancelActions"],
62 self.onFirstExecBegin.append(self.doServiceScan)
64 def doServiceScan(self):
65 self["scan"] = CScan(self["scan_progress"], self["scan_state"], self["servicelist"], self["pass"], self.scanList, self["network"], self["transponder"], self["FrontendInfo"], self.session.summary)
67 def createSummary(self):
68 print "ServiceScanCreateSummary"
69 return ServiceScanSummary