00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
00045
00046
00047
00048 KOASpell(
KOSpellConfig *_ksc );
00049
00050
QStringList resultCheckWord(
const QString &_word );
00051
00052
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
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 & );
00101
void slotModalSpellCheckerFinished();
00102
void slotEmitCheckerReady();
00103
00104 };
00105
00106
#endif
00107
#endif