23 #ifndef SPELLINGFILTER_H_INCLUDED 24 #define SPELLINGFILTER_H_INCLUDED 27 #include <tqstringlist.h> 28 #include "linklocator.h" 30 #include <tdepimmacros.h> 32 class KDE_EXPORT SpellingFilter 35 enum UrlFiltering { DontFilterUrls, FilterUrls }; 36 enum EmailAddressFiltering { DontFilterEmailAddresses, FilterEmailAddresses }; 38 SpellingFilter( const TQString& text, const TQString& quotePrefix, 39 UrlFiltering filterUrls = FilterUrls, 40 EmailAddressFiltering filterEmailAddresses = FilterEmailAddresses, 41 const TQStringList& filterStrings = TQStringList()); 43 TQString originalText() const; 44 TQString filteredText() const; 49 const TQString mOriginal; 53 class SpellingFilter::TextCensor : public LinkLocator 56 TextCensor( const TQString& s); 58 void censorQuotations( const TQString& quotePrefix); 60 void censorEmailAddresses(); 61 void censorString( const TQString& s); 63 TQString censoredText() const; 66 bool atLineStart() const; 69 bool atQuotation( const TQString& quotePrefix) const; 70 void skipQuotation( const TQString& quotePrefix); 71 void findQuotation( const TQString& quotePrefix); 73 void findEmailAddress(); 76 #endif // SPELLINGFILTER_H_INCLUDED LinkLocator assists in identifying sections of text that can usefully be converted in hyperlinks in h...
|