1 from Screen import Screen
2 from Components.ActionMap import ActionMap
3 from Components.ConfigList import ConfigList
4 from Components.config import *
7 def __init__(self, parent):
10 def handleKey(self, key):
11 if key == config.key["prevElement"]:
12 self.parent.value = self.parent.value - 1
13 if key == config.key["nextElement"]:
14 self.parent.value = self.parent.value + 1
16 def __call__(self, selected): #needed by configlist
17 print "value" + str(self.parent.value)
18 return ("text", self.parent.vals[self.parent.value])
21 def __init__(self, configPath, control, defaultValue, vals):
22 self.configPath = configPath
23 self.defaultValue = defaultValue
24 self.controlType = control
26 self.notifierList = [ ]
28 self.value = self.defaultValue
30 class Satconfig(Screen):
32 if (self["config"].getCurrent()[1].parent.enabled == True):
33 self["config"].handleKey(config.key["prevElement"])
35 if (self["config"].getCurrent()[1].parent.enabled == True):
36 self["config"].handleKey(config.key["nextElement"])
38 def __init__(self, session):
39 Screen.__init__(self, session)
41 self["actions"] = ActionMap(["SetupActions"],
46 "right": self.keyRight,
49 blasel = setupElement("blub", setupSelection, 1, ("A", "B"))
50 item = blasel.controlType(blasel)
52 list.append( ("Tuner-Slot",item) );
53 self["config"] = ConfigList(list)