KPIMTextedit Library
KPIMTextEdit::EMailQuoteHighlighter Class Reference
This highlighter highlights spelling mistakes and also highlightes quotes. More...
#include <emailquotehighlighter.h>
Inherits Sonnet::Highlighter.
Public Member Functions | |
EMailQuoteHighlighter (TextEdit *textEdit, const QColor &normalColor=Qt::black, const QColor "eDepth1=QColor(0x00, 0x80, 0x00), const QColor "eDepth2=QColor(0x00, 0x80, 0x00), const QColor "eDepth3=QColor(0x00, 0x80, 0x00), const QColor &misspelledColor=Qt::red) | |
virtual void | highlightBlock (const QString &text) |
void | setQuoteColor (const QColor &normalColor, const QColor "eDepth1, const QColor "eDepth2, const QColor "eDepth3, const QColor &misspelledColor=Qt::red) |
void | toggleSpellHighlighting (bool on) |
Protected Member Functions | |
virtual void | setMisspelled (int start, int count) |
virtual void | unsetMisspelled (int start, int count) |
Detailed Description
This highlighter highlights spelling mistakes and also highlightes quotes.Spelling mistakes inside quotes will not be highlighted. The quote highlighting color is configurable.
Spell highlighting is disabled by default but can be toggled.
- Since:
- 4.3
Definition at line 44 of file emailquotehighlighter.h.
Constructor & Destructor Documentation
KPIMTextEdit::EMailQuoteHighlighter::EMailQuoteHighlighter | ( | TextEdit * | textEdit, | |
const QColor & | normalColor = Qt::black , |
|||
const QColor & | quoteDepth1 = QColor( 0x00, 0x80, 0x00 ) , |
|||
const QColor & | quoteDepth2 = QColor( 0x00, 0x80, 0x00 ) , |
|||
const QColor & | quoteDepth3 = QColor( 0x00, 0x80, 0x00 ) , |
|||
const QColor & | misspelledColor = Qt::red | |||
) | [explicit] |
Constructor.
See setQuoteColor() for the parameters. FIXME: Default colors don't obey color scheme
Definition at line 35 of file emailquotehighlighter.cpp.
Member Function Documentation
void KPIMTextEdit::EMailQuoteHighlighter::highlightBlock | ( | const QString & | text | ) | [virtual] |
void KPIMTextEdit::EMailQuoteHighlighter::setMisspelled | ( | int | start, | |
int | count | |||
) | [protected, virtual] |
Reimplemented to set the color of the misspelled word to a color defined by setQuoteColor().
Definition at line 116 of file emailquotehighlighter.cpp.
void KPIMTextEdit::EMailQuoteHighlighter::setQuoteColor | ( | const QColor & | normalColor, | |
const QColor & | quoteDepth1, | |||
const QColor & | quoteDepth2, | |||
const QColor & | quoteDepth3, | |||
const QColor & | misspelledColor = Qt::red | |||
) |
Sets the colors used for highlighting quoted text and spelling mistakes.
- Parameters:
-
quoteDepth1 color for text quoted 1 level deep quoteDepth2 color for text quoted 2 level deep quoteDepth3 color for text quoted 3 level deep misspelledColor color in which misspelled words will be underlined normalColor will be ignored, only provided for KNode compatibility.
Definition at line 63 of file emailquotehighlighter.cpp.
void KPIMTextEdit::EMailQuoteHighlighter::toggleSpellHighlighting | ( | bool | on | ) |
Turns spellcheck highlighting on or off.
- Parameters:
-
on if true, spelling mistakes will be highlighted
Definition at line 76 of file emailquotehighlighter.cpp.
void KPIMTextEdit::EMailQuoteHighlighter::unsetMisspelled | ( | int | start, | |
int | count | |||
) | [protected, virtual] |
Reimplemented, the base version sets the text color to black, which is not what we want.
We do nothing, the format is already reset by Qt.
Definition at line 110 of file emailquotehighlighter.cpp.
The documentation for this class was generated from the following files: