本文整理汇总了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"])
示例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'])
示例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'])