• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KPIMTextedit Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kpimtextedit
emailquotehighlighter.h
1 
20 #ifndef KPIMTEXTEDIT_EMAILQUOTEHIGHLIGHTER_H
21 #define KPIMTEXTEDIT_EMAILQUOTEHIGHLIGHTER_H
22 
23 #include "kpimtextedit_export.h"
24 
25 #include <sonnet/highlighter.h>
26 
27 #include <memory>
28 
29 namespace KPIMTextEdit {
30 
31 class TextEdit;
32 
44 class KPIMTEXTEDIT_EXPORT EMailQuoteHighlighter : public Sonnet::Highlighter
45 {
46  public:
47 
52  explicit EMailQuoteHighlighter( TextEdit *textEdit,
53  const QColor &normalColor = Qt::black,
54  const QColor &quoteDepth1 = QColor( 0x00, 0x80, 0x00 ),
55  const QColor &quoteDepth2 = QColor( 0x00, 0x80, 0x00 ),
56  const QColor &quoteDepth3 = QColor( 0x00, 0x80, 0x00 ),
57  const QColor &misspelledColor = Qt::red );
58 
59  ~EMailQuoteHighlighter();
60 
71  void setQuoteColor( const QColor &normalColor,
72  const QColor &quoteDepth1,
73  const QColor &quoteDepth2,
74  const QColor &quoteDepth3,
75  const QColor &misspelledColor = Qt::red );
76 
82  void toggleSpellHighlighting( bool on );
83 
87  virtual void highlightBlock ( const QString & text );
88 
94  static QString highlightText( const QString &text,
95  const QColor &quoteDepth1 = QColor( 0x00, 0x80, 0x00 ),
96  const QColor &quoteDepth2 = QColor( 0x00, 0x80, 0x00 ),
97  const QColor &quoteDepth3 = QColor( 0x00, 0x80, 0x00 ) );
98 
103  static QString highlightParagraph( const QString &text,
104  const QColor &quoteDepth1 = QColor( 0x00, 0x80, 0x00 ),
105  const QColor &quoteDepth2 = QColor( 0x00, 0x80, 0x00 ),
106  const QColor &quoteDepth3 = QColor( 0x00, 0x80, 0x00 ) );
107 
108  protected:
109 
117  virtual void unsetMisspelled( int start, int count );
118 
123  virtual void setMisspelled( int start, int count );
124 
125  private:
126  class EMailQuoteHighlighterPrivate;
127  std::auto_ptr<EMailQuoteHighlighterPrivate> d;
128 };
129 
130 }
131 
132 #endif
QString
QColor
KPIMTextEdit::EMailQuoteHighlighter
This highlighter highlights spelling mistakes and also highlightes quotes.
Definition: emailquotehighlighter.h:44
KPIMTextEdit::TextEdit
Special textedit that provides additional features which are useful for PIM applications like mail cl...
Definition: textedit.h:84
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KPIMTextedit Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal