本文整理汇总了Python中PyQt4.Qsci.QsciLexerCustom.defaultColor方法的典型用法代码示例。如果您正苦于以下问题:Python QsciLexerCustom.defaultColor方法的具体用法?Python QsciLexerCustom.defaultColor怎么用?Python QsciLexerCustom.defaultColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qsci.QsciLexerCustom
的用法示例。
在下文中一共展示了QsciLexerCustom.defaultColor方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
"""QsciLexerCustom method implmentation. See QScintlla docs
"""
pygStyle = self._getPygStyle(style)
if not pygStyle or not pygStyle['color']:
return QsciLexerCustom.defaultColor(self, style)
return self._toQColor(pygStyle['color'])
示例2: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
if style == self.Default:
return QColor('#000000')
elif style == self.FirstLevelTitle:
return QColor('#FF0000')
elif style == self.SecundLevelTitle:
return QColor('#0000FF')
elif style == self.Green:
return QColor('#00FF00')
elif style == self.Digits:
return QColor('#AAAAAA')
return QsciLexerCustom.defaultColor(self, style)
示例3: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
if style == self.Default:
return QtGui.QColor("#ffffff")
elif style == self.ErrorInfo:
return QtGui.QColor("#E6DB74")
elif style == self.OutputInfo:
return QtGui.QColor("#FFFFFF")
elif style == self.ExitInfo:
return QtGui.QColor("#3DA3EF")
elif style == self.Start:
return QtGui.QColor("#7FE22A")
return QsciLexerCustom.defaultColor(self, style)
示例4: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
# print 'defaultColor', style
if style == self.Default:
return QColor('#000000')
elif style in self.__comment:
return QColor('#E5E5E5')
elif style == self.Digits:
print 'digit'
return QColor('#A52A2A')
elif style == self.from_and_for:
return QColor('#0000FF')
return QsciLexerCustom.defaultColor(self, style)
示例5: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
if style == self.Default:
return QColor("#2e3436")
elif style == self.Keyword:
return QColor("#204a87")
elif style == self.Comment:
return QColor("#c00")
elif style == self.Number:
return QColor("#4e9a06")
elif style == self.String:
return QColor("#ce5c00")
return QsciLexerCustom.defaultColor(self, style)
示例6: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
if style == self.Default:
return QColor('#000000')
elif style == self.Comment:
return QColor('#A0A0A0')
elif style == self.Section:
return QColor('#CC6600')
elif style == self.Key:
return QColor('#0000CC')
elif style == self.Assignment:
return QColor('#CC0000')
elif style == self.Value:
return QColor('#00CC00')
return QsciLexerCustom.defaultColor(self, style)
示例7: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
if style == self.Default:
return QColor('#000000')
elif style in self.__comment:
return QColor('#A0A0A0')
return QsciLexerCustom.defaultColor(self, style)
示例8: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, ix):
for i in self.styles:
if i.style() == ix:
return i.color()
return QsciLexerCustom.defaultColor(self, ix)
示例9: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
if style == self.Default:
return QColor('#000000')
elif style == self.Function:
return QColor('#C0C0C0')
return QsciLexerCustom.defaultColor(self, style)
示例10: defaultColor
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultColor [as 别名]
def defaultColor(self, style):
if style == self.Default:
return QColor("#000000")
elif style == self.Comment or style == self.Comment_End or style == self.Comment_Start:
return QColor("#A0A0A0")
return QsciLexerCustom.defaultColor(self, style)