1 from Screen import Screen
2 from Components.ActionMap import NumberActionMap
3 from Components.Input import Input
5 class MinuteInput(Screen):
6 def __init__(self, session, basemins = 5):
7 Screen.__init__(self, session)
9 self["minutes"] = Input(str(basemins), type=Input.NUMBER)
11 self["actions"] = NumberActionMap([ "InputActions" , "MinuteInputActions" ],
13 "1": self.keyNumberGlobal,
14 "2": self.keyNumberGlobal,
15 "3": self.keyNumberGlobal,
16 "4": self.keyNumberGlobal,
17 "5": self.keyNumberGlobal,
18 "6": self.keyNumberGlobal,
19 "7": self.keyNumberGlobal,
20 "8": self.keyNumberGlobal,
21 "9": self.keyNumberGlobal,
22 "0": self.keyNumberGlobal,
31 def keyNumberGlobal(self, number):
32 self["minutes"].number(number)
36 self["minutes"].left()
39 self["minutes"].right()
45 self["minutes"].down()
48 self.close(int(self["minutes"].getText()))