1 from Screen import Screen
2 from Components.TimerList import TimerList, TimerEntry
3 from Components.ActionMap import ActionMap
4 from Components.TimeInput import TimeInput
5 from Components.Label import Label
6 from Components.Button import Button
8 class TimerEdit(Screen):
9 def __init__(self, session, entry):
10 Screen.__init__(self, session)
12 self["actions"] = ActionMap(["OkCancelActions"],
18 self["shortcuts"] = ActionMap(["ShortcutActions"],
20 "red": self.beginFocus,
21 "yellow": self.endFocus
25 # begin, end, description, service
26 self["begin"] = TimeInput()
27 self["end"] = TimeInput()
29 self["lbegin"] = Label("Begin")
30 self["lend"] = Label("End")
32 self["description"] = Label("bla")
34 self["apply"] = Button("Apply")
35 self["service"] = Button()
38 self.setFocus(self["begin"])
41 self.setFocus(self["end"])
46 class TimerEditList(Screen):
47 def __init__(self, session):
48 Screen.__init__(self, session)
51 for timer in session.nav.RecordTimer.timer_list:
52 list.append(TimerEntry(timer, 0))
54 for timer in session.nav.RecordTimer.processed_timers:
55 list.append(TimerEntry(timer, 1))
57 self["timerlist"] = TimerList(list)
59 self["actions"] = ActionMap(["OkCancelActions"],
66 self.session.open(TimerEdit, self["timerlist"].getCurrent())