當前位置: 首頁>>代碼示例>>Python>>正文


Python skin.TemplatedListFonts類代碼示例

本文整理匯總了Python中skin.TemplatedListFonts的典型用法代碼示例。如果您正苦於以下問題:Python TemplatedListFonts類的具體用法?Python TemplatedListFonts怎麽用?Python TemplatedListFonts使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TemplatedListFonts類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

	def __init__(self, type=EPG_TYPE_SINGLE, selChangedCB=None, timer = None):
		self.days = (_("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun"))
		self.timer = timer
		self.onSelChanged = [ ]
		if selChangedCB is not None:
			self.onSelChanged.append(selChangedCB)
		GUIComponent.__init__(self)
		self.type=type
		self.l = eListboxPythonMultiContent()

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))

		if type == EPG_TYPE_SINGLE:
			self.l.setBuildFunc(self.buildSingleEntry)
		elif type == EPG_TYPE_MULTI:
			self.l.setBuildFunc(self.buildMultiEntry)
		else:
			assert(type == EPG_TYPE_SIMILAR)
			self.l.setBuildFunc(self.buildSimilarEntry)
		self.epgcache = eEPGCache.getInstance()
		self.clock_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png'))
		self.clock_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png'))
		self.clock_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png'))
		self.clock_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png'))
		self.clock_prepost_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png'))
開發者ID:popazerty,項目名稱:12,代碼行數:27,代碼來源:EpgList.py

示例2: __init__

	def __init__(self, session):
		Screen.__init__(self, session)
		HelpableScreen.__init__(self)
		ChannelsBase.__init__(self)
		
		self.session = session
		
		self.skinName = [ "SeriesPluginChannelEditor" ]
		
		from plugin import NAME, VERSION
		self.setup_title = NAME + " " + _("Channel Editor") + " " + VERSION
		
		# Buttons
		self["key_red"] = Button(_("Cancel"))
		self["key_green"] = Button(_("OK"))
		self["key_blue"] = Button(_("Remove"))
		self["key_yellow"] = Button(_("Auto match"))
		
		# Define Actions
		self["actions_1"] = HelpableActionMap(self, "SetupActions", {
			"ok"       : (self.keyAdd, _("Show popup to add Stb Channel")),
			"cancel"   : (self.keyCancel, _("Cancel and close")),
			"deleteForward"   : (self.keyResetChannelMapping, _("Reset channels")),
		}, -1)
		self["actions_2"] = HelpableActionMap(self, "DirectionActions", {
			"left"     : (self.keyLeft, _("Previeous page")),
			"right"    : (self.keyRight, _("Next page")),
			"up"       : (self.keyUp, _("One row up")),
			"down"     : (self.keyDown, _("One row down")),
		}, -1)
		self["actions_3"] = HelpableActionMap(self, "ColorActions", {
			"red"      : (self.keyCancel, _("Cancel and close")),
			"green"    : (self.keySave, _("Save and close")),
			"blue"     : (self.keyRemove, _("Remove channel")),
			"yellow"   : (self.tryToMatchChannels, _("Auto match")),
		}, -2) # higher priority
		
		self.helpList[0][2].sort()

		self["helpActions"] = ActionMap(["HelpActions",], {
			"displayHelp"      : self.showHelp
		}, 0)

		self.chooseMenuList = MenuList([], enableWrapAround=True, content=eListboxPythonMultiContent)
		global TemplatedListFonts
		if TemplatedListFonts is not None:
			tlf = TemplatedListFonts()
			self.chooseMenuList.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
			self.chooseMenuList.l.setItemHeight(30)
		else:
			self.chooseMenuList.l.setFont(0, gFont('Regular', 20 ))
			self.chooseMenuList.l.setItemHeight(25)
		self['list'] = self.chooseMenuList
		self['list'].show()

		self.stbChlist = []
		self.webChlist = []
		self.stbToWebChlist = []
		
		self.onLayoutFinish.append(self.readChannels)
開發者ID:Koernia,項目名稱:e2openplugin-SeriesPlugin,代碼行數:60,代碼來源:ChannelEditor.py

示例3: __init__

	def __init__(self, getPlaylistEntriesCB):
		MenuList.__init__(self, list, False, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(25)
		self.l.setBuildFunc(self.buildListboxEntry)
		self.getPlaylistEntriesCB = getPlaylistEntriesCB
開發者ID:dpuschek,項目名稱:enigma2-plugins,代碼行數:7,代碼來源:VlcPlayList.py

示例4: __init__

	def __init__(self, session):
		Screen.__init__(self, session)
		self["Canvas"] = CanvasSource()

		self.basic_colors = [RGB(255, 255, 255), RGB(255, 255, 0), RGB(0, 255, 255), RGB(0, 255, 0), RGB(255, 0, 255), RGB(255, 0, 0), RGB(0, 0, 255), RGB(0, 0, 0)]
		tlf = TemplatedListFonts()
		self._textFont = gFont(tlf.face(tlf.BIGGER), tlf.size(tlf.BIGGER))

		self._headerSize = tlf.size(tlf.BIGGER) * 2
		self._headerFont = gFont(tlf.face(tlf.BIGGER), self._headerSize)
		self._headerSize = int(self._headerSize * 1.5)

		self["actions"] = ActionMap(["InputActions", "OkCancelActions"],
		{
			"1": self.testpic_brightness,
			"2": self.testpic_contrast,
#			"3": self.testpic_colors,
			"3": self.testpic_filter,
			"4": self.testpic_gamma,
			"5": self.testpic_fubk,
			"ok": self.callNext,
			"cancel": self.close,
		})

		self._size = None
		self.next = None
		self._clear()
		self.onLayoutFinish.append(self._onLayoutFinish)
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:28,代碼來源:VideoFinetune.py

示例5: __init__

	def __init__(self, type=EPG_TYPE_SINGLE, selChangedCB=None, timer = None):
		self.days = (_("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat"), _("Sun"))
		self.timer = timer
		self.onSelChanged = [ ]
		if selChangedCB is not None:
			self.onSelChanged.append(selChangedCB)
		GUIComponent.__init__(self)
		self.type=type
		self.l = eListboxPythonMultiContent()

		tlf = TemplatedListFonts()
		self._font0 = gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG))
		self._font1 = gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL))
		self.l.setFont(0, self._font0)
		self.l.setFont(1, self._font1)
		self._textRenderer = None

		sizes = componentSizes[EPGList.SKIN_COMPONENT_KEY]
		self._iconWidth = sizes.get(EPGList.SKIN_COMPONENT_ICON_WIDTH, 21)
		self._iconHeight = sizes.get(EPGList.SKIN_COMPONENT_ICON_HEIGHT, 21)
		self._iconHPos = sizes.get(EPGList.SKIN_COMPONENT_ICON_HPOS, 4)
		self._itemMargin = sizes.get(EPGList.SKIN_COMPONENT_ITEM_MARGIN, 10)

		if type in (EPG_TYPE_SINGLE, EPG_TYPE_SIMILAR):
			self.l.setBuildFunc(self.buildSingleEntry)
		else:
			assert(type == EPG_TYPE_MULTI)
			self.l.setBuildFunc(self.buildMultiEntry)

		self.epgcache = eEPGCache.getInstance()
		self.clock_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock.png'))
		self.clock_add_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_add.png'))
		self.clock_pre_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_pre.png'))
		self.clock_post_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_post.png'))
		self.clock_prepost_pixmap = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, 'skin_default/icons/epgclock_prepost.png'))
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:35,代碼來源:EpgList.py

示例6: __init__

	def __init__(self, list, selection = 0, enableWrapAround=False):
		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		itemHeight = componentSizes.itemHeight(componentSizes.CHOICELIST, 30)
		self.l.setItemHeight(itemHeight)
		self.selection = selection
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:8,代碼來源:ChoiceList.py

示例7: __init__

	def __init__(self):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.l.setBuildFunc(self.buildList)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
		self.l.setItemHeight(componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 77))
開發者ID:Dog6574,項目名稱:enigma2-plugins,代碼行數:8,代碼來源:plugin.py

示例8: postWidgetCreate

	def postWidgetCreate(self, instance):
		instance.setWrapAround(True)
		self.selectionChanged_conn = instance.selectionChanged.connect(self.serviceChanged)
		instance.setContent(self.l)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setFont(1, gFont(tlf.face(tlf.SMALL), tlf.size(tlf.SMALL)))
		self.l.setSelectionClip(eRect(0,0,0,0), False)
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:8,代碼來源:GraphMultiEpg.py

示例9: __init__

	def __init__(self, enableWrapAround = False):
		MenuList.__init__(self, [], enableWrapAround, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(componentSizes.itemHeight(self.SKIN_COMPONENT_KEY, 23))
		self.currPlaying = -1
		self.oldCurrPlaying = -1
		self.serviceHandler = eServiceCenter.getInstance()
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:8,代碼來源:MediaPlayer.py

示例10: __init__

	def __init__(self):
		GUIComponent.__init__(self)
		sizes = componentSizes[componentSizes.TIMELINE_TEXT]
		height = sizes.get(componentSizes.ITEM_HEIGHT, 25)
		self.l = eListboxPythonMultiContent()
		self.l.setSelectionClip(eRect(0, 0, 0, 0))
		self.l.setItemHeight(height);
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:9,代碼來源:GraphMultiEpg.py

示例11: __init__

	def __init__(self, entries):
		MenuList.__init__(self, entries, False, content = eListboxPythonMultiContent)

		self.l.setFont(0, gFont("Regular", 22))
		self.l.setBuildFunc(self.buildListboxEntry)
		self.l.setItemHeight(25)
		self.colorDisabled = 12368828
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
開發者ID:dpuschek,項目名稱:enigma2-plugins,代碼行數:9,代碼來源:AutoTimerList.py

示例12: __init__

	def __init__(self, getFilesAndDirsCB, baseDir, matchingPattern):
		MenuList.__init__(self, list, False, eListboxPythonMultiContent)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(25)
		self.l.setBuildFunc(self.buildListboxEntry)
		self.currentDirectory = baseDir
		self.getFilesAndDirsCB = getFilesAndDirsCB
		self.changeRegex(matchingPattern)
開發者ID:dpuschek,項目名稱:enigma2-plugins,代碼行數:9,代碼來源:VlcFileList.py

示例13: __init__

	def __init__(self, source):
		GUIComponent.__init__(self)
		self.l = eListboxPythonMultiContent()
		self.list = source
		self.l.setList(self.list)
		
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		itemHeight = componentSizes.itemHeight(componentSizes.SERVICE_INFO_LIST, 30)
		self.l.setItemHeight(itemHeight)
		self.serviceHandler = eServiceCenter.getInstance()
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:11,代碼來源:ServiceInfoList.py

示例14: __init__

	def __init__(self, helplist, callback):
		GUIComponent.__init__(self)
		self.onSelChanged = [ ]
		self.l = eListboxPythonMultiContent()
		self.callback = callback
		self.extendedHelp = False

		l = [ ]
		sizes = componentSizes[componentSizes.HELP_MENU_LIST]
		textX = sizes.get("textX", 5)
		textY = sizes.get("textY", 35)
		textWidth = sizes.get("textWidth", 1000)
		textHeight = sizes.get("textHeight", 35)
		for (actionmap, context, actions) in helplist:
			if not actionmap.enabled:
				continue
			for (action, help) in actions:
				buttons = queryKeyBinding(context, action)

				# do not display entries which are not accessible from keys
				if not len(buttons):
					continue

				name = None
				flags = 0

				for n in buttons:
					(name, flags) = (getKeyDescription(n[0]), n[1])
					if name is not None:
						break

				if flags & 8: # for long keypresses, prepend l_ into the key name.
					name = (name[0], "long")
					
				entry = [ (actionmap, context, action, name ) ]

				if isinstance(help, list):
					self.extendedHelp = True
					print "extendedHelpEntry found"
					entry.extend((
						(eListboxPythonMultiContent.TYPE_TEXT, 0, 0, textWidth, textHeight, 0, RT_VALIGN_CENTER, help[0]),
						(eListboxPythonMultiContent.TYPE_TEXT, 0, textY, textWidth, textHeight, 1, RT_VALIGN_CENTER, help[1])
					))
				else:
					entry.append( (eListboxPythonMultiContent.TYPE_TEXT, textX, 0, textWidth, textHeight, 0, RT_VALIGN_CENTER, help) )
					
				l.append(entry)

		self.l.setList(l)

		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.BIG), tlf.size(tlf.BIG)))
		self.l.setFont(1, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.l.setItemHeight(sizes.get(componentSizes.ITEM_HEIGHT, 30))
開發者ID:OpenDMM,項目名稱:enigma2,代碼行數:54,代碼來源:HelpMenuList.py

示例15: __init__

	def __init__(self, preselectedFiles, directory, showMountpoints = False, matchingPattern = None, showDirectories = True, showFiles = True,  useServiceRef = False, inhibitDirs = False, inhibitMounts = False, isTop = False, enableWrapAround = False, additionalExtensions = None):
		self.selectedFiles = preselectedFiles
		if self.selectedFiles is None:
			self.selectedFiles = []
		FileList.__init__(self, directory, showMountpoints = showMountpoints, matchingPattern = matchingPattern, showDirectories = showDirectories, showFiles = showFiles,  useServiceRef = useServiceRef, inhibitDirs = inhibitDirs, inhibitMounts = inhibitMounts, isTop = isTop, enableWrapAround = enableWrapAround, additionalExtensions = additionalExtensions)
		self.changeDir(directory)

		itemHeight = componentSizes.itemHeight(componentSizes.MULTI_FILE_SELECT_LIST, 25)
		self.l.setItemHeight(itemHeight)
		tlf = TemplatedListFonts()
		self.l.setFont(0, gFont(tlf.face(tlf.MEDIUM), tlf.size(tlf.MEDIUM)))
		self.onSelectionChanged = [ ]
開發者ID:popazerty,項目名稱:12,代碼行數:12,代碼來源:FileList.py


注:本文中的skin.TemplatedListFonts類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。