Exemplo n.º 1
0
    def __init__(self, parent=None):

        QsciLexerXML.__init__(self, parent)
        Lexer.__init__(self)

        self.streamCommentString = {'start': '<!-- ', 'end': ' -->'}
        return
Exemplo n.º 2
0
    def __init__( self, parent = None ):

        QsciLexerXML.__init__( self, parent )
        Lexer.__init__( self )

        self.streamCommentString = { 'start' : '<!-- ',
                                     'end'   : ' -->' }
        return
Exemplo n.º 3
0
 def __init__(self,parent):
     QsciLexerXML.__init__(self, parent)
     self.parent = parent
     self.plainFont = QFont()
     self.plainFont.setFamily(config.fontName())
     self.plainFont.setFixedPitch(True)
     self.plainFont.setPointSize(config.fontSize())
     self.boldFont = QFont(self.plainFont)
     self.boldFont.setBold(True)
     self.setFoldCompact(True)
Exemplo n.º 4
0
    def __init__(self, parent=None):
        QsciLexerXML.__init__(self, parent)
        
        self.lexer = Lexer.Lexer(self.language())

        self.setDefaultPaper(self.lexer.get_globaldefault_paper())
        self.setFont(self.lexer.get_default_font())
        
        self.comment_string = QString("")
        self.stream_comment_string = {
            'start' : QString('<!-- '),
            'end'   : QString(' -->')
        }
Exemplo n.º 5
0
 def __init__(self, parent=None):
     """
     Constructor
     
     @param parent parent widget of this lexer
     """
     QsciLexerXML.__init__(self, parent)
     Lexer.__init__(self)
     
     self.streamCommentString = {
         'start' : QString('<!-- '),
         'end'   : QString(' -->')
     }
Exemplo n.º 6
0
    def __init__(self, style, paper):
        QsciLexerXML.__init__(self)

        self.lexerPaper = paper

        for key, attrib in style.items():
            value = propertyID[key]
            self.setColor(QtGui.QColor(attrib[1]), value)
            self.setEolFill(True, value)
            self.setPaper(QtGui.QColor(attrib[5]), value)
            if self.lexerPaper[0] == "Plain":
                self.setPaper(QtGui.QColor(attrib[5]), value)
            else:
                self.setPaper(QtGui.QColor(self.lexerPaper[1]), value)

            font = QtGui.QFont(attrib[0], attrib[2])
            font.setBold(attrib[3])
            font.setItalic(attrib[4])
            self.setFont(font, value)

        if self.lexerPaper[0] == "Plain":
            self.setDefaultPaper(QtGui.QColor("#ffffff"))
        else:
            self.setDefaultPaper(QtGui.QColor(self.lexerPaper[1]))