本文整理汇总了Python中Plugins.Extensions.IPTVPlayer.components.configbase.ConfigBaseWidget类的典型用法代码示例。如果您正苦于以下问题:Python ConfigBaseWidget类的具体用法?Python ConfigBaseWidget怎么用?Python ConfigBaseWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ConfigBaseWidget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, session, operatingPlayer=False):
printDBG("ConfigExtMoviePlayer.__init__ -------------------------------")
self.list = [ ]
ConfigBaseWidget.__init__(self, session)
ConfigExtMoviePlayerBase.__init__(self)
self.setup_title = _("Configuring an external movie player")
self.operatingPlayer = operatingPlayer
示例2: __init__
def __init__(self, session, hostName):
printDBG("ConfigHostMenu.__init__ -------------------------------")
self.list = [ ]
self.hostName = hostName
ConfigBaseWidget.__init__(self, session)
self.setup_title = _("Configuration for service[%s]") % self.hostName
self.host = __import__('Plugins.Extensions.IPTVPlayer.hosts.host' + hostName, globals(), locals(), ['GetConfigList'], -1)
示例3: keyOK
def keyOK(self):
if self["config"].instance is None:
return
if self.reorderingEnabled:
if not self.reorderingMode:
self["config"].instance.setForegroundColorSelected(gRGB(0xFF0505))
self.reorderingMode = True
else:
self["config"].instance.setForegroundColorSelected(gRGB(0xFFFFFF))
self.reorderingMode = False
self.runSetup()
return
curIndex = self["config"].getCurrentIndex()
currItem = self["config"].list[curIndex][1]
if curIndex < len(self.listOfHostsNames):
hostName = self.listOfHostsNames[curIndex]
if self.hostsConfigsAvailableList[curIndex] and IsHostEnabled(hostName):
addConf = False
try:
self.host = __import__('Plugins.Extensions.IPTVPlayer.hosts.host' + hostName, globals(), locals(), ['GetConfigList'], -1)
if( len(self.host.GetConfigList()) < 1 ):
printDBG('ConfigMenu host "%s" does not have additional configs' % hostName)
else:
self.session.open(ConfigHostMenu, hostName = hostName)
addConf = True
except:
printExc('ConfigMenu host "%s" does not have method GetConfigList' % hostName)
if not addConf:
self.hostsConfigsAvailableList[curIndex] = False
self.onSelectionChanged()
self.session.open(MessageBox, _("Service [%s] has no additional settings.") % hostName, type=MessageBox.TYPE_INFO, timeout=5)
else:
ConfigBaseWidget.keyOK(self)
示例4: save
def save(self):
ConfigBaseWidget.save(self)
if self.showcoverOld != config.plugins.iptvplayer.showcover.value or \
self.SciezkaCacheOld != config.plugins.iptvplayer.SciezkaCache.value:
pass
# plugin must be restarted if we wont to this options take effect
if self.platformOld != config.plugins.iptvplayer.plarform.value:
IPTVPlayerNeedInit(True)
示例5: __init__
def __init__(self, session):
printDBG("ConfigMenu.__init__ -------------------------------")
self.list = [ ]
ConfigBaseWidget.__init__(self, session)
# remember old
self.showcoverOld = config.plugins.iptvplayer.showcover.value
self.SciezkaCacheOld = config.plugins.iptvplayer.SciezkaCache.value
self.platformOld = config.plugins.iptvplayer.plarform.value
示例6: onSelectionChanged
def onSelectionChanged(self):
currItem = self["config"].getCurrent()[1]
if currItem in [config.plugins.iptvplayer.fakePin, config.plugins.iptvplayer.fakeUpdate, config.plugins.iptvplayer.fakeHostsList]:
self.isOkEnabled = True
self.isSelectable = False
self.setOKLabel()
else:
ConfigBaseWidget.onSelectionChanged(self)
示例7: __init__
def __init__(self, session):
printDBG("ConfigMenu.__init__ -------------------------------")
self.list = [ ]
ConfigBaseWidget.__init__(self, session)
# remember old
self.showcoverOld = config.plugins.iptvplayer.showcover.value
self.SciezkaCacheOld = config.plugins.iptvplayer.SciezkaCache.value
self.platformOld = config.plugins.iptvplayer.plarform.value
self.remove_diabled_hostsOld = config.plugins.iptvplayer.remove_diabled_hosts.value
self.enabledHostsListOld = GetEnabledHostsList()
示例8: runSetup
def runSetup(self):
list = []
list.append(getConfigListEntry(_("Remember last watched position"), config.plugins.iptvplayer.remember_last_position))
if not self.operatingPlayer:
list.append(getConfigListEntry(_("External player use software decoder for the AAC"), config.plugins.iptvplayer.aac_software_decode))
if self.ac3_mix_avaliable:
list.append(getConfigListEntry(_("AC3 mix mode"), config.plugins.iptvplayer.ac3_mix))
if self.aac_mix_avaliable:
list.append(getConfigListEntry(_("AAC mix mode"), config.plugins.iptvplayer.aac_mix))
list.append(getConfigListEntry(_("External player infobar timeout"), config.plugins.iptvplayer.extplayer_infobar_timeout))
if self.aspect_avaliable:
list.append(getConfigListEntry(_("Default video aspect ratio"), config.plugins.iptvplayer.extplayer_aspect) )
if self.policy_avaliable:
list.append(getConfigListEntry(_("Default video policy"), config.plugins.iptvplayer.extplayer_policy) )
if self.policy2_avaliable:
list.append(getConfigListEntry(_("Default second video policy"), config.plugins.iptvplayer.extplayer_policy2) )
list.append(getConfigListEntry(_("Load automatically the subtitle from file with the same name"), config.plugins.iptvplayer.extplayer_subtitle_auto_enable) )
if not self.operatingPlayer:
list.append(getConfigListEntry(_("Subtitle line wrapping"), config.plugins.iptvplayer.extplayer_subtitle_wrapping_enabled) )
list.append(getConfigListEntry(_("Subtitle font"), config.plugins.iptvplayer.extplayer_subtitle_font) )
list.append(getConfigListEntry(_("Subtitle font size"), config.plugins.iptvplayer.extplayer_subtitle_font_size) )
if not config.plugins.iptvplayer.extplayer_subtitle_wrapping_enabled.value:
list.append(getConfigListEntry(_("Subtitle line height"), config.plugins.iptvplayer.extplayer_subtitle_line_height) )
list.append(getConfigListEntry(_("Line Spacing"), config.plugins.iptvplayer.extplayer_subtitle_line_spacing) )
elif 'transparent' != config.plugins.iptvplayer.extplayer_subtitle_background.value:
list.append(getConfigListEntry(_("Subtitle line height"), config.plugins.iptvplayer.extplayer_subtitle_line_height) )
list.append(getConfigListEntry(_("Subtitle font color"), config.plugins.iptvplayer.extplayer_subtitle_font_color) )
list.append(getConfigListEntry(_("Subtitle background"), config.plugins.iptvplayer.extplayer_subtitle_background) )
list.append(getConfigListEntry(_("Subtitle box position"), config.plugins.iptvplayer.extplayer_subtitle_pos) )
if config.plugins.iptvplayer.extplayer_subtitle_wrapping_enabled.value:
if 'transparent' == config.plugins.iptvplayer.extplayer_subtitle_background.value:
list.append(getConfigListEntry(_("Subtitle box height"), config.plugins.iptvplayer.extplayer_subtitle_box_height) )
list.append(getConfigListEntry(_("Subtitle vertical alignment"), config.plugins.iptvplayer.extplayer_subtitle_box_valign) )
if self.subtitle_border_avaliable:
list.append(getConfigListEntry(_("Subtitle border enabled"), config.plugins.iptvplayer.extplayer_subtitle_border_enabled) )
if config.plugins.iptvplayer.extplayer_subtitle_border_enabled.value:
list.append(getConfigListEntry(_("Subtitle border color"), config.plugins.iptvplayer.extplayer_subtitle_border_color) )
list.append(getConfigListEntry(_("Subtitle border width"), config.plugins.iptvplayer.extplayer_subtitle_border_width) )
list.append(getConfigListEntry(_("Subtitle shadow enabled"), config.plugins.iptvplayer.extplayer_subtitle_shadow_enabled) )
if config.plugins.iptvplayer.extplayer_subtitle_shadow_enabled.value:
list.append(getConfigListEntry(_("Subtitle shadow color"), config.plugins.iptvplayer.extplayer_subtitle_shadow_color) )
list.append(getConfigListEntry(_("Subtitle shadow X offset"), config.plugins.iptvplayer.extplayer_subtitle_shadow_xoffset) )
list.append(getConfigListEntry(_("Subtitle shadow Y offset"), config.plugins.iptvplayer.extplayer_subtitle_shadow_yoffset) )
self.list = list
ConfigBaseWidget.runSetup(self)
示例9: keyOK
def keyOK(self):
curIndex = self["config"].getCurrentIndex()
currItem = self["config"].list[curIndex][1]
if isinstance(currItem, ConfigDirectory):
def SetDirPathCallBack(curIndex, newPath):
if None != newPath: self["config"].list[curIndex][1].value = newPath
self.session.openWithCallback(boundFunction(SetDirPathCallBack, curIndex), IPTVDirectorySelectorWidget, currDir=currItem.value, title="Wybierz katalog")
elif config.plugins.iptvplayer.fakePin == currItem:
self.changePin(start = True)
elif config.plugins.iptvplayer.fakeUpdate == currItem:
self.keyUpdate()
elif config.plugins.iptvplayer.fakeHostsList == currItem:
self.hostsList()
else:
ConfigBaseWidget.keyOK(self)
示例10: runSetup
def runSetup(self):
self.list = []
ConfigMenu.fillConfigList(self.list, self.isHiddenOptionsUnlocked())
ConfigBaseWidget.runSetup(self)
示例11: isChanged
def isChanged(self):
if self.orgListOfHostsNames != self.listOfHostsNames:
return True
return ConfigBaseWidget.isChanged(self)
示例12: __onClose
def __onClose(self):
printDBG("ConfigMenu.__onClose -----------------------------")
ConfigBaseWidget.__onClose(self)
示例13: layoutFinished
def layoutFinished(self):
ConfigBaseWidget.layoutFinished(self)
self.setTitle("IPTV Player - ustawienia")
示例14: keyDown
def keyDown(self):
if self.reorderingMode:
printDBG(">>>>>>>>>>>>>>>>>>> keyDown")
self._moveItem(1)
ConfigBaseWidget.keyDown(self)
示例15: keyUp
def keyUp(self):
if self.reorderingMode:
printDBG(">>>>>>>>>>>>>>>>>>> keyUp")
self._moveItem(-1)
ConfigBaseWidget.keyUp(self)