def __init__(self, parent):
        QSyntaxHighlighter.__init__(self, parent)
        self.parent = parent
        self.parent.setTabStopWidth(self.parent.fontMetrics().width(' ')*8)

        self.defaultTheme =  {"background-color":"#d7d7d7", "color":"#191970", "bold": {"color":"#859900", "font-weight":"bold", "font-style":"normal"}, "emphasis": {"color":"#b58900", "font-weight":"bold", "font-style":"italic"}, "link": {"color":"#cb4b16", "font-weight":"normal", "font-style":"normal"}, "image": {"color":"#cb4b16", "font-weight":"normal", "font-style":"normal"}, "header": {"color":"#2aa198", "font-weight":"bold", "font-style":"normal"}, "unorderedlist": {"color":"#dc322f", "font-weight":"normal", "font-style":"normal"}, "orderedlist": {"color":"#dc322f", "font-weight":"normal", "font-style":"normal"}, "blockquote": {"color":"#dc322f", "font-weight":"normal", "font-style":"normal"}, "codespan": {"color":"#dc322f", "font-weight":"normal", "font-style":"normal"}, "codeblock": {"color":"#ff9900", "font-weight":"normal", "font-style":"normal"}, "line": {"color":"#2aa198", "font-weight":"normal", "font-style":"normal"}, "html": {"color":"#c000c0", "font-weight":"normal", "font-style":"normal"}}
        self.setTheme(self.defaultTheme)
Esempio n. 2
0
 def __init__(self, doc):
     QSyntaxHighlighter.__init__(self, doc)
     self.colors = {}
     self.colors['doctype']        = QColor(192, 192, 192)
     self.colors['entity']         = QColor(128, 128, 128)
     self.colors['tag']            = QColor(136,  18, 128)
     self.colors['comment']        = QColor(35, 110,  37)
     self.colors['attrname']       = QColor(153,  69,   0)
     self.colors['attrval']        = QColor(36,  36, 170)
 def __init__(self, doc):
     QSyntaxHighlighter.__init__(self, doc)
     self.colors = {}
     self.colors['doctype'] = QColor(192, 192, 192)
     self.colors['entity'] = QColor(128, 128, 128)
     self.colors['tag'] = QColor(136, 18, 128)
     self.colors['comment'] = QColor(35, 110, 37)
     self.colors['attrname'] = QColor(153, 69, 0)
     self.colors['attrval'] = QColor(36, 36, 170)
Esempio n. 4
0
 def rehighlight(self):
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     QSyntaxHighlighter.rehighlight(self)
     QApplication.restoreOverrideCursor()
Esempio n. 5
0
    def __init__(self, *args):
        QSyntaxHighlighter.__init__(self, *args)

        self.dict = None
Esempio n. 6
0
File: base.py Progetto: alip/calibre
 def rehighlight(self):
     self.outlineexplorer_data = {}
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     QSyntaxHighlighter.rehighlight(self)
     QApplication.restoreOverrideCursor()
Esempio n. 7
0
File: base.py Progetto: alip/calibre
 def __init__(self, *args, **kwargs):
     QSyntaxHighlighter.__init__(self, *args, **kwargs)
Esempio n. 8
0
 def __init__(self, doc, spellcheck):
     QSyntaxHighlighter.__init__(self, doc)
     self.spellcheck = spellcheck
     self.enabled = False
Esempio n. 9
0
 def __init__(self, document, spell_dict):
     QSyntaxHighlighter.__init__(self, document)
     self.spell_dict = spell_dict
Esempio n. 10
0
    def __init__(self, *args):
        QSyntaxHighlighter.__init__(self, *args)

        self.dict = None
Esempio n. 11
0
 def __init__(self, doc, spellcheck):
     QSyntaxHighlighter.__init__(self, doc)
     self.spellcheck = spellcheck
     self.enabled = False
Esempio n. 12
0
 def __init__(self, *args):
     QSyntaxHighlighter.__init__(self, *args)
     self.dict = None
     self.errorcount = 0
Esempio n. 13
0
 def rehighlight(self):
     self.outlineexplorer_data = {}
     QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
     QSyntaxHighlighter.rehighlight(self)
     QApplication.restoreOverrideCursor()
Esempio n. 14
0
 def __init__(self, *args, **kwargs):
     QSyntaxHighlighter.__init__(self, *args, **kwargs)
Esempio n. 15
0
 def __init__(self, *args):
     QSyntaxHighlighter.__init__(self, *args)
     self.dict = None
     self.errorcount=0
Esempio n. 16
0
    def __init__(self, *args):
        QSyntaxHighlighter.__init__(self, *args)
 
        self.dict = None
        self._active = False