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


Python GUI_SETTINGS.lookup方法代码示例

本文整理汇总了Python中gui.GUI_SETTINGS.lookup方法的典型用法代码示例。如果您正苦于以下问题:Python GUI_SETTINGS.lookup方法的具体用法?Python GUI_SETTINGS.lookup怎么用?Python GUI_SETTINGS.lookup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gui.GUI_SETTINGS的用法示例。


在下文中一共展示了GUI_SETTINGS.lookup方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: getURL

# 需要导入模块: from gui import GUI_SETTINGS [as 别名]
# 或者: from gui.GUI_SETTINGS import lookup [as 别名]
 def getURL(self, name, callback):
     urlSettings = GUI_SETTINGS.lookup(name)
     if urlSettings:
         url = yield self.__urlMarcos.parse(str(urlSettings))
     else:
         url = yield lambda callback: callback('')
     callback(url)
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:9,代码来源:externallinkshandler.py

示例2: quality

# 需要导入模块: from gui import GUI_SETTINGS [as 别名]
# 或者: from gui.GUI_SETTINGS import lookup [as 别名]
 def quality(self):
     boosterQualityValues = GUI_SETTINGS.lookup(self.boosterGuiType) or _BOOSTER_QUALITY_VALUES
     if self.effectValue >= boosterQualityValues[BOOSTER_QUALITY_NAMES.BIG]:
         return BOOSTER_QUALITY_NAMES.BIG
     elif self.effectValue >= boosterQualityValues[BOOSTER_QUALITY_NAMES.MEDIUM]:
         return BOOSTER_QUALITY_NAMES.MEDIUM
     else:
         return BOOSTER_QUALITY_NAMES.SMALL
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:10,代码来源:booster.py

示例3: _getClubEmblemUrl

# 需要导入模块: from gui import GUI_SETTINGS [as 别名]
# 或者: from gui.GUI_SETTINGS import lookup [as 别名]
def _getClubEmblemUrl(emblemID, size):
    try:
        urlPattern = GUI_SETTINGS.lookup('clubEmblems')
        if urlPattern and emblemID:
            return urlPattern % {'emblemID': emblemID,
             'size': size}
    except:
        LOG_CURRENT_EXCEPTION()
开发者ID:kblw,项目名称:wot_client,代码行数:10,代码来源:emblems.py

示例4: canChangeWebSettings

# 需要导入模块: from gui import GUI_SETTINGS [as 别名]
# 或者: from gui.GUI_SETTINGS import lookup [as 别名]
 def canChangeWebSettings(self, profile, club = None):
     url = GUI_SETTINGS.lookup('clubSettings')
     if not url:
         return error(_CCR.DEFAULT)
     else:
         if club is not None:
             permissions = club.getPermissions()
             if not permissions.canChangeWebSettings():
                 return error(_CCR.DEFAULT)
             if club.getTotalDossier().getTotalStats().getBattlesCount() < CLUB_LIMITS.MIN_BATTLES_COUNT_TO_CHANGE_NAME:
                 return error(_CCR.NOT_ENOUGH_RATED_BATTLES)
         return success()
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:14,代码来源:restrictions.py

示例5: canChangeWebSettings

# 需要导入模块: from gui import GUI_SETTINGS [as 别名]
# 或者: from gui.GUI_SETTINGS import lookup [as 别名]
    def canChangeWebSettings(self, profile, club = None):
        url = GUI_SETTINGS.lookup('clubSettings')
        if not url:
            return error(_CCR.DEFAULT)
        if club is not None:
            for rID in {_CRT.CHANGE_CLUB_NAME, _CRT.CHANGE_CLUB_EMBLEM}:
                result = self._isClubRequestValid(rID, club, 'canChangeWebSettings')
                if result.success:
                    return result

            return error(_CCR.NOT_ENOUGH_RATED_BATTLES)
        return success()
开发者ID:kblw,项目名称:wot_client,代码行数:14,代码来源:restrictions.py

示例6: __init__

# 需要导入模块: from gui import GUI_SETTINGS [as 别名]
# 或者: from gui.GUI_SETTINGS import lookup [as 别名]
 def __init__(self, proxy):
     super(EncyclopediaController, self).__init__(proxy)
     self.__activated = False
     self.__recommendations = []
     self.__eventManager = Event.EventManager()
     self.__urlMacros = URLMarcos()
     self.__isLobbyStarted = False
     self.__hasNewRecommendations = False
     if GUI_SETTINGS.lookup('encyclopedia'):
         self.__baseUrl = GUI_SETTINGS.encyclopedia['url']
         self.__isSuitableLanguage = GUI_SETTINGS.encyclopedia['enabled']
     else:
         self.__baseUrl = None
         self.__isSuitableLanguage = False
     self.onNewRecommendationReceived = Event.Event(self.__eventManager)
     self.onStateChanged = Event.Event(self.__eventManager)
     self.__isStateSynced = False
     return
开发者ID:aevitas,项目名称:wotsdk,代码行数:20,代码来源:game_controlprmp_controller.py

示例7: onConnected

# 需要导入模块: from gui import GUI_SETTINGS [as 别名]
# 或者: from gui.GUI_SETTINGS import lookup [as 别名]
 def onConnected(self):
     if GUI_SETTINGS.lookup('encyclopedia'):
         self.__baseUrl = GUI_SETTINGS.encyclopedia['url']
         self.__isSuitableLanguage = GUI_SETTINGS.encyclopedia['enabled']
开发者ID:aevitas,项目名称:wotsdk,代码行数:6,代码来源:game_controlprmp_controller.py


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