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

Kate

spellcheckdialog.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE libraries and the Kate part.
00002  *
00003  *  Copyright (C) 2009 by Michel Ludwig <michel.ludwig@kdemail.net>
00004  *  Copyright (C) 2008 Mirko Stocker <me@misto.ch>
00005  *  Copyright (C) 2004-2005 Anders Lund <anders@alweb.dk>
00006  *  Copyright (C) 2002 John Firebaugh <jfirebaugh@kde.org>
00007  *  Copyright (C) 2001-2004 Christoph Cullmann <cullmann@kde.org>
00008  *  Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
00009  *  Copyright (C) 1999 Jochen Wilhelmy <digisnap@cs.tu-berlin.de>
00010  *
00011  *  This library is free software; you can redistribute it and/or
00012  *  modify it under the terms of the GNU Library General Public
00013  *  License as published by the Free Software Foundation; either
00014  *  version 2 of the License, or (at your option) any later version.
00015  *
00016  *  This library is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  *  Library General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU Library General Public License
00022  *  along with this library; see the file COPYING.LIB.  If not, write to
00023  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00024  *  Boston, MA 02110-1301, USA.
00025  */
00026 
00027 #ifndef __KATE_SPELLCHECKDIALOG_H__
00028 #define __KATE_SPELLCHECKDIALOG_H__
00029 
00030 #include <QtCore/QObject>
00031 
00032 class KateView;
00033 
00034 class KAction;
00035 class KActionCollection;
00036 class KProgressDialog;
00037 namespace Sonnet {
00038     class Dialog;
00039     class BackgroundChecker;
00040     class Speller;
00041 }
00042 
00043 #include "ktexteditor/range.h"
00044 
00045 namespace KTextEditor {
00046     class MovingRange;
00047 }
00048 
00049 class KateSpellCheckDialog : public QObject
00050 {
00051   Q_OBJECT
00052 
00053   public:
00054     explicit KateSpellCheckDialog( KateView* );
00055     ~KateSpellCheckDialog();
00056 
00057     void createActions( KActionCollection* );
00058 
00059     void updateActions ();
00060 
00061   // spellcheck from cursor, selection
00062   private Q_SLOTS:
00063     void spellcheckFromCursor();
00064 
00065     // defined here in anticipation of per view selections ;)
00066     void spellcheckSelection();
00067 
00068     void spellcheck();
00069 
00076     void spellcheck( const KTextEditor::Cursor &from, const KTextEditor::Cursor &to=KTextEditor::Cursor() );
00077 
00078     void misspelling( const QString&, int );
00079     void corrected  ( const QString&, int, const QString&);
00080 
00081     void performSpellCheck(const KTextEditor::Range& range);
00082     void installNextSpellCheckRange();
00083 
00084     void cancelClicked();
00085 
00086     void objectDestroyed(QObject *object);
00087 
00088   private:
00089     KTextEditor::Cursor locatePosition( int pos );
00090 
00091     KateView *m_view;
00092     KAction *m_spellcheckSelection;
00093 
00094     Sonnet::Speller *m_speller;
00095     Sonnet::BackgroundChecker *m_backgroundChecker;
00096     Sonnet::Dialog *m_sonnetDialog;
00097 
00098     // define the part of the text to check
00099     KTextEditor::Range m_currentSpellCheckRange;
00100     KTextEditor::MovingRange *m_globalSpellCheckRange;
00101 
00102     QList<QPair<int, int> > m_currentDecToEncOffsetList;
00103 
00104     QList<QPair<KTextEditor::Range, QString> > m_languagesInSpellCheckRange;
00105     QList<QPair<KTextEditor::Range, QString> >::iterator m_currentLanguageRangeIterator;
00106 
00107     // keep track of where we are.
00108     KTextEditor::Cursor m_spellPosCursor;
00109     uint m_spellLastPos;
00110 
00111     bool m_spellCheckCancelledByUser;
00112 
00113     void spellCheckDone();
00114 };
00115 
00116 #endif
00117 
00118 // 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
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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