本文整理匯總了Python中xbmcgui.WindowXMLDialog方法的典型用法代碼示例。如果您正苦於以下問題:Python xbmcgui.WindowXMLDialog方法的具體用法?Python xbmcgui.WindowXMLDialog怎麽用?Python xbmcgui.WindowXMLDialog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類xbmcgui
的用法示例。
在下文中一共展示了xbmcgui.WindowXMLDialog方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
self.skip_to = kwargs['skip_to']
self.label = kwargs['label']
self.action_exitkeys_id = [ACTION_PREVIOUS_MENU,
ACTION_PLAYER_STOP,
ACTION_NAV_BACK,
ACTION_NOOP]
if get_machine()[0:5] == 'armv7':
xbmcgui.WindowXMLDialog.__init__(self)
else:
try:
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
except Exception: # pylint: disable=broad-except
xbmcgui.WindowXMLDialog.__init__(self)
示例2: show_text_box
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def show_text_box(title, msg):
class TextBox(xbmcgui.WindowXMLDialog):
def onInit(self):
self.title = 101
self.msg = 102
self.scrollbar = 103
self.closebutton = 201
self.setProperty('texture.color1', CONFIG.COLOR1)
self.setProperty('texture.color2', CONFIG.COLOR2)
self.setProperty('message.title', title)
self.setProperty('message.msg', msg)
def onClick(self, controlid):
if controlid == self.closebutton:
self.close()
def onAction(self, action):
if action.getId() in BACK_ACTIONS:
self.close()
tb = TextBox("text_box.xml", CONFIG.ADDON_PATH, 'Default', title=title, msg=msg)
tb.doModal()
del tb
示例3: show_apk_warning
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def show_apk_warning(apk):
class APKInstaller(xbmcgui.WindowXMLDialog):
def __init__(self, *args, **kwargs):
self.shut = kwargs['close_time']
xbmc.executebuiltin("Skin.Reset(AnimeWindowXMLDialogClose)")
xbmc.executebuiltin("Skin.SetBool(AnimeWindowXMLDialogClose)")
def onClick(self, controlid):
self.close_window()
def onAction(self, action):
if action.getId() in BACK_ACTIONS:
self.close_window()
def close_window(self):
xbmc.executebuiltin("Skin.Reset(AnimeWindowXMLDialogClose)")
xbmc.sleep(400)
self.close()
xbmc.executebuiltin('Skin.SetString(apkinstaller, Now that {0} has been downloaded[CR]Click install on the next window!)'.format(apk))
popup = APKInstaller('APK.xml', CONFIG.ADDON_PATH, 'Default', close_time=34)
popup.doModal()
del popup
示例4: show_speed_test
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def show_speed_test(img):
class SpeedTest(xbmcgui.WindowXMLDialog):
def __init__(self, *args, **kwargs):
self.imgfile = kwargs['img']
def onInit(self):
self.imagespeed = 101
self.button = 201
self.show_dialog()
def show_dialog(self):
self.setFocus(self.getControl(self.button))
self.getControl(self.imagespeed).setImage(self.imgfile)
def onClick(self, controlid):
self.close()
def onAction(self, action):
if action.getId() in BACK_ACTIONS:
self.close()
popup = SpeedTest('SpeedTest.xml', CONFIG.ADDON_PATH, 'Default', img=img)
popup.doModal()
del popup
示例5: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
self.totalpage = 0
self.nowpage = 0
self.words = ''
self.py = ''
self.bg = 0
self.ed = 20
self.wordpgs = [] # word page metadata
self.inputString = kwargs.get("default") or ""
self.heading = kwargs.get("heading") or ""
self.conn = httplib.HTTPConnection('olime.baidu.com')
self.headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) {0}{1}'.format(
'AppleWebKit/537.36 (KHTML, like Gecko) ',
'Chrome/28.0.1500.71 Safari/537.36'),
}
xbmcgui.WindowXMLDialog.__init__(self)
示例6: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
示例7: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
示例8: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
self.kodi_version = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
示例9: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
self.caption = kwargs.get("caption", "")
self.text = kwargs.get("text", "")
xbmcgui.WindowXMLDialog.__init__(self)
示例10: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
self.caption = kwargs.get("caption", "")
self.text_left = kwargs.get("text_left", "")
self.text_right = kwargs.get("text_right", "")
xbmcgui.WindowXMLDialog.__init__(self)
示例11: __init__
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def __init__(self, *args, **kwargs):
self.metadatautils = MetadataUtils()
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
示例12: show_contact
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def show_contact(msg=""):
class ContactWindow(xbmcgui.WindowXMLDialog):
def __init__(self, *args, **kwargs):
self.title = CONFIG.THEME3.format(kwargs["title"])
self.image = kwargs["image"]
self.fanart = kwargs["fanart"]
self.msg = CONFIG.THEME2.format(kwargs["msg"])
def onInit(self):
self.fanartimage = 101
self.titlebox = 102
self.imagecontrol = 103
self.textbox = 104
self.scrollcontrol = 105
self.show_dialog()
def show_dialog(self):
self.getControl(self.imagecontrol).setImage(self.image)
self.getControl(self.fanartimage).setImage(self.fanart)
self.getControl(self.fanartimage).setColorDiffuse('9FFFFFFF')
self.getControl(self.textbox).setText(self.msg)
self.getControl(self.titlebox).setLabel(self.title)
self.setFocusId(self.scrollcontrol)
def onAction(self, action):
if action.getId() in BACK_ACTIONS:
self.close()
cw = ContactWindow("Contact.xml", CONFIG.ADDON_PATH, 'Default', title=CONFIG.ADDONTITLE, fanart=CONFIG.CONTACTFANART,
image=CONFIG.CONTACTICON, msg=msg)
cw.doModal()
del cw
示例13: show_qr_code
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def show_qr_code(layout, imagefile, message):
class QRCode(xbmcgui.WindowXMLDialog):
def __init__(self, *args, **kwargs):
self.image = kwargs["image"]
self.text = kwargs["text"]
def onInit(self):
self.imagecontrol = 501
self.textbox = 502
self.okbutton = 503
self.title = 504
self.show_dialog()
def show_dialog(self):
self.getControl(self.imagecontrol).setImage(self.image)
self.getControl(self.textbox).setText(self.text)
self.getControl(self.title).setLabel(CONFIG.ADDONTITLE)
self.setFocus(self.getControl(self.okbutton))
def onClick(self, controlid):
if controlid == self.okbutton:
self.close()
def onAction(self, action):
if action.getId() in BACK_ACTIONS:
self.close()
qr = QRCode(layout, CONFIG.ADDON_PATH, 'Default', image=imagefile, text=message)
qr.doModal()
del qr
示例14: doModal
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def doModal(self, movieInfo):
self.movieInfo = movieInfo
xbmcgui.WindowXMLDialog.doModal(self)
示例15: doModal
# 需要導入模塊: import xbmcgui [as 別名]
# 或者: from xbmcgui import WindowXMLDialog [as 別名]
def doModal(self, movieHtml):
self.movieHtml = movieHtml
xbmcgui.WindowXMLDialog.doModal(self)