当前位置: 首页>>代码示例>>Python>>正文


Python xbmcgui.WindowXMLDialog方法代码示例

本文整理汇总了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) 
开发者ID:CastagnaIT,项目名称:plugin.video.netflix,代码行数:18,代码来源:xmldialogs.py

示例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 
开发者ID:a4k-openproject,项目名称:plugin.program.openwizard,代码行数:26,代码来源:window.py

示例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 
开发者ID:a4k-openproject,项目名称:plugin.program.openwizard,代码行数:26,代码来源:window.py

示例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 
开发者ID:a4k-openproject,项目名称:plugin.program.openwizard,代码行数:27,代码来源:window.py

示例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) 
开发者ID:tacy,项目名称:plugin.video.xunleicloud,代码行数:19,代码来源:zhcnkbd.py

示例6: __init__

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import WindowXMLDialog [as 别名]
def __init__(self, *args, **kwargs):

        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:5,代码来源:serverconnect.py

示例7: __init__

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import WindowXMLDialog [as 别名]
def __init__(self, *args, **kwargs):
        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:4,代码来源:loginmanual.py

示例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) 
开发者ID:MediaBrowser,项目名称:plugin.video.emby,代码行数:6,代码来源:usersconnect.py

示例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) 
开发者ID:Zomboided,项目名称:service.vpn.manager,代码行数:6,代码来源:logbox.py

示例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) 
开发者ID:Zomboided,项目名称:service.vpn.manager,代码行数:7,代码来源:sysbox.py

示例11: __init__

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import WindowXMLDialog [as 别名]
def __init__(self, *args, **kwargs):
        self.metadatautils = MetadataUtils()
        xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs) 
开发者ID:kodi-community-addons,项目名称:plugin.audio.spotify,代码行数:5,代码来源:osd.py

示例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 
开发者ID:a4k-openproject,项目名称:plugin.program.openwizard,代码行数:34,代码来源:window.py

示例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 
开发者ID:a4k-openproject,项目名称:plugin.program.openwizard,代码行数:32,代码来源:window.py

示例14: doModal

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import WindowXMLDialog [as 别名]
def doModal(self, movieInfo):
        self.movieInfo = movieInfo
        xbmcgui.WindowXMLDialog.doModal(self) 
开发者ID:evgen-dev,项目名称:repository.evgen_dev.xbmc-addons,代码行数:5,代码来源:wmodal.py

示例15: doModal

# 需要导入模块: import xbmcgui [as 别名]
# 或者: from xbmcgui import WindowXMLDialog [as 别名]
def doModal(self, movieHtml):
        self.movieHtml = movieHtml
        xbmcgui.WindowXMLDialog.doModal(self) 
开发者ID:evgen-dev,项目名称:repository.evgen_dev.xbmc-addons,代码行数:5,代码来源:DialogReviews.py


注:本文中的xbmcgui.WindowXMLDialog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。