本文整理汇总了Python中PyQt4.Qsci.QsciLexerCustom.defaultFont方法的典型用法代码示例。如果您正苦于以下问题:Python QsciLexerCustom.defaultFont方法的具体用法?Python QsciLexerCustom.defaultFont怎么用?Python QsciLexerCustom.defaultFont使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.Qsci.QsciLexerCustom
的用法示例。
在下文中一共展示了QsciLexerCustom.defaultFont方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, style):
font = QsciLexerCustom.defaultFont(self, style)
if style == self.FirstLevelTitle or style == self.SecundLevelTitle:
font.setBold(True)
elif style == self.Green:
font.setBold(True)
font.setUnderline(True)
return font
示例2: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, style):
# if style in self.__comment:
# if sys.platform in ('win32', 'cygwin'):
# return QFont('Comic Sans MS', 9, QFont.Bold)
# return QFont('Bitstream Vera Serif', 9, QFont.Bold)
# return QsciLexerCustom.defaultFont(self, style)
font = QsciLexerCustom.defaultFont(self, style)
if style == self.Digits:
font.setBold(True)
# print 'defaultFont', style
return font
示例3: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, style):
if style == self.Default:
return Global.getDefaultFont()
elif style == self.ErrorInfo:
return Global.getDefaultFont()
elif style == self.OutputInfo:
return Global.getDefaultFont()
elif style == self.ExitInfo:
return Global.getDefaultFont()
elif style == self.Start:
return Global.getDefaultFont()
return QsciLexerCustom.defaultFont(self, style)
示例4: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, style):
if style == self.Default:
return Global.getDefaultFont()
elif style == self.NewText:
return Global.getDefaultFont()
elif style == self.DeletedText:
return Global.getDefaultFont()
elif style == self.ReplacedText:
return Global.getDefaultFont()
elif style == self.LineNumber:
return Global.getDefaultFont()
return QsciLexerCustom.defaultFont(self, style)
示例5: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, style):
"""QsciLexerCustom method implmentation. See QScintlla docs
"""
font = QsciLexerCustom.defaultFont(self, style)
pygStyle = self._getPygStyle(style)
if not pygStyle:
return font
font.setBold(pygStyle['bold'])
font.setItalic(pygStyle['italic'])
font.setUnderline(pygStyle['underline'])
return font
示例6: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, style):
if style in self.__comment:
if sys.platform in ('win32', 'cygwin'):
return QFont('Comic Sans MS', 9, QFont.Bold)
return QFont('Bitstream Vera Serif', 9, QFont.Bold)
return QsciLexerCustom.defaultFont(self, style)
示例7: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, ix):
for i in self.styles:
if i.style() == ix:
return i.font()
return QsciLexerCustom.defaultFont(self, ix)
示例8: defaultFont
# 需要导入模块: from PyQt4.Qsci import QsciLexerCustom [as 别名]
# 或者: from PyQt4.Qsci.QsciLexerCustom import defaultFont [as 别名]
def defaultFont(self, style):
if style == self.Comment or style == self.Comment_End:
if sys.platform in ("win32", "cygwin"):
return QFont("Comic Sans MS", 9, QFont.Bold)
return QFont("Bitstream Vera Serif", 9, QFont.Bold)
return QsciLexerCustom.defaultFont(self, style)