• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Kate

spellcheck.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (C) 2008-2009 by Michel Ludwig (michel.ludwig@kdemail.net)
00003  *
00004  *  This library is free software; you can redistribute it and/or
00005  *  modify it under the terms of the GNU Library General Public
00006  *  License as published by the Free Software Foundation; either
00007  *  version 2 of the License, or (at your option) any later version.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this library; see the file COPYING.LIB.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef SPELLCHECK_H
00021 #define SPELLCHECK_H
00022 
00023 #include <QList>
00024 #include <QObject>
00025 #include <QPair>
00026 #include <QString>
00027 
00028 #include <ktexteditor/document.h>
00029 #include <sonnet/backgroundchecker.h>
00030 #include <sonnet/speller.h>
00031 
00032 class KateDocument;
00033 class KateView;
00034 
00035 class KateSpellCheckManager : public QObject {
00036   Q_OBJECT
00037 
00038   typedef QPair<KTextEditor::Range, QString> RangeDictionaryPair;
00039 
00040   public:
00041     KateSpellCheckManager(QObject* parent = NULL);
00042     virtual ~KateSpellCheckManager();
00043 
00044     QStringList suggestions(const QString& word, const QString& dictionary);
00045 
00046     void ignoreWord(const QString& word, const QString& dictionary);
00047     void addToDictionary(const QString& word, const QString& dictionary);
00048 
00052     static QList<KTextEditor::Range> rangeDifference(const KTextEditor::Range& r1, const KTextEditor::Range& r2);
00053 
00054   public:
00055       QList<QPair<KTextEditor::Range, QString> > spellCheckLanguageRanges(KateDocument *doc, const KTextEditor::Range& range);
00056 
00057       QList<QPair<KTextEditor::Range, QString> > spellCheckWrtHighlightingRanges(KateDocument *doc, const KTextEditor::Range& range,
00058                                                                                                     const QString& dictionary = QString(),
00059                                                                                                     bool singleLine = false,
00060                                                                                                     bool returnSingleRange = false);
00061       QList<QPair<KTextEditor::Range, QString> > spellCheckRanges(KateDocument *doc, const KTextEditor::Range& range,
00062                                                                                      bool singleLine = false);
00063 
00064       void replaceCharactersEncodedIfNecessary(const QString& newWord, KateDocument *doc, const KTextEditor::Range& replacementRange);
00065 };
00066 
00067 #endif
00068  
00069 // kate: space-indent on; indent-width 2; replace-tabs on;

Kate

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  •     Sodep
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.9-20090814
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