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)
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 rehighlight(self): QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) QSyntaxHighlighter.rehighlight(self) QApplication.restoreOverrideCursor()
def __init__(self, *args): QSyntaxHighlighter.__init__(self, *args) self.dict = None
def rehighlight(self): self.outlineexplorer_data = {} QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) QSyntaxHighlighter.rehighlight(self) QApplication.restoreOverrideCursor()
def __init__(self, *args, **kwargs): QSyntaxHighlighter.__init__(self, *args, **kwargs)
def __init__(self, doc, spellcheck): QSyntaxHighlighter.__init__(self, doc) self.spellcheck = spellcheck self.enabled = False
def __init__(self, document, spell_dict): QSyntaxHighlighter.__init__(self, document) self.spell_dict = spell_dict
def __init__(self, *args): QSyntaxHighlighter.__init__(self, *args) self.dict = None self.errorcount = 0
def __init__(self, *args): QSyntaxHighlighter.__init__(self, *args) self.dict = None self.errorcount=0
def __init__(self, *args): QSyntaxHighlighter.__init__(self, *args) self.dict = None self._active = False