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: 'ErrorInfo', 2: 'OutputInfo', 3: 'ExitInfo', 4: 'Start' } for key in self._styles: setattr(self, self._styles[key], key)
def defaultColor(self, style): # Define colors for lexer styles. # TODO: move color definitions to linuxcnc confog INI file if style == self.Default: return QColor('#FFFFFF') ### black # Edited elif style == self.Comment: return QColor('#fcf803') ### black elif style == self.Key: return QColor('#52ceff') ### cyan elif style == self.Assignment: return QColor('#fa5f5f') ### red elif style == self.Value: return QColor('#00CC00') ### green elif style == self.MCODE: return QColor('#f736d7') ### magenta elif style == self.FEED: return QColor('#f7ce36') ### orange elif style == self.MSG: return QColor('#03fc20') ### lt green elif style == self.SCODE: return QColor('#03fcc2') ### teal elif style == self.PCODE: return QColor('#be4dff') ### lt purple elif style == self.TCODE: return QColor('#ff8fdb') ### pink elif style == self.HCODE: return QColor('#87b3ff') ### lt blue return QsciLexerCustom.defaultColor(self, style)
def defaultColor(self, style): if style == self.Default: return QColor('#000000') # black elif style == self.Comment: return QColor('#000000') # black elif style == self.Key: return QColor('#0000CC') # blue elif style == self.Assignment: return QColor('#CC0000') # red elif style == self.Value: return QColor('#00CC00') # green 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 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 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 defaultColor(self, style): if style == self.Default: return QColor('#000000') # black elif style == self.Comment: return QColor('#000000') # black elif style == self.Key: return QColor('#0000CC') # blue elif style == self.Assignment: return QColor('#CC0000') # red elif style == self.Value: return QColor('#00CC00') # green elif style == self.Axes: return QColor('darkgreen') elif style == self.Code1: return QColor('darkred') elif style == self.Code2: return QColor('deeppink') return QsciLexerCustom.defaultColor(self, style)
def defaultEolFill(self, style): # This allowed to colorize all the background of a line. if style in self._trmLexer['Font']: return True return QsciLexerCustom.defaultEolFill(self, style)
def defaultFont(self, style): if style in self._trmLexer['Font']: return self._trmLexer['Font'][style] return QsciLexerCustom.defaultFont(self, style)
def defaultColor(self, style): if style in self._trmLexer['Colour']: return self._trmLexer['Colour'][style] return QsciLexerCustom.defaultColor(self, style)