libkdepim
kemailquotinghighter.h
Go to the documentation of this file.00001
00022 #ifndef KDEPIM_KEMAILQUOTINGHIGHTER_H
00023 #define KDEPIM_KEMAILQUOTINGHIGHTER_H
00024
00025 #include "kdepim_export.h"
00026
00027 #include <sonnet/highlighter.h>
00028
00029 namespace KPIM
00030 {
00031 class KMeditor;
00032
00042 class KDEPIM_EXPORT KEMailQuotingHighlighter : public Sonnet::Highlighter
00043 {
00044 public:
00045
00046
00047
00048
00049 explicit KEMailQuotingHighlighter( KMeditor *textEdit,
00050 const QColor &normalColor = Qt::black,
00051 const QColor "eDepth1 = QColor( 0x00, 0x80, 0x00 ),
00052 const QColor "eDepth2 = QColor( 0x00, 0x80, 0x00 ),
00053 const QColor "eDepth3 = QColor( 0x00, 0x80, 0x00 ),
00054 const QColor &misspelledColor = Qt::red );
00055
00056 ~KEMailQuotingHighlighter();
00057
00058
00059
00060 void setQuoteColor( const QColor &normalColor,
00061 const QColor "eDepth1,
00062 const QColor "eDepth2,
00063 const QColor "eDepth3,
00064 const QColor &misspelledColor = Qt::red );
00065
00071 void toggleSpellHighlighting( bool on );
00072
00073
00074 virtual void highlightBlock ( const QString & text );
00075
00076 protected:
00077
00078
00079
00080
00081 virtual void unsetMisspelled( int start, int count );
00082
00083
00084
00085 virtual void setMisspelled( int start, int count );
00086
00087 private:
00088 class KEmailQuotingHighlighterPrivate;
00089 KEmailQuotingHighlighterPrivate *const d;
00090
00091 };
00092 }
00093
00094 #endif // LIBKDEPIM_KEMAILQUOTINGHIGHTER_H