mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-18 20:02:32 +12:00
31 lines
745 B
Python
31 lines
745 B
Python
|
#!/usr/bin/env python
|
||
|
#--!-- coding: utf8 --!--
|
||
|
|
||
|
from __future__ import print_function
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
from qt import *
|
||
|
from enums import *
|
||
|
from ui.editors.t2tHighlighter import *
|
||
|
try:
|
||
|
import enchant
|
||
|
except ImportError:
|
||
|
enchant = None
|
||
|
|
||
|
class customTextEdit(QTextEdit):
|
||
|
|
||
|
def __init__(self, parent=None):
|
||
|
QTextEdit.__init__(self, parent)
|
||
|
|
||
|
self.defaultFontPointSize = 9
|
||
|
self.highlightWord = ""
|
||
|
self.highligtCS = False
|
||
|
|
||
|
self.highlighter = t2tHighlighter(self)
|
||
|
|
||
|
# Spellchecking
|
||
|
if enchant:
|
||
|
self.dict = enchant.Dict("fr_CH")
|
||
|
self.spellcheck = True
|
||
|
else:
|
||
|
self.spellcheck = False
|