24#ifndef K3SYNTAXHIGHLIGHTER_H
25#define K3SYNTAXHIGHLIGHTER_H
29#include <Qt3Support/Q3TextEdit>
30#include <Qt3Support/Q3SyntaxHighlighter>
31#include <QtGui/QColor>
32#include <QtCore/QStringList>
48 bool colorQuoting =
false,
49 const QColor& QuoteColor0 = Qt::black,
50 const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
51 const QColor& QuoteColor2 = QColor( 0x00, 0x80, 0x00 ),
52 const QColor& QuoteColor3 = QColor( 0x00, 0x80, 0x00 ),
53 SyntaxMode mode = PlainTextMode );
56 int highlightParagraph(
const QString& text,
int endStateOfLastPara );
59 class K3SyntaxHighlighterPrivate;
60 K3SyntaxHighlighterPrivate *
const d;
67 const QColor& spellColor = Qt::red,
68 bool colorQuoting =
false,
69 const QColor& QuoteColor0 = Qt::black,
70 const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
71 const QColor& QuoteColor2 = QColor( 0x00, 0x80, 0x00 ),
72 const QColor& QuoteColor3 = QColor( 0x00, 0x80, 0x00 ) );
75 virtual int highlightParagraph(
const QString &text,
76 int endStateOfLastPara );
78 bool intraWordEditing()
const;
79 void setIntraWordEditing(
bool editing );
80 static QStringList personalWords();
83 void flushCurrentWord();
85 class K3SpellingHighlighterPrivate;
86 K3SpellingHighlighterPrivate *
const d;
98 bool spellCheckingActive =
true,
99 bool autoEnable =
true,
100 const QColor& spellColor = Qt::red,
101 bool colorQuoting =
false,
102 const QColor& QuoteColor0 = Qt::black,
103 const QColor& QuoteColor1 = QColor( 0x00, 0x80, 0x00 ),
104 const QColor& QuoteColor2 = QColor( 0x00, 0x70, 0x00 ),
105 const QColor& QuoteColor3 = QColor( 0x00, 0x60, 0x00 ),
109 virtual bool isMisspelled(
const QString &word );
110 static void dictionaryChanged();
111 void restartBackgroundSpellCheck();
125 void setActive(
bool active );
134 bool isActive()
const;
147 void setAutomatic(
bool automatic );
156 bool automatic()
const;
168 void slotMisspelling(
const QString &originalWord,
const QStringList &suggestions,
unsigned int pos );
169 void slotCorrected(
const QString &originalWord,
const QString &,
unsigned int );
170 void slotRehighlight();
171 void slotDictionaryChanged();
172 void slotSpellReady(
K3Spell *spell );
173 void slotAutoDetection();
174 void slotLocalSpellConfigChanged();
175 void slotK3SpellNotResponding();
178 class K3DictSpellingHighlighterPrivate;
179 K3DictSpellingHighlighterPrivate *
const d;
Dictionary sensitive text highlighter.
void newSuggestions(const QString &originalword, const QStringList &suggestions, unsigned int pos)
void activeChanged(const QString &)
A configuration class/dialog for K3Spell.
virtual bool isMisspelled(const QString &word)=0
Syntax sensitive text highlighter.