• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

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       // FIXME: Default colors don't obey color scheme
00047       // The normalColor parameter will be ignored, only provided for KNode
00048       // compatibility.
00049       explicit KEMailQuotingHighlighter( KMeditor *textEdit,
00050                                          const QColor &normalColor = Qt::black,
00051                                          const QColor &quoteDepth1 = QColor( 0x00, 0x80, 0x00 ),
00052                                          const QColor &quoteDepth2 = QColor( 0x00, 0x80, 0x00 ),
00053                                          const QColor &quoteDepth3 = QColor( 0x00, 0x80, 0x00 ),
00054                                          const QColor &misspelledColor = Qt::red );
00055 
00056       ~KEMailQuotingHighlighter();
00057 
00058       // The normalColor parameter will be ignored, only provided for KNode
00059       // compatibility.
00060       void setQuoteColor( const QColor &normalColor,
00061                           const QColor &quoteDepth1,
00062                           const QColor &quoteDepth2,
00063                           const QColor &quoteDepth3,
00064                           const QColor &misspelledColor = Qt::red );
00065 
00071       void toggleSpellHighlighting( bool on );
00072 
00073       // Reimplemented to highlight quote blocks.
00074       virtual void highlightBlock ( const QString & text );
00075 
00076     protected:
00077 
00078       // Reimplemented, the base version sets the text color to black, which
00079       // is not what we want. We do nothing, the format is already reset by
00080       // Qt.
00081       virtual void unsetMisspelled( int start,  int count );
00082 
00083       // Reimplemented to set the color of the misspelled word to a color
00084       // defined by setQuoteColor().
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

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
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