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


Python Settings.getColor方法代码示例

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


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

示例1: setPalettes

# 需要导入模块: from Config import Settings [as 别名]
# 或者: from Config.Settings import getColor [as 别名]
 def setPalettes(self):
     self.palettes = {
         "wrong": QPalette(
             Qt.black,
             Qt.lightGray,
             Qt.lightGray,
             Qt.darkGray,
             Qt.gray,
             Settings.getColor("quiz_wrong_fg"),
             Qt.white,
             Settings.getColor("quiz_wrong_bg"),
             Qt.yellow,
         ),
         "right": QPalette(
             Qt.black,
             Qt.lightGray,
             Qt.lightGray,
             Qt.darkGray,
             Qt.gray,
             Settings.getColor("quiz_right_fg"),
             Qt.yellow,
             Settings.getColor("quiz_right_bg"),
             Qt.yellow,
         ),
         "inactive": QPalette(
             Qt.black,
             Qt.lightGray,
             Qt.lightGray,
             Qt.darkGray,
             Qt.gray,
             Qt.black,
             Qt.lightGray,
         ),
     }
     self.setPalette(self.palettes["inactive"])
开发者ID:gordonfierce,项目名称:amphetype,代码行数:37,代码来源:Quizzer.py

示例2: setPalettes

# 需要导入模块: from Config import Settings [as 别名]
# 或者: from Config.Settings import getColor [as 别名]
 def setPalettes(self):
     self.palettes = {
         'wrong': QPalette(Qt.black,
             Qt.lightGray, Qt.lightGray, Qt.darkGray, Qt.gray,
             Settings.getColor("quiz_wrong_fg"), Qt.white, Settings.getColor("quiz_wrong_bg"), Qt.yellow),
         'right': QPalette(Qt.black,
             Qt.lightGray, Qt.lightGray, Qt.darkGray, Qt.gray,
             Settings.getColor("quiz_right_fg"), Qt.yellow, Settings.getColor("quiz_right_bg"), Qt.yellow),
         'inactive': QPalette(Qt.black, Qt.lightGray, Qt.lightGray, Qt.darkGray,
                              Qt.gray, Qt.black, Qt.lightGray)}
     self.setPalette(self.palettes['inactive'])
开发者ID:fredizzimo,项目名称:amphetype,代码行数:13,代码来源:Quizzer.py

示例3: setPalettes

# 需要导入模块: from Config import Settings [as 别名]
# 或者: from Config.Settings import getColor [as 别名]
    def setPalettes(self):
        inactive_palette = QPalette(Qt.black,
                Settings.getColor("quiz_inactive_bd"), Qt.lightGray, Qt.darkGray, Qt.gray,
                Settings.getColor("quiz_inactive_fg"), Qt.yellow, Settings.getColor("quiz_inactive_bg"), Qt.yellow)

        inactive_palette.setColor(QPalette.Highlight, Settings.getColor("quiz_inactive_hl"))
        inactive_palette.setColor(QPalette.HighlightedText, Settings.getColor("quiz_inactive_hl_text"))
        self.palettes = {
            'wrong': QPalette(Qt.black,
                Settings.getColor("quiz_wrong_bd"), Qt.lightGray, Qt.darkGray, Qt.gray,
                Settings.getColor("quiz_wrong_fg"), Qt.white, Settings.getColor("quiz_wrong_bg"), Qt.yellow),
            'right': QPalette(Qt.black,
                Settings.getColor("quiz_right_bd"), Qt.lightGray, Qt.darkGray, Qt.gray,
                Settings.getColor("quiz_right_fg"), Qt.yellow, Settings.getColor("quiz_right_bg"), Qt.yellow),
            'invisible': QPalette(Qt.black,
                Settings.getColor("quiz_invisible_bd"), Qt.lightGray, Qt.darkGray, Qt.gray,
                Settings.getColor("quiz_invisible_color"), Qt.yellow, Settings.getColor("quiz_invisible_color"), Qt.yellow),
            'inactive':inactive_palette }
        self.setPalette(self.palettes['inactive']) 
开发者ID:eliasdorneles,项目名称:amphetype-backup,代码行数:21,代码来源:Quizzer.py


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