24 #ifndef KSYNTAXHIGHLIGHTER_H
25 #define KSYNTAXHIGHLIGHTER_H
27 #include <tqtextedit.h>
28 #include <tqsyntaxhighlighter.h>
30 #include <tqstringlist.h>
32 #include <tdelibs_export.h>
50 bool colorQuoting =
false,
51 const TQColor& QuoteColor0 = black,
52 const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
53 const TQColor& QuoteColor2 = TQColor( 0x00, 0x80, 0x00 ),
54 const TQColor& QuoteColor3 = TQColor( 0x00, 0x80, 0x00 ),
55 SyntaxMode mode = PlainTextMode );
58 int highlightParagraph(
const TQString& text,
int endStateOfLastPara );
61 class KSyntaxHighlighterPrivate;
62 KSyntaxHighlighterPrivate *d;
68 KSpellingHighlighter( TQTextEdit *textEdit,
69 const TQColor& spellColor = red,
70 bool colorQuoting =
false,
71 const TQColor& QuoteColor0 = black,
72 const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
73 const TQColor& QuoteColor2 = TQColor( 0x00, 0x80, 0x00 ),
74 const TQColor& QuoteColor3 = TQColor( 0x00, 0x80, 0x00 ) );
75 ~KSpellingHighlighter();
77 virtual int highlightParagraph(
const TQString &text,
78 int endStateOfLastPara );
79 virtual bool isMisspelled(
const TQString& word ) = 0;
80 bool intraWordEditing()
const;
81 void setIntraWordEditing(
bool editing );
82 static TQStringList personalWords();
85 void flushCurrentWord();
87 class KSpellingHighlighterPrivate;
88 KSpellingHighlighterPrivate *d;
100 bool spellCheckingActive =
true,
101 bool autoEnable =
true,
102 const TQColor& spellColor = red,
103 bool colorQuoting =
false,
104 const TQColor& QuoteColor0 = black,
105 const TQColor& QuoteColor1 = TQColor( 0x00, 0x80, 0x00 ),
106 const TQColor& QuoteColor2 = TQColor( 0x00, 0x70, 0x00 ),
107 const TQColor& QuoteColor3 = TQColor( 0x00, 0x60, 0x00 ),
111 virtual bool isMisspelled(
const TQString &word );
112 static void dictionaryChanged();
113 void restartBackgroundSpellCheck();
127 void setActive(
bool active );
136 bool isActive()
const;
149 void setAutomatic(
bool automatic );
158 bool automatic()
const;
161 void activeChanged(
const TQString &);
162 void newSuggestions(
const TQString& originalword,
const TQStringList& suggestions,
167 bool eventFilter(TQObject *o, TQEvent *e);
170 void slotMisspelling(
const TQString &originalWord,
const TQStringList &suggestions,
unsigned int pos );
171 void slotCorrected(
const TQString &originalWord,
const TQString &,
unsigned int );
172 void slotRehighlight();
173 void slotDictionaryChanged();
174 void slotSpellReady(
KSpell *spell );
175 void slotAutoDetection();
176 void slotLocalSpellConfigChanged();
177 void slotKSpellNotResponding();
180 class KDictSpellingHighlighterPrivate;
181 KDictSpellingHighlighterPrivate *d;
Dictionary sensitive text highlighter.
A configuration class/dialog for KSpell.
Syntax sensitive text highlighter.