Exemple #1
0
	def __init__(self, session, service, timeFocus=None):
		EPGSelectionBase.__init__(self, session, config.epgselection.single, startRef=service)

		self.skinName = ["SingleEPG", "EPGSelection"]

		helpDescription = _("EPG Commands")
		self["okactions"] = HelpableActionMap(self, "OkCancelActions", {
			"cancel": (self.closeScreen, _("Exit EPG")),
			"OK": (ignoreLongKeyPress(self.OK), _("Close")),
			"OKLong": (self.OKLong, _("Close"))
		}, prio=-1, description=helpDescription)
		self["epgactions"] = HelpableActionMap(self, "EPGSelectActions", {
			"info": (self.openEventView, _("Show detailed event info")),
			"epg": (self.openEventView, _("Show detailed event info")),
			"menu": (self.createSetup, _("Setup menu"))
		}, prio=-1, description=helpDescription)
		self["epgcursoractions"] = HelpableActionMap(self, "DirectionActions", {
			"left": (self.prevPage, _("Move up a page")),
			"right": (self.nextPage, _("Move down a page")),
			"up": (self.moveUp, _("Go to previous channel")),
			"down": (self.moveDown, _("Go to next channel"))
		}, prio=-1, description=helpDescription)

		self.timeFocus = timeFocus or time()
		self["list"] = EPGListSingle(session, config.epgselection.single, self.onSelectionChanged)
	def __init__(self, session, zapFunc, startBouquet, startRef, bouquets, timeFocus=None):
		UserDefinedButtons.__init__(self, config.epgselection.single, epgActions, okActions)
		EPGSelectionBase.__init__(self, session, config.epgselection.single, startBouquet, startRef, bouquets)
		EPGServiceNumberSelection.__init__(self)
		EPGServiceZap.__init__(self, zapFunc)

		self.skinName = ["SingleEPG", "EPGSelection"]
		EPGServiceBrowse.__init__(self)

		helpDescription = _("EPG Commands")
		self["epgactions"] = HelpableActionMap(self, "EPGSelectActions", {
			"nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
			"prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
			"nextService": (self.nextService, _("Go to next channel")),
			"prevService": (self.prevService, _("Go to previous channel")),
			"epg": self.helpKeyAction("epg"),
			"epglong": self.helpKeyAction("epglong"),
			"info": self.helpKeyAction("info"),
			"infolong": self.helpKeyAction("infolong"),
			"tv": (self.toggleBouquetList, _("Toggle between bouquet/epg lists")),
			"timer": (self.openTimerList, _("Show timer list")),
			"timerlong": (self.openAutoTimerList, _("Show autotimer list")),
			"back": (self.goToCurrentTimeOrService, _("Go to current time, then the start service")),
			"menu": (self.createSetup, _("Setup menu"))
		}, prio=-1, description=helpDescription)
		self["epgcursoractions"] = HelpableActionMap(self, "DirectionActions", {
			"left": (self.prevPage, _("Move up a page")),
			"right": (self.nextPage, _("Move down a page")),
			"up": (self.moveUp, _("Go to previous channel")),
			"down": (self.moveDown, _("Go to next channel"))
		}, prio=-1, description=helpDescription)

		self.timeFocus = timeFocus or time()

		self["list"] = EPGListSingle(session, selChangedCB=self.onSelectionChanged, epgConfig=config.epgselection.single)
Exemple #3
0
	def __init__(self, session, service, eventId):
		EPGSelectionBase.__init__(self, session, config.epgselection.single)

		self.skinName = ["SingleEPG", "EPGSelection"]
		self.currentService = service
		self.eventId = eventId

		self["list"] = EPGListSingle(session, selChangedCB=self.onSelectionChanged, epgConfig=config.epgselection.single)
    def __init__(self, session, zapFunc, startBouquet, startRef, bouquets):
        EPGSelectionBase.__init__(self, session, config.epgselection.multi,
                                  startBouquet, startRef, bouquets)
        EPGBouquetSelection.__init__(self, False)
        EPGServiceZap.__init__(self, zapFunc)
        self.skinName = ["MultiEPG", "EPGSelectionMulti"]
        self.askTime = -1

        self["now_button"] = Pixmap()
        self["next_button"] = Pixmap()
        self["more_button"] = Pixmap()
        self["now_button_sel"] = Pixmap()
        self["next_button_sel"] = Pixmap()
        self["more_button_sel"] = Pixmap()
        self["now_text"] = Label()
        self["next_text"] = Label()
        self["more_text"] = Label()
        self["date"] = Label()

        helpDescription = _("EPG Commands")
        self["epgcursoractions"] = HelpableActionMap(
            self,
            "DirectionActions", {
                "left": (self.leftPressed, _("Go to previous event")),
                "right": (self.rightPressed, _("Go to next event")),
                "up": (self.moveUp, _("Go to previous channel")),
                "down": (self.moveDown, _("Go to next channel"))
            },
            prio=-1,
            description=helpDescription)
        self["epgactions"] = HelpableActionMap(
            self,
            "EPGSelectActions", {
                "nextService": (self.nextPage, _("Move down a page")),
                "prevService": (self.prevPage, _("Move up a page")),
                "nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
                "prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
                "input_date_time":
                (self.enterDateTime, _("Go to specific data/time")),
                "epg":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "info": (self.openEventView, _("Show detailed event info")),
                "infolong":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "tv": (self.toggleBouquetList,
                       _("Toggle between bouquet/epg lists")),
                "timer": (self.openTimerList, _("Show timer list")),
                "timerlong":
                (self.openAutoTimerList, _("Show autotimer list")),
                "menu": (self.createSetup, _("Setup menu"))
            },
            prio=-1,
            description=helpDescription)

        self["list"] = EPGListMulti(session,
                                    selChangedCB=self.onSelectionChanged)
Exemple #5
0
    def __init__(self, session, zapFunc, startBouquet, startRef, bouquets):
        UserDefinedButtons.__init__(self, config.epgselection.infobar,
                                    epgActions, okActions)
        EPGSelectionBase.__init__(self, session, config.epgselection.infobar,
                                  startBouquet, startRef, bouquets)
        EPGServiceZap.__init__(self, zapFunc)

        self.skinName = ["InfobarSingleEPG", "QuickEPG"]

        EPGServiceBrowse.__init__(self)

        helpDescription = _("EPG Commands")
        self["epgactions"] = HelpableActionMap(
            self,
            "EPGSelectActions", {
                "nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
                "prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
                "nextService": (self.nextPage, _("Move down a page")),
                "prevService": (self.prevPage, _("Move up a page")),
                "epg":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "info": (self.openEventView, _("Show detailed event info")),
                "infolong":
                (self.openSingleEPG, _("Show single epg for current channel")),
                "timer": (self.openTimerList, _("Show timer list")),
                "timerlong":
                (self.openAutoTimerList, _("Show autotimer list")),
                "menu": (self.createSetup, _("Setup menu"))
            },
            prio=-1,
            description=helpDescription)
        self["epgcursoractions"] = HelpableActionMap(
            self,
            "DirectionActions", {
                "left": (self.prevService, _("Go to previous channel")),
                "right": (self.nextService, _("Go to next channel")),
                "up": (self.moveUp, _("Go to previous channel")),
                "down": (self.moveDown, _("Go to next channel"))
            },
            prio=-1,
            description=helpDescription)

        self["list"] = EPGListSingle(session,
                                     epgConfig=config.epgselection.infobar,
                                     selChangedCB=self.onSelectionChanged)
 def onSelectionChanged(self):
     count = self["list"].getCurrentChangeCount()
     if self.askTime != -1:
         self.applyButtonState(0)
     elif count > 1:
         self.applyButtonState(3)
     elif count > 0:
         self.applyButtonState(2)
     else:
         self.applyButtonState(1)
     datestr = ""
     cur = self["list"].getCurrent()
     event = cur[0]
     if event is not None:
         now = time()
         beg = event.getBeginTime()
         nowTime = localtime(now)
         begTime = localtime(beg)
         if nowTime[2] != begTime[2]:
             datestr = strftime(config.usage.date.dayshort.value, begTime)
         else:
             datestr = _("Today")
     self["date"].setText(datestr)
     EPGSelectionBase.onSelectionChanged(self)
    def __init__(self,
                 session,
                 zapFunc,
                 startBouquet,
                 startRef,
                 bouquets,
                 timeFocus=-1):
        UserDefinedButtons.__init__(self, config.epgselection.multi,
                                    epgActions, okActions)
        EPGSelectionBase.__init__(self, session, config.epgselection.multi,
                                  startBouquet, startRef, bouquets)
        EPGBouquetSelection.__init__(self, False)
        EPGServiceNumberSelection.__init__(self)
        EPGServiceZap.__init__(self, zapFunc)

        self.skinName = ["MultiEPG", "EPGSelectionMulti"]
        self.askTime = timeFocus

        self["now_button"] = Pixmap()
        self["next_button"] = Pixmap()
        self["more_button"] = Pixmap()
        self["now_button_sel"] = Pixmap()
        self["next_button_sel"] = Pixmap()
        self["more_button_sel"] = Pixmap()
        self["now_text"] = Label()
        self["next_text"] = Label()
        self["more_text"] = Label()
        self["date"] = Label()
        self["key_text"] = StaticText(_("TEXT"))

        helpDescription = _("EPG Commands")
        self["epgcursoractions"] = HelpableActionMap(
            self,
            "DirectionActions", {
                "left": (self.leftPressed, _("Go to previous event")),
                "right": (self.rightPressed, _("Go to next event")),
                "up": (self.moveUp, _("Go to previous channel")),
                "down": (self.moveDown, _("Go to next channel"))
            },
            prio=-1,
            description=helpDescription)
        self["epgactions"] = HelpableActionMap(
            self,
            "EPGSelectActions", {
                "nextService": (self.nextPage, _("Move down a page")),
                "prevService": (self.prevPage, _("Move up a page")),
                "nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
                "prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
                "input_date_time":
                (self.enterDateTime, _("Go to specific data/time")),
                "epg":
                self.helpKeyAction("epg"),
                "epglong":
                self.helpKeyAction("epglong"),
                "info":
                self.helpKeyAction("info"),
                "infolong":
                self.helpKeyAction("infolong"),
                "tv": (self.toggleBouquetList,
                       _("Toggle between bouquet/epg lists")),
                "timer": (self.openTimerList, _("Show timer list")),
                "timerlong":
                (self.openAutoTimerList, _("Show autotimer list")),
                "back": (self.goToCurrentTimeOrServiceOrTop,
                         _("Go to current time, then the start service")),
                "menu": (self.createSetup, _("Setup menu"))
            },
            prio=-1,
            description=helpDescription)

        self["list"] = EPGListMulti(session,
                                    selChangedCB=self.onSelectionChanged)
	def moveDown(self):
		EPGSelectionBase.moveDown(self)
		self.timeFocus = self["list"].getSelectedEventStartTime() or time()
	def toEnd(self):
		EPGSelectionBase.toEnd(self)
		self.timeFocus = self["list"].getSelectedEventStartTime() or time()
	def prevPage(self):
		EPGSelectionBase.prevPage(self)
		self.timeFocus = self["list"].getSelectedEventStartTime() or time()
	def onSelectionChanged(self):
		EPGSelectionBase.onSelectionChanged(self)
		if self.eventviewDialog:
			self.eventviewDialog.hide()
			self.openEventViewDialog()
	def __init__(self, session, zapFunc, startBouquet, startRef, bouquets, timeFocus=None, isInfobar=False):
		self.epgConfig = config.epgselection.infobar if isInfobar else config.epgselection.grid 
		UserDefinedButtons.__init__(self, self.epgConfig, epgActions, okActions, infoActions)
		EPGSelectionBase.__init__(self, session, self.epgConfig, startBouquet, startRef, bouquets)
		EPGServiceNumberSelection.__init__(self)
		EPGServiceZap.__init__(self, zapFunc)

		graphic = self.epgConfig.type_mode.value == "graphics"
		if not config.epgselection.grid.pig.value:
			self.skinName = ["GridEPG", "GraphicalEPG"]
		else:
			self.skinName = ["GridEPGPIG", "GraphicalEPGPIG"]
		self.closeRecursive = False
		EPGBouquetSelection.__init__(self, graphic)

		self["timeline_text"] = TimelineText(self.epgConfig, graphic)
		self["Event"] = Event()
		self["primetime"] = Label(_("PRIMETIME"))
		self["change_bouquet"] = Label(_("CHANGE BOUQUET"))
		self["jump"] = Label(_("JUMP 24 HOURS"))
		self["page"] = Label(_("PAGE UP/DOWN"))
		self.timeLines = []
		for x in range(0, MAX_TIMELINES):
			pm = Pixmap()
			self.timeLines.append(pm)
			self["timeline%d" % x] = pm

		self["timeline_now"] = Pixmap()
		self.updateTimelineTimer = eTimer()
		self.updateTimelineTimer.callback.append(self.moveTimeLines)
		self.updateTimelineTimer.start(60000)
		
		helpDescription = _("EPG Commands")
		self["epgcursoractions"] = HelpableActionMap(self, "DirectionActions", {
			"left": (self.leftPressed, _("Go to previous event")),
			"right": (self.rightPressed, _("Go to next event")),
			"up": (self.moveUp, _("Go to previous channel")),
			"down": (self.moveDown, _("Go to next channel"))
		}, prio=-1, description=helpDescription)
		
		self["epgactions"] = HelpableActionMap(self, "EPGSelectActions", {
			"nextService": self.helpKeyAction("channelup"),
			"prevService": self.helpKeyAction("channeldown"),
			"nextBouquet": (self.nextBouquet, _("Go to next bouquet")),
			"prevBouquet": (self.prevBouquet, _("Go to previous bouquet")),
			"input_date_time": (self.enterDateTime, _("Go to specific date/time")),
			"epg": self.helpKeyAction("epg"),
			"epglong": self.helpKeyAction("epglong"),
			"info": self.helpKeyAction("info"),
			"infolong": self.helpKeyAction("infolong"),
			"tv": (self.toggleBouquetList, _("Toggle between bouquet/epg lists")),
			"tvlong": (self.togglePIG, _("Toggle picture In graphics")),
			"timer": (self.openTimerList, _("Show timer list")),
			"timerlong": (self.openAutoTimerList, _("Show autotimer list")),
			"back": (self.goToCurrentTimeOrServiceOrTop, _("Go to current time, then the start service, then home of list")),
			"menu": (self.createSetup, _("Setup menu"))
		}, prio=-1, description=helpDescription)

		if config.epgselection.grid.number_buttons_mode.value == "paging":
			self["numberactions"] = HelpableActionMap(self, "NumberActions", {
				"1": (self.reduceTimeScale, _("Reduce time scale")),
				"2": (self.prevPage, _("Page up")),
				"3": (self.increaseTimeScale, _("Increase time scale")),
				"4": (self.pageLeft, _("page left")),
				"5": (self.goToCurrentTime, _("Jump to current time")),
				"6": (self.pageRight, _("Page right")),
				"7": (self.toggleNumberOfRows, _("No of items switch (increase or reduced)")),
				"8": (self.nextPage, _("Page down")),
				"9": (self.goToPrimeTime, _("Jump to prime time")),
				"0": (self.goToCurrentTimeAndTop, _("Move to home of list"))
			}, prio=-1, description=helpDescription)
		self["list"] = EPGListGrid(session, isInfobar=isInfobar, selChangedCB=self.onSelectionChanged)
		self["list"].setTimeFocus(timeFocus or time())