lib Library API Documentation

koaspell.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2002-2003 Laurent Montel <lmontel@mandrakesoft.com> 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 version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 */ 00018 #ifndef __KOASPELL_H__ 00019 #define __KOASPELL_H__ 00020 00021 #include "koSconfig.h" 00022 00023 #include <qobject.h> 00024 #include <qstringlist.h> 00025 #include <qstring.h> 00026 00027 #include "koSpell.h" 00028 #ifdef HAVE_LIBASPELL 00029 00030 class KOSpellDlg; 00031 class AspellSpeller; 00032 class AspellConfig; 00033 00034 class KOASpell : public KOSpell 00035 { 00036 Q_OBJECT 00037 00038 public: 00039 00040 KOASpell(QWidget *parent, const QString &caption,KOSpellConfig *kcs=0, 00041 bool modal = FALSE, bool _autocorrect =FALSE, KOSpellerType _type = Text); 00042 00043 /* 00044 * Create a simple kospell class without dialogbox 00045 * we can just use resultCheckWord function to get list 00046 * of result 00047 */ 00048 KOASpell( KOSpellConfig *_ksc ); 00049 00050 QStringList resultCheckWord( const QString &_word ); 00051 00052 //virtual bool checkWord (const QString &_buffer, bool usedialog = FALSE); 00053 00054 00055 virtual bool ignore (const QString & word); 00056 virtual bool addPersonal (const QString & word); 00057 00058 00059 virtual ~KOASpell(); 00060 00061 static int modalCheck( QString& text, KOSpellConfig * kcs ); 00062 00063 virtual bool check (const QString &_buffer, bool usedialog = TRUE) ; 00064 00065 00066 protected slots: 00067 /* All of those signals from KProcIO get sent here. */ 00068 void dialog2 (int dlgresult); 00069 00070 protected: 00071 00072 AspellSpeller * speller; 00073 AspellConfig * config; 00074 00075 00076 void dialog (const QString & word, QStringList & sugg); 00077 00078 void setUpDialog (); 00079 00080 bool writePersonalDictionary (); 00081 00082 bool spellWord( const QString &_word ); 00083 00084 void checkNextWord(); 00085 void nextWord(); 00086 void previousWord(); 00087 00088 void spellCheckReplaceWord( const QString & _word); 00089 00090 bool initConfig(const QString & language= QString::null); 00091 void changeSpellLanguage( int index ); 00092 void testIgnoreWord( QString & word, bool haveAnNumber ); 00093 00094 void initSpell(KOSpellConfig *_ksc); 00095 void correctWord( const QString & originalword, const QString & newword ); 00096 void deleteSpellChecker(); 00097 00098 private slots: 00099 void slotSpellCheckerCorrected( const QString &, const QString &, unsigned int ); 00100 void slotModalDone( const QString &/*_buffer*/ ); 00101 void slotModalSpellCheckerFinished(); 00102 void slotEmitCheckerReady(); 00103 00104 }; 00105 00106 #endif 00107 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Nov 17 06:54:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003