コード例 #1
0
	def __init__(self):
		printl("", self, "S")

		NumericalTextInput.__init__(self)

		self["number_key_popup"] = Label()
		self["number_key_popup"].hide()

		self["filterActions"] = HelpableActionMap(self, "DP_FilterMenuActions",
			{
			"1":			(self.onKey1, ""),
			"2":			(self.onKey2, ""),
			"3":			(self.onKey3, ""),
			"4":			(self.onKey4, ""),
			"5":			(self.onKey5, ""),
			"6":			(self.onKey6, ""),
			"7":			(self.onKey7, ""),
			"8":			(self.onKey8, ""),
			"9":			(self.onKey9, ""),
			"0":			(self.onKey0, ""),
			}, -2)

		# for number key input
		self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')

		printl("", self, "C")
コード例 #2
0
    def __init__(self):
        printl("", self, "S")

        NumericalTextInput.__init__(self)

        self["number_key_popup"] = Label()
        self["number_key_popup"].hide()

        self["filterActions"] = HelpableActionMap(
            self, "DP_FilterMenuActions", {
                "1": (self.onKey1, ""),
                "2": (self.onKey2, ""),
                "3": (self.onKey3, ""),
                "4": (self.onKey4, ""),
                "5": (self.onKey5, ""),
                "6": (self.onKey6, ""),
                "7": (self.onKey7, ""),
                "8": (self.onKey8, ""),
                "9": (self.onKey9, ""),
                "0": (self.onKey0, ""),
            }, -2)

        # for number key input
        self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')

        printl("", self, "C")
コード例 #3
0
ファイル: DP_View.py プロジェクト: ejderk/DreamPlex
    def __init__(self, session, libraryName, loadLibrary, playEntry, viewName, select=None, sort=None, filter=None):
        '''
        '''
        printl("", self, "S")
        
        printl("viewName: "+ str(viewName), self, "I")
        self.skinName = viewName[2]
        Screen.__init__(self, session)
        NumericalTextInput.__init__(self)
        self.skinName = viewName[2]
        self.select = select
        self.onFirstExecSort = sort
        self.onFirstExecFilter = filter
        
        self.libraryName = libraryName
        self.loadLibrary = loadLibrary
        self.viewName = viewName
        self._playEntry = playEntry
        
        self.playerData = None
        
        self.oldService = self.session.nav.getCurrentlyPlayingServiceReference()
        self.session.nav.stopService()
        
        self.mediaPath = config.plugins.dreamplex.mediafolderpath.value
        
        # Initialise library list
        list = []
        self["listview"] = List(list, True)
        
        self["number_key_popup"] = Label("")
        self["number_key_popup"].hide()

        self.seenPng = None
        self.unseenPng = None
            
        self["actions"] = HelpableActionMap(self, "DP_View", 
        {
            "ok":         (self.onKeyOk, ""),
            "cancel":     (self.onKeyCancel, ""),
            "left":       (self.onKeyLeft, ""),
            "right":      (self.onKeyRight, ""),
            "left_quick": (self.onKeyLeftQuick, ""),
            "right_quick": (self.onKeyRightQuick, ""),
            "up":         (self.onKeyUp, ""),
            "down":       (self.onKeyDown, ""),
            "up_quick":   (self.onKeyUpQuick, ""),
            "down_quick": (self.onKeyDownQuick, ""),
            "info":       (self.onKeyInfo, ""),
            #"menu":       (self.onKeyMenu, ""),

            "red":        (self.onKeyRed, ""),
            #"green":      (self.onKeyGreen, ""),
            #"yellow":     (self.onKeyYellow, ""),
            "blue":       (self.onKeyBlue, ""),

            "red_long":        (self.onKeyRedLong, ""),
            #"green_long":      (self.onKeyGreenLong, ""),
            #"yellow_long":     (self.onKeyYellowLong, ""),
            #"blue_long":       (self.onKeyBlueLong, ""),
            
            "1":       (self.onKey1, ""),
            "2":       (self.onKey2, ""),
            "3":       (self.onKey3, ""),
            "4":       (self.onKey4, ""),
            "5":       (self.onKey5, ""),
            "6":       (self.onKey6, ""),
            "7":       (self.onKey7, ""),
            "8":       (self.onKey8, ""),
            "9":       (self.onKey9, ""),
            "0":       (self.onKey0, ""),

        }, -2)
        
        # For number key input
        self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')
        
        self.onLayoutFinish.append(self.setCustomTitle)
        self.onFirstExecBegin.append(self.onFirstExec)
        
        printl("", self, "C")
コード例 #4
0
    def __init__(self,
                 session,
                 libraryName,
                 loadLibrary,
                 playEntry,
                 viewName,
                 select=None,
                 sort=None,
                 filter=None):
        print "viewName", viewName
        self.skinName = viewName[2]
        Screen.__init__(self, session)
        NumericalTextInput.__init__(self)
        self.skinName = viewName[2]
        self.select = select
        self.onFirstExecSort = sort
        self.onFirstExecFilter = filter

        self.libraryName = libraryName
        self.loadLibrary = loadLibrary
        self.viewName = viewName
        self._playEntry = playEntry

        self.playerData = None

        self.oldService = self.session.nav.getCurrentlyPlayingServiceReference(
        )
        self.session.nav.stopService()

        # Initialise API Level for this screen
        self.APILevel = 99
        printl("APILevel=" + str(self.APILevel))

        # Initialise library list
        list = []
        if self.APILevel == 1:
            self["listview"] = MenuList(list)
        elif self.APILevel >= 2:
            self["listview"] = List(list, True)

        if self.APILevel >= 6:
            self["number_key_popup"] = Label("")
            self["number_key_popup"].hide()

        self.seenPng = None
        self.unseenPng = None

        self["actions"] = HelpableActionMap(
            self, "DP_View", {
                "ok": (self.onKeyOk, ""),
                "cancel": (self.onKeyCancel, ""),
                "left": (self.onKeyLeft, ""),
                "right": (self.onKeyRight, ""),
                "left_quick": (self.onKeyLeftQuick, ""),
                "right_quick": (self.onKeyRightQuick, ""),
                "up": (self.onKeyUp, ""),
                "down": (self.onKeyDown, ""),
                "up_quick": (self.onKeyUpQuick, ""),
                "down_quick": (self.onKeyDownQuick, ""),
                "info": (self.onKeyInfo, ""),
                "menu": (self.onKeyMenu, ""),
                "red": (self.onKeyRed, ""),
                "green": (self.onKeyGreen, ""),
                "yellow": (self.onKeyYellow, ""),
                "blue": (self.onKeyBlue, ""),
                "red_long": (self.onKeyRedLong, ""),
                "green_long": (self.onKeyGreenLong, ""),
                "yellow_long": (self.onKeyYellowLong, ""),
                "blue_long": (self.onKeyBlueLong, ""),
                "1": (self.onKey1, ""),
                "2": (self.onKey2, ""),
                "3": (self.onKey3, ""),
                "4": (self.onKey4, ""),
                "5": (self.onKey5, ""),
                "6": (self.onKey6, ""),
                "7": (self.onKey7, ""),
                "8": (self.onKey8, ""),
                "9": (self.onKey9, ""),
                "0": (self.onKey0, ""),
            }, -2)

        # For number key input
        self.setUseableChars(u' 1234567890abcdefghijklmnopqrstuvwxyz')

        self.onLayoutFinish.append(self.setCustomTitle)
        self.onFirstExecBegin.append(self.onFirstExec)