lib Library API Documentation

koispell.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 00019 #ifndef __KOISPELL_H__ 00020 #define __KOISPELL_H__ 00021 00022 #include "koSconfig.h" 00023 00024 #include <qobject.h> 00025 #include <qstringlist.h> 00026 #include <qstring.h> 00027 #include "koSpell.h" 00028 00029 class KProcIO; 00030 class KProcess; 00031 class KOSpellDlg; 00032 00033 class KOISpell : public KOSpell 00034 { 00035 Q_OBJECT 00036 00037 public: 00038 00039 KOISpell( QWidget *_parent, const QString &_caption, 00040 QObject *obj, const char *slot, KOSpellConfig *_ksc = 0, 00041 bool _progressbar = TRUE, bool _modal = FALSE, KOSpellerType type= Text ); 00042 00043 virtual void cleanUp (); 00044 00045 00046 virtual bool check (const QString &_buffer, bool usedialog = TRUE); 00047 00048 virtual QStringList resultCheckWord( const QString &/*_word*/ ); 00049 00050 00051 virtual bool checkList (QStringList *_wordlist, bool usedialog = TRUE); 00052 00053 00054 virtual bool checkWord (const QString &_buffer, bool usedialog = FALSE); 00055 bool checkWord( const QString &_buffer, bool usedialog, bool synchronous ); 00056 00057 00058 virtual bool ignore (const QString & word); 00059 00060 virtual bool addPersonal (const QString & word); 00061 00062 00063 void setProgressResolution (unsigned res); 00064 00065 virtual ~KOISpell(); 00066 00067 static int modalCheck( QString& text, KOSpellConfig * kcs ); 00068 00069 protected slots: 00070 /* All of those signals from KProcIO get sent here. */ 00071 void KSpell2 (KProcIO *); 00072 void checkWord2 (KProcIO *); 00073 void checkWord2Synchronous (KProcIO *); 00074 void checkWord3 (); 00075 void check2 (KProcIO *); 00076 void checkList2 (); 00077 void checkList3a (KProcIO *); 00078 void checkListReplaceCurrent (); 00079 void checkList4 (); 00080 void dialog2 (int dlgresult); 00081 void check3 (); 00082 00083 void slotStopCancel (int); 00084 void ispellExit (KProcess *); 00085 void emitDeath(); 00086 void ispellErrors (KProcess *, char *, int); 00087 00088 private slots: 00092 void slotModalReady(); 00093 00094 void slotModalDone( const QString & ); 00095 void slotSpellCheckerCorrected( const QString & oldText, const QString & newText, unsigned int ); 00096 void slotModalSpellCheckerFinished( ); 00097 void slotSynchronousReady(); 00098 00099 signals: 00100 void dialog3 (); 00105 void progress (unsigned int i); 00106 00107 protected: 00108 00109 KProcIO *proc; 00110 00111 00112 bool texmode; 00113 bool dlgon; 00114 00115 bool progressbar; 00116 bool dialogsetup; 00117 00118 00119 QString dialog3slot; 00120 00121 int trystart; 00122 int maxtrystart; 00123 unsigned int progres; 00124 unsigned int curprog; 00125 00129 bool modaldlg; 00130 00131 00132 int parseOneResponse (const QString &_buffer, QString &word, QStringList &sugg); 00133 QString funnyWord (const QString & word); 00134 void dialog (const QString & word, QStringList & sugg, const char* _slot); 00135 00136 void setUpDialog ( bool reallyusedialogbox = TRUE); 00137 00138 void emitProgress (); 00139 bool cleanFputs (const QString & s, bool appendCR=TRUE); 00140 bool cleanFputsWord (const QString & s, bool appendCR=TRUE); 00141 void startIspell(); 00142 bool writePersonalDictionary (); 00143 void initialize( QWidget *_parent, const QString &_caption, 00144 QObject *obj, const char *slot, KOSpellConfig *_ksc, 00145 bool _progressbar, bool _modal ); 00146 void enter_loop(); 00147 bool m_ready; 00148 }; 00149 00150 00151 #endif
KDE Logo
This file is part of the documentation for lib Library Version 1.3.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Sep 28 04:04:00 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003