• Skip to content
  • Skip to link menu
KDE 4.8 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KPIMTextedit Library

emailquotehighlighter.h
00001 
00020 #ifndef KPIMTEXTEDIT_EMAILQUOTEHIGHLIGHTER_H
00021 #define KPIMTEXTEDIT_EMAILQUOTEHIGHLIGHTER_H
00022 
00023 #include "kpimtextedit_export.h"
00024 
00025 #include <sonnet/highlighter.h>
00026 
00027 #include <memory>
00028 
00029 namespace KPIMTextEdit {
00030 
00031 class TextEdit;
00032 
00044 class KPIMTEXTEDIT_EXPORT EMailQuoteHighlighter : public Sonnet::Highlighter
00045 {
00046   public:
00047 
00052     explicit EMailQuoteHighlighter( TextEdit *textEdit,
00053                                     const QColor &normalColor = Qt::black,
00054                                     const QColor &quoteDepth1 = QColor( 0x00, 0x80, 0x00 ),
00055                                     const QColor &quoteDepth2 = QColor( 0x00, 0x80, 0x00 ),
00056                                     const QColor &quoteDepth3 = QColor( 0x00, 0x80, 0x00 ),
00057                                     const QColor &misspelledColor = Qt::red );
00058 
00059     ~EMailQuoteHighlighter();
00060 
00071     void setQuoteColor( const QColor &normalColor,
00072                         const QColor &quoteDepth1,
00073                         const QColor &quoteDepth2,
00074                         const QColor &quoteDepth3,
00075                         const QColor &misspelledColor = Qt::red );
00076 
00082     void toggleSpellHighlighting( bool on );
00083 
00087     virtual void highlightBlock ( const QString & text );
00088 
00094     static QString highlightText( const QString &text,
00095                                   const QColor &quoteDepth1 = QColor( 0x00, 0x80, 0x00 ),
00096                                   const QColor &quoteDepth2 = QColor( 0x00, 0x80, 0x00 ),
00097                                   const QColor &quoteDepth3 = QColor( 0x00, 0x80, 0x00 ) );
00098 
00103     static QString highlightParagraph( const QString &text,
00104                                        const QColor &quoteDepth1 = QColor( 0x00, 0x80, 0x00 ),
00105                                        const QColor &quoteDepth2 = QColor( 0x00, 0x80, 0x00 ),
00106                                        const QColor &quoteDepth3 = QColor( 0x00, 0x80, 0x00 ) );
00107 
00108   protected:
00109 
00115     virtual void unsetMisspelled( int start, int count );
00116 
00121     virtual void setMisspelled( int start, int count );
00122 
00123   private:
00124     class EMailQuoteHighlighterPrivate;
00125     std::auto_ptr<EMailQuoteHighlighterPrivate> d;
00126 };
00127 
00128 }
00129 
00130 #endif

KPIMTextedit Library

Skip menu "KPIMTextedit Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal