本文整理汇总了Python中Components.ActionMap.HelpableActionMap.csel方法的典型用法代码示例。如果您正苦于以下问题:Python HelpableActionMap.csel方法的具体用法?Python HelpableActionMap.csel怎么用?Python HelpableActionMap.csel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Components.ActionMap.HelpableActionMap
的用法示例。
在下文中一共展示了HelpableActionMap.csel方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AutoTimerGraphMultiEPG__init__
# 需要导入模块: from Components.ActionMap import HelpableActionMap [as 别名]
# 或者: from Components.ActionMap.HelpableActionMap import csel [as 别名]
def AutoTimerGraphMultiEPG__init__(self, session, services, zapFunc=None, bouquetChangeCB=None, bouquetname=""):
try:
baseGraphMultiEPG__init__(self, session, services, zapFunc, bouquetChangeCB, bouquetname)
except:
baseGraphMultiEPG__init__(self, session, services, zapFunc, bouquetChangeCB)
if config.plugins.autotimer.add_to_graph.value:
def showAutoTimer():
open_list = [
(_("Open standard setup menu"), "setup"),
(_("Add new AutoTimer"), "add"),
(_("Preview for your AutoTimers"), "preview"),
(_("Search new events matching for your AutoTimers"), "search"),
(_("Timers list"), "timerlist"),
]
dlg = self.session.openWithCallback(
self.CallbackToGraphMultiEPG, ChoiceBox, title=_("Select action for AutoTimer:"), list=open_list
)
dlg.setTitle(_("Choice list AutoTimer"))
HelpableScreen.__init__(self)
self["AutoTimeractions"] = HelpableActionMap(
self, "ChannelSelectEditActions", {"contextMenu": (showAutoTimer, _("Choice list AutoTimer"))}, -1
)
self["AutoTimeractions"].csel = self
示例2: __init__
# 需要导入模块: from Components.ActionMap import HelpableActionMap [as 别名]
# 或者: from Components.ActionMap.HelpableActionMap import csel [as 别名]
def __init__(self, session, services, zapFunc=None, bouquetChangeCB=None, bouquetname=""):
Screen.__init__(self, session)
self.bouquetChangeCB = bouquetChangeCB
now = time() - config.epg.histminutes.getValue() * 60
self.ask_time = now - now % (config.misc.graph_mepg.roundTo.getValue() * 60)
self.closeRecursive = False
self["key_red"] = Button("")
self["key_green"] = Button("")
self["key_yellow"] = Button("")
self["key_blue"] = Button(_("Goto"))
self.key_green_choice = self.EMPTY
self.key_red_choice = self.EMPTY
self["timeline_text"] = TimelineText()
self["Event"] = Event()
self.time_lines = [ ]
for x in range(0, MAX_TIMELINES):
pm = Pixmap()
self.time_lines.append(pm)
self["timeline%d"%(x)] = pm
self["timeline_now"] = Pixmap()
self.services = services
self.zapFunc = zapFunc
if bouquetname != "":
Screen.setTitle(self, bouquetname)
self["list"] = EPGList( selChangedCB = self.onSelectionChanged,
timer = self.session.nav.RecordTimer,
time_epoch = config.misc.graph_mepg.prev_time_period.value,
overjump_empty = config.misc.graph_mepg.overjump.value)
HelpableScreen.__init__(self)
self["okactions"] = HelpableActionMap(self, "OkCancelActions",
{
"cancel": (self.closeScreen, _("Exit EPG")),
"ok": (self.eventSelected, _("Show detailed event info"))
}, -1)
self["okactions"].csel = self
self["epgactions"] = HelpableActionMap(self, "EPGSelectActions",
{
"timerAdd": (self.timerAdd, _("Add/Remove timer for current event")),
"info": (self.infoKeyPressed, _("Show detailed event info")),
"red": (self.zapTo, _("Zap to selected channel")),
"blue": (self.enterDateTime, _("Goto specific data/time")),
"menu": (self.showSetup, _("Setup menu")),
"nextBouquet": (self.nextBouquet, _("Show bouquet selection menu")),
"prevBouquet": (self.prevBouquet, _("Show bouquet selection menu")),
"nextService": (self.nextPressed, _("Goto next page of events")),
"prevService": (self.prevPressed, _("Goto previous page of events"))
}, -1)
self["epgactions"].csel = self
self["inputactions"] = HelpableActionMap(self, "InputActions",
{
"left": (self.leftPressed, _("Goto previous event")),
"right": (self.rightPressed, _("Goto next event")),
"1": (self.key1, _("Set time window to 1 hour")),
"2": (self.key2, _("Set time window to 2 hours")),
"3": (self.key3, _("Set time window to 3 hours")),
"4": (self.key4, _("Set time window to 4 hours")),
"5": (self.key5, _("Set time window to 5 hours")),
"7": (self.prevPage, _("Goto previous page of service")),
"9": (self.nextPage, _("Goto next page of service")),
"8": (self.toTop, _("Goto first service")),
"0": (self.toEnd, _("Goto last service"))
}, -1)
self["inputactions"].csel = self
self.updateTimelineTimer = eTimer()
self.updateTimelineTimer.callback.append(self.moveTimeLines)
self.updateTimelineTimer.start(60 * 1000)
self.onLayoutFinish.append(self.onCreate)
示例3: __init__
# 需要导入模块: from Components.ActionMap import HelpableActionMap [as 别名]
# 或者: from Components.ActionMap.HelpableActionMap import csel [as 别名]
def __init__(self, session, service, zapFunc = None, eventid = None, bouquetChangeCB = None, serviceChangeCB = None, EPGtype = None, StartBouquet = None, StartRef = None, bouquetname = ''):
Screen.__init__(self, session)
HelpableScreen.__init__(self)
self.longbuttonpressed = False
self.zapFunc = zapFunc
self.bouquetChangeCB = bouquetChangeCB
self.serviceChangeCB = serviceChangeCB
graphic = False
if EPGtype == 'single':
self.type = EPG_TYPE_SINGLE
elif EPGtype == 'infobar':
self.type = EPG_TYPE_INFOBAR
elif EPGtype == 'enhanced':
self.type = EPG_TYPE_ENHANCED
elif EPGtype == 'graph':
self.type = EPG_TYPE_GRAPH
if config.epgselection.graph_type_mode.getValue() == "graphics":
graphic = True
elif EPGtype == 'infobargraph':
self.type = EPG_TYPE_INFOBARGRAPH
if config.epgselection.infobar_type_mode.getValue() == "graphics":
graphic = True
elif EPGtype == 'multi':
self.type = EPG_TYPE_MULTI
else:
self.type = EPG_TYPE_SIMILAR
if not self.type == EPG_TYPE_SINGLE:
self.StartBouquet = StartBouquet
self.StartRef = StartRef
self.bouquetname = bouquetname
self.servicelist = None
self.ask_time = -1
self.closeRecursive = False
self.eventviewDialog = None
self.eventviewWasShown = False
self.currch = None
self.session.pipshown = False
if plugin_PiPServiceRelation_installed:
self.pipServiceRelation = getRelationDict()
else:
self.pipServiceRelation = {}
self['Service'] = ServiceEvent()
self['Event'] = Event()
self.key_green_choice = self.EMPTY
self['key_red'] = Button(_('IMDb Search'))
self['key_green'] = Button(_('Add Timer'))
self['key_yellow'] = Button(_('EPG Search'))
self['key_blue'] = Button(_('Add AutoTimer'))
self['okactions'] = HelpableActionMap(self, 'OkCancelActions',
{
'cancel': (self.closeScreen, _('Exit EPG')),
'OK': (self.OK, _('Zap to channel (setup in menu)')),
'OKLong': (self.OKLong, _('Zap to channel and close (setup in menu)'))
}, -1)
self['okactions'].csel = self
self['colouractions'] = HelpableActionMap(self, 'ColorActions',
{
'red': (self.redButtonPressed, _('IMDB search for current event')),
'redlong': (self.redlongButtonPressed, _('Sort EPG List')),
'green': (self.greenButtonPressed, _('Add/Remove timer for current event')),
'yellow': (self.yellowButtonPressed, _('Search for similar events')),
'greenlong': (self.showTimerList, _('Show Timer List')),
'blue': (self.blueButtonPressed, _('Add a auto timer for current event')),
'bluelong': (self.bluelongButtonPressed, _('Show AutoTimer List'))
}, -1)
self['colouractions'].csel = self
self['recordingactions'] = HelpableActionMap(self, 'InfobarInstantRecord',
{
'ShortRecord': (self.doRecordTimer, _('Add a record timer for current event')),
'LongRecord': (self.doZapTimer, _('Add a zap timer for current event'))
}, -1)
self['recordingactions'].csel = self
if self.type == EPG_TYPE_SIMILAR:
self.currentService = service
self.eventid = eventid
self['epgactions'] = HelpableActionMap(self, 'EPGSelectActions',
{
'info': (self.Info, _('Show detailed event info')),
'infolong': (self.InfoLong, _('Show single epg for current channel')),
'menu': (self.createSetup, _('Setup menu'))
}, -1)
self['epgactions'].csel = self
elif self.type == EPG_TYPE_SINGLE:
self.currentService = ServiceReference(service)
self['epgactions'] = HelpableActionMap(self, 'EPGSelectActions',
{
'info': (self.Info, _('Show detailed event info')),
'epg': (self.Info, _('Show detailed event info')),
'menu': (self.createSetup, _('Setup menu'))
}, -1)
self['epgactions'].csel = self
self['cursoractions'] = HelpableActionMap(self, 'DirectionActions',
{
'left': (self.prevPage, _('Move up a page')),
'right': (self.nextPage, _('Move down a page')),
'up': (self.moveUp, _('Goto previous channel')),
'down': (self.moveDown, _('Goto next channel'))
}, -1)
self['cursoractions'].csel = self
elif self.type == EPG_TYPE_INFOBAR or self.type == EPG_TYPE_ENHANCED:
#.........这里部分代码省略.........
示例4: __init__
# 需要导入模块: from Components.ActionMap import HelpableActionMap [as 别名]
# 或者: from Components.ActionMap.HelpableActionMap import csel [as 别名]
def __init__(self, session, *args):
Screen.__init__(self, session)
self.skinName = ["EPGSearch", "EPGSelection"]
self.searchargs = args
self.currSearch = ""
self.longbuttonpressed = False
# XXX: we lose sort begin/end here
self["key_yellow"] = Button(_("New Search"))
self["key_blue"] = Button(_("Add AutoTimer"))
# begin stripped copy of EPGSelection.__init__
self.ChoiceBoxDialog = None
self.bouquetChangeCB = None
self.serviceChangeCB = None
self.ask_time = -1 #now
self.closeRecursive = False
self.saved_title = None
self["Service"] = ServiceEvent()
self["Event"] = Event()
self["number"] = Label()
self["number"].hide()
self.type = EPG_TYPE_SINGLE
self.currentService=None
self.zapFunc = None
self.currch = None
self.sort_type = 0
self.eventviewDialog = None
self["key_red"] = Button(_("IMDb Search"))
self["key_green"] = Button(_("Add Timer"))
self.key_green_choice = self.ADD_TIMER
self.key_red_choice = self.EMPTY
self["list"] = EPGSearchList(type = self.type, selChangedCB = self.onSelectionChanged, timer = session.nav.RecordTimer)
self['dialogactions'] = HelpableActionMap(self, 'WizardActions',
{
'back': (self.closeChoiceBoxDialog, _('Close dialog')),
}, -1)
self['dialogactions'].csel = self
self["dialogactions"].setEnabled(False)
self['okactions'] = HelpableActionMap(self, 'OkCancelActions',
{
'cancel': (self.closeScreen, _('Exit EPG')),
'OK': (self.epgsearchOK, _('Zap to channel (setup in menu)')),
'OKLong': (self.epgsearchOKLong, _('Zap to channel and close (setup in menu)'))
}, -1)
self['okactions'].csel = self
self['colouractions'] = HelpableActionMap(self, 'ColorActions',
{
'red': (self.redButtonPressed, _('IMDB search for current event')),
'green': (self.timerAdd, _('Add/Remove timer for current event')),
'yellow': (self.yellowButtonPressed, _('Search for similar events')),
'blue': (self.exportAutoTimer, _('Add a auto timer for current event')),
'bluelong': (self.blueButtonPressed, _('Show AutoTimer List'))
}, -1)
self['colouractions'].csel = self
self['recordingactions'] = HelpableActionMap(self, 'InfobarInstantRecord',
{
'ShortRecord': (self.doRecordTimer, _('Add a record timer for current event')),
'LongRecord': (self.doZapTimer, _('Add a zap timer for current event'))
}, -1)
self['recordingactions'].csel = self
self['epgactions'] = HelpableActionMap(self, 'EPGSelectActions',
{
'nextBouquet': (self.nextBouquet, _('Goto next bouquet')),
'prevBouquet': (self.prevBouquet, _('Goto previous bouquet')),
'nextService': (self.nextService, _('Move down a page')),
'prevService': (self.prevService, _('Move up a page')),
'epg': (self.Info, _('Show detailed event info')),
'info': (self.Info, _('Show detailed event info')),
'infolong': (self.infoKeyPressed, _('Show single epg for current channel')),
'menu': (self.menu, _('Setup menu'))
}, -1)
self['epgactions'].csel = self
self['epgcursoractions'] = HelpableActionMap(self, 'DirectionActions',
{
'left': (self.prevPage, _('Move up a page')),
'right': (self.nextPage, _('Move down a page')),
'up': (self.moveUp, _('Goto previous channel')),
'down': (self.moveDown, _('Goto next channel'))
}, -1)
self['epgcursoractions'].csel = self
self.onLayoutFinish.append(self.onCreate)
# end stripped copy of EPGSelection.__init__
# Partnerbox
if PartnerBoxIconsEnabled:
EPGSelection.PartnerboxInit(self, False)
self.refreshTimer = eTimer()
self.refreshTimer.timeout.get().append(self.refreshlist)
# Hook up actions for yttrailer if installed
#.........这里部分代码省略.........
示例5: __init__
# 需要导入模块: from Components.ActionMap import HelpableActionMap [as 别名]
# 或者: from Components.ActionMap.HelpableActionMap import csel [as 别名]
def __init__(self, session, *args, **kwargs):
Screen.__init__(self, session)
self.skinName = [self.skinName, "EPGSelection"]
if isinstance(self, HelpableScreen):
HelpableScreen.__init__(self)
self.searchargs = args
self.currSearch = ""
self.longbuttonpressed = False
# XXX: we lose sort begin/end here
self["key_yellow"] = Button(_("New Search"))
self["key_blue"] = Button(_("Add AutoTimer"))
# begin stripped copy of EPGSelection.__init__
self.ChoiceBoxDialog = None
self.bouquetChangeCB = None
self.serviceChangeCB = None
self.ask_time = -1 # now
self.closeRecursive = False
self.saved_title = None
self.lastAsk = None
self["Service"] = ServiceEvent()
self["Event"] = Event()
self["number"] = Label()
self["number"].hide()
self.type = EPG_TYPE_SINGLE
self.currentService = None
self.zapFunc = None
self.currch = None
self.sort_type = 0
self.eventviewDialog = None
self["key_red"] = Button(_("IMDb Search"))
self["key_green"] = Button(_("Add Timer"))
self.key_green_choice = self.ADD_TIMER
self.key_red_choice = self.EMPTY
self["list"] = EPGSearchList(type=self.type, selChangedCB=self.onSelectionChanged, timer=session.nav.RecordTimer)
self["dialogactions"] = HelpableActionMap(self, "WizardActions", {
"back": (self.closeChoiceBoxDialog, _("Close dialog")),
}, -1)
self["dialogactions"].csel = self
self["dialogactions"].setEnabled(False)
self["okactions"] = HelpableActionMap(self, "OkCancelActions", {
"cancel": (self.closeScreen, _("Exit EPG Search")),
"OK": (self.epgsearchOK, _("Zap to channel")),
"OKLong": (self.epgsearchOKLong, _("Show detailed event information"))
}, -1)
self["okactions"].csel = self
self["colouractions"] = HelpableActionMap(self, "ColorActions", {
"red": (self.redButtonPressed, _("IMDB search for highlighted event")),
"green": (self.timerAdd, _("Add/remove/edit timer for highlighted event")),
"yellow": (self.yellowButtonPressed, _("Enter new search")),
"yellowlong": (self.showHistory, _("Show search history")),
"blue": (self.exportAutoTimer, _("Add an AutoTimer for highlighted event")),
"bluelong": (self.blueButtonPressedLong, _("Show AutoTimer list"))
}, -1)
self["colouractions"].csel = self
self["recordingactions"] = HelpableActionMap(self, "InfobarInstantRecord", {
"ShortRecord": (self.doRecordTimer, _("Add a record timer for highlighted event")),
"LongRecord": (self.doZapTimer, _("Add a zap timer for highlighted event"))
}, -1)
self["recordingactions"].csel = self
self["epgactions"] = HelpableActionMap(self, "EPGSelectActions", {
"nextBouquet": (self.nextPage, _("Move down a page")),
"prevBouquet": (self.prevPage, _("Move up a page")),
"nextService": (self.prevPage, _("Move up a page")),
"prevService": (self.nextPage, _("Move down a page")),
"epg": (self.Info, _("Show detailed event information")),
"info": (self.Info, _("Show detailed event information")),
"infolong": (self.infoKeyPressed, _("Show detailed event information")),
"menu": (self.menu, _("Setup menu"))
}, -1)
self["epgactions"].csel = self
self["epgcursoractions"] = HelpableActionMap(self, "DirectionActions", {
"left": (self.prevPage, _("Move up a page")),
"right": (self.nextPage, _("Move down a page")),
"up": (self.moveUp, _("Move up")),
"down": (self.moveDown, _("Move down"))
}, -1)
self["epgcursoractions"].csel = self
self.openHistory = kwargs.get("openHistory", False)
self.onLayoutFinish.append(self.onCreate)
# end stripped copy of EPGSelection.__init__
# Partnerbox
if PartnerBoxIconsEnabled:
EPGSelection.PartnerboxInit(self, False)
self.refreshTimer = eTimer()
self.refreshTimer.callback.append(self.refreshlist)
self.startTimer = eTimer()
#.........这里部分代码省略.........
示例6: __init__
# 需要导入模块: from Components.ActionMap import HelpableActionMap [as 别名]
# 或者: from Components.ActionMap.HelpableActionMap import csel [as 别名]
def __init__(self, session, services, zapFunc=None, bouquetChangeCB=None, bouquetname=""):
Screen.__init__(self, session)
self.bouquetChangeCB = bouquetChangeCB
now = time() - config.epg.histminutes.getValue() * 60
self.ask_time = now - now % int(config.misc.graph_mepg.roundTo.getValue())
self["key_red"] = Button("")
self["key_green"] = Button("")
global listscreen
if listscreen:
self["key_yellow"] = Button(_("Normal mode"))
self.skinName="GraphMultiEPGList"
else:
self["key_yellow"] = Button(_("List mode"))
self["key_blue"] = Button(_("Goto"))
self.key_green_choice = self.EMPTY
self.key_red_choice = self.EMPTY
self["timeline_text"] = TimelineText()
self["Service"] = ServiceEvent()
self["Event"] = Event()
self.time_lines = [ ]
for x in range(0, MAX_TIMELINES):
pm = Pixmap()
self.time_lines.append(pm)
self["timeline%d"%(x)] = pm
self["timeline_now"] = Pixmap()
self.services = services
self.zapFunc = zapFunc
if bouquetname != "":
Screen.setTitle(self, bouquetname)
self["list"] = EPGList( selChangedCB = self.onSelectionChanged,
timer = self.session.nav.RecordTimer,
time_epoch = config.misc.graph_mepg.prev_time_period.value,
overjump_empty = config.misc.graph_mepg.overjump.value)
HelpableScreen.__init__(self)
self["okactions"] = HelpableActionMap(self, "OkCancelActions",
{
"cancel": (self.closeScreen, _("Exit EPG")),
"ok": (self.eventSelected, _("Zap to selected channel, or show detailed event info (depends on configuration)"))
}, -1)
self["okactions"].csel = self
self["epgactions"] = HelpableActionMap(self, "EPGSelectActions",
{
"timerAdd": (self.timerAdd, _("Add/remove change timer for current event")),
"info": (self.infoKeyPressed, _("Show detailed event info")),
"red": (self.zapTo, _("Zap to selected channel")),
"yellow": (self.swapMode, _("Switch between normal mode and list mode")),
"blue": (self.enterDateTime, _("Goto specific date/time")),
"menu": (self.furtherOptions, _("Further Options")),
"nextBouquet": (self.nextBouquet, self.getKeyNextBouquetHelptext),
"prevBouquet": (self.prevBouquet, self.getKeyPrevBouquetHelptext),
"nextService": (self.nextPressed, _("Goto next page of events")),
"prevService": (self.prevPressed, _("Goto previous page of events")),
"preview": (self.preview, _("Preview selected channel")),
"nextDay": (self.nextDay, _("Goto next day of events")),
"prevDay": (self.prevDay, _("Goto previous day of events"))
}, -1)
self["epgactions"].csel = self
self["inputactions"] = HelpableActionMap(self, "InputActions",
{
"left": (self.leftPressed, _("Go to previous event")),
"right": (self.rightPressed, _("Go to next event")),
"1": (self.key1, _("Set time window to 1 hour")),
"2": (self.key2, _("Set time window to 2 hours")),
"3": (self.key3, _("Set time window to 3 hours")),
"4": (self.key4, _("Set time window to 4 hours")),
"5": (self.key5, _("Set time window to 5 hours")),
"6": (self.key6, _("Set time window to 6 hours")),
"7": (self.prevPage, _("Go to previous page of service")),
"9": (self.nextPage, _("Go to next page of service")),
"8": (self.toTop, _("Go to first service")),
"0": (self.toEnd, _("Go to last service"))
}, -1)
self["inputactions"].csel = self
self.updateTimelineTimer = eTimer()
self.updateTimelineTimer.callback.append(self.moveTimeLines)
self.updateTimelineTimer.start(60 * 1000)
self.onLayoutFinish.append(self.onCreate)
self.previousref = self.session.nav.getCurrentlyPlayingServiceOrGroup()