Kate
katespell.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __KATE_SPELL_H__
00025 #define __KATE_SPELL_H__
00026
00027 #include "katecursor.h"
00028
00029 #include <QtCore/QObject>
00030
00031 class KateView;
00032
00033 class KAction;
00034 class KActionCollection;
00035 namespace Sonnet {
00036 class Dialog;
00037 }
00038
00039 class KateSpell : public QObject
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 explicit KateSpell( KateView* );
00045 ~KateSpell();
00046
00047 void createActions( KActionCollection* );
00048
00049 void updateActions ();
00050
00051
00052 private Q_SLOTS:
00053 void spellcheckFromCursor();
00054
00055
00056 void spellcheckSelection();
00057
00058 void spellcheck();
00059
00066 void spellcheck( const KTextEditor::Cursor &from, const KTextEditor::Cursor &to=KTextEditor::Cursor() );
00067
00068 void misspelling( const QString&, int );
00069 void corrected ( const QString&, int, const QString&);
00070 void spellResult( );
00071
00072 private:
00073 KTextEditor::Cursor locatePosition( int pos );
00074
00075 KateView *m_view;
00076 KAction *m_spellcheckSelection;
00077
00078 Sonnet::Dialog *m_sonnetDialog;
00079
00080
00081 KTextEditor::Cursor m_spellStart, m_spellEnd;
00082
00083
00084 KTextEditor::Cursor m_spellPosCursor;
00085 uint m_spellLastPos;
00086 };
00087
00088 #endif
00089
00090