def __init__(self, parent=None): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'Function', } for key, value in self._styles.iteritems(): setattr(self, value, key)
def __init__(self, parent): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'Comment', 2: 'Section', 3: 'Key', 4: 'Assignment',def defaultText(self,text): print text 5: 'Value', }
def __init__(self, parent): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'FirstLevelTitle', 2: 'SecundLevelTitle', 3: 'Green', 4: 'Digits' } for key,value in self._styles.iteritems(): setattr(self, value, key)
def __init__(self, parent): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'Comment_Start', 2: 'Comment', 3: 'Comment_End' } for key, value in self._styles.items(): setattr(self, value, key) self._foldcompact = True
def __init__(self, parent): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'FirstLevelTitle', 2: 'SecundLevelTitle', 3: 'Green', 4: 'Digits' } for key, value in self._styles.iteritems(): setattr(self, value, key)
def __init__(self, parent=None): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'ErrorInfo', 2: 'OutputInfo', 3: 'ExitInfo', 4: 'Start' } for key in self._styles: setattr(self, self._styles[key], key)
def __init__(self, parent=None): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'NewText', 2: 'DeletedText', 3: 'ReplacedText', 4: 'LineNumber' } for key in self._styles: setattr(self, self._styles[key], key)
def __init__(self, parent=None): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'Keyword', 2: 'Comment', 3: 'Number', 4: 'String', } for (k, v) in self._styles.iteritems(): setattr(self, v, k)
def __init__(self, parent): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'Comment', 2: 'Section', 3: 'Key', 4: 'Assignment', 5: 'Value', } for key,value in self._styles.iteritems(): setattr(self, value, key) self._foldcompact = True
def defaultPaper(self, style): # Here we change the color of the background. # We want to colorize all the background of the line. # This is done by using the following method defaultEolFill() . if style in self.__comment: return QColor('#FFEECC') return QsciLexerCustom.defaultPaper(self, style)
def defaultPaper(self, style): # Here we change the color of the background. # We want that colorize all the background of the line. # This is done by using the following method defaultEolFill() . if style == self.Comment or style == self.Comment_End or style == self.Comment_Start: return QColor('#FFEECC') return QsciLexerCustom.defaultPaper(self, style)
def __init__(self, parent): QsciLexerCustom.__init__(self, parent) self._styles = { 0: 'Default', 1: 'MultiLinesComment_Start', 2: 'MultiLinesComment', 3: 'MultiLinesComment_End', 4: 'SingleLineComment' } for key,value in self._styles.iteritems(): setattr(self, value, key) self._foldcompact = True self.__comment = [self.MultiLinesComment, self.MultiLinesComment_End, self.MultiLinesComment_Start, self.SingleLineComment]
def defaultPaper(self, style): # Here we change the color of the background. # We want that colorize all the background of the line. # This is done by using the following method defaultEolFill() . if style == self.Comment or style == self.Comment_End or style == self.Comment_Start: return QColor("#FFEECC") return QsciLexerCustom.defaultPaper(self, style)
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'])
def defaultPaper(self, style): # Here we change the color of the background. # We want to colorize all the background of the line. # This is done by using the following method defaultEolFill() . if style == self.SecundLevelTitle: return QColor('#FFFF99') elif style == self.Digits: return QColor('#FFCC66') return QsciLexerCustom.defaultPaper(self, style)
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
def __init__(self, parent = None, language = None): """language is language name as recognized by pygments """ QsciLexerCustom.__init__(self, parent) self._lexer = None self._tokenCache = None self._lastBusyId = -1 self._language = 'Scheme' if parent is not None: self._lexer = self._guessLexer(parent.text()) self._style = pygments.styles.get_style_by_name('default') self.TOKEN_TO_QSTYLE = dict([(token, self._getNextStyleId()) for token in pygments.token.STANDARD_TYPES]) self.QSTYLE_TO_TOKEN = dict([(v, k) for k, v in self.TOKEN_TO_QSTYLE.items()]) if parent is not None: parent.textChanged.connect(self._onTextChanged)
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
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)
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)
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)
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)
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)
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)
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
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)
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)
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)
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)
def defaultFont(self, style): if style == self.Comment: if sys.platform in ('win32', 'cygwin'): return QFont('Comic Sans MS', 9) return QFont('Bitstream Vera Serif', 9) return QsciLexerCustom.defaultFont(self, style)
def defaultEolFill(self, style): # This allowed to colorize all the background of a line. if style in self.__comment: return True return QsciLexerCustom.defaultEolFill(self, style)
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)
def defaultEolFill(self, style): if style == self.Section: return True return QsciLexerCustom.defaultEolFill(self, style)
def defaultEolFill(self, ix): for i in self.styles: if i.style() == ix: return i.eolFill() return QsciLexerCustom.defaultEolFill(self, ix)
def defaultPaper(self, ix): for i in self.styles: if i.style() == ix: return i.paper() return QsciLexerCustom.defaultPaper(self, ix)
def defaultFont(self, ix): for i in self.styles: if i.style() == ix: return i.font() return QsciLexerCustom.defaultFont(self, ix)
def defaultEolFill(self, style): # This allowed to colorize all the background of a line. if style == self.Comment or style == self.Comment_End or style == self.Comment_Start: return True return QsciLexerCustom.defaultEolFill(self, style)
def defaultFont(self, style): if style == self.Comment: return QFont('Courier', 10, QFont.Light) elif style == self.Default: return QFont('Courier', 10, QFont.Normal) return QsciLexerCustom.defaultFont(self, style)
def defaultPaper(self, style): if style == self.Section: return QColor('#FFEECC') return QsciLexerCustom.defaultPaper(self, style)
def defaultEolFill(self, style): # This allowed to colorize all the background of a line. if style == self.SecundLevelTitle: return True return QsciLexerCustom.defaultEolFill(self, style)
def defaultColor(self, style): if style == self.Default: return QColor('#000000') elif style in self.__comment: return QColor('#A0A0A0') return QsciLexerCustom.defaultColor(self, style)
def defaultColor(self, style): if style == self.Default: return QColor('#000000') elif style == self.Comment: return QColor('#228B22') return QsciLexerCustom.defaultColor(self, style)