27 #include <sys/types.h>
37 #include <tqtextcodec.h>
40 #include <tdeapplication.h>
41 #include <tdemessagebox.h>
45 #include "tdespelldlg.h"
49 #define MAXLINELENGTH 10000
59 enum checkMethod { Method1 = 0, Method2 };
69 class KSpell::KSpellPrivate
73 bool m_bIgnoreUpperWords;
74 bool m_bIgnoreTitleCase;
75 bool m_bNoMisspellingsEncountered;
79 TQValueList<BufferedWord> unchecked;
80 TQTimer *checkNextTimer;
100 #define OUTPUT(x) (connect (proc, TQ_SIGNAL (readReady(KProcIO *)), this, TQ_SLOT (x(KProcIO *))))
103 #define NOOUTPUT(x) (disconnect (proc, TQ_SIGNAL (readReady(KProcIO *)), this, TQ_SLOT (x(KProcIO *))))
109 bool _progressbar,
bool _modal )
111 initialize( _parent, _caption, obj, slot, _ksc,
112 _progressbar, _modal, Text );
119 initialize( _parent, _caption, obj, slot, _ksc,
120 _progressbar, _modal, type );
129 static bool determineASpellV6()
132 FILE *fs = popen(
"aspell -v",
"r");
137 TQTextStream ts(fs, IO_ReadOnly);
138 result = ts.read().stripWhiteSpace();
143 TQRegExp rx(
"Aspell (\\d.\\d)");
144 if (rx.search(result) != -1)
146 float version = rx.cap(1).toFloat();
147 return (version >= 0.6);
154 KSpell::startIspell()
157 if ((trystart == 0) && (ksconfig->
client() == KS_CLIENT_ASPELL))
158 d->aspellV6 = determineASpellV6();
162 if ( trystart > 0 ) {
166 switch ( ksconfig->
client() )
168 case KS_CLIENT_ISPELL:
172 case KS_CLIENT_ASPELL:
176 case KS_CLIENT_HSPELL:
180 case KS_CLIENT_ZEMBEREK:
186 if ( ksconfig->
client() == KS_CLIENT_ISPELL || ksconfig->
client() == KS_CLIENT_ASPELL )
188 *proc <<
"-a" <<
"-S";
205 if ( ksconfig->
client() == KS_CLIENT_ISPELL )
217 if (ksconfig->runTogether())
229 if (! ksconfig->dictionary().isEmpty())
231 kdDebug(750) <<
"using dictionary [" << ksconfig->dictionary() <<
"]" <<
endl;
233 *proc << ksconfig->dictionary();
243 switch ( ksconfig->encoding() )
263 kdError(750) <<
"charsets ISO-8859-4, -5, -7, -8, -9 and -13 not supported yet" <<
endl;
266 if (ksconfig->
client() == KS_CLIENT_ISPELL)
276 kdError(750) <<
"ISO-8859-15 not supported for aspell yet." <<
endl;
280 if (ksconfig->
client() == KS_CLIENT_ASPELL)
281 *proc <<
"--encoding=utf-8";
299 connect( proc, TQ_SIGNAL(receivedStderr(
TDEProcess *,
char *,
int)),
300 this, TQ_SLOT(ispellErrors(
TDEProcess *,
char *,
int)) );
302 connect( proc, TQ_SIGNAL(processExited(
TDEProcess *)),
308 if ( !proc->
start() )
311 TQTimer::singleShot( 0,
this, TQ_SLOT(emitDeath()));
316 KSpell::ispellErrors(
TDEProcess *,
char *buffer,
int buflen )
318 buffer[buflen-1] =
'\0';
322 void KSpell::KSpell2(
KProcIO * )
329 trystart = maxtrystart;
332 if ( proc->
readln( line,
true ) == -1 )
334 TQTimer::singleShot( 0,
this, TQ_SLOT(emitDeath()) );
339 if ( line[0] !=
'@' )
341 TQTimer::singleShot( 0,
this, TQ_SLOT(emitDeath()) );
349 TQTimer::singleShot( 0,
this, TQ_SLOT(emitDeath()) );
357 TQTimer::singleShot( 0,
this, TQ_SLOT(emitDeath()) );
368 KSpell::setUpDialog(
bool reallyuseprogressbar )
374 ksdlg =
new KSpellDlg( parent,
"dialog",
375 progressbar && reallyuseprogressbar,
modaldlg );
376 ksdlg->setCaption( caption );
378 connect( ksdlg, TQ_SIGNAL(command(
int)),
379 this, TQ_SLOT(slotStopCancel(
int)) );
380 connect(
this, TQ_SIGNAL(
progress(
unsigned int)),
381 ksdlg, TQ_SLOT(slotProgress(
unsigned int)) );
393 TQString qs = word.simplifyWhiteSpace();
396 if ( qs.find(
' ') != -1 || qs.isEmpty() )
405 bool KSpell::writePersonalDictionary()
412 TQString qs = word.simplifyWhiteSpace();
415 if ( qs.find (
' ') != -1 || qs.isEmpty() )
424 KSpell::cleanFputsWord(
const TQString & s,
bool appendCR )
429 for(
unsigned int i = 0; i < qs.length(); i++ )
432 if ( qs[i] !=
'\'' && qs[i] !=
'\"' && qs[i] !=
'-'
433 && qs[i].isPunct() || qs[i].isSpace() )
438 if ( qs[i].isLetter() )
451 KSpell::cleanFputs(
const TQString & s,
bool appendCR )
454 unsigned l = qs.length();
457 for(
unsigned int i = 0; i < l; ++i )
463 if ( l<MAXLINELENGTH )
470 return proc->
writeStdin( TQString::fromAscii(
"^\n" ),appendCR );
476 BufferedWord bufferedWord;
477 bufferedWord.method = Method1;
478 bufferedWord.word = buffer;
479 bufferedWord.useDialog = _usedialog;
480 d->unchecked.append( bufferedWord );
484 TQString qs = buffer.simplifyWhiteSpace();
486 if ( qs.find (
' ') != -1 || qs.isEmpty() ) {
487 d->checkNextTimer->start( 0,
true );
491 dialog3slot = TQ_SLOT(checkWord3());
493 usedialog = _usedialog;
494 setUpDialog(
false );
503 while (proc->
readln( blank_line,
true ) != -1);
517 BufferedWord bufferedWord;
518 bufferedWord.method = Method2;
519 bufferedWord.word = buffer;
520 bufferedWord.useDialog = _usedialog;
521 bufferedWord.suggest = suggest;
522 d->unchecked.append( bufferedWord );
526 TQString qs = buffer.simplifyWhiteSpace();
528 if ( qs.find (
' ') != -1 || qs.isEmpty() ) {
529 d->checkNextTimer->start( 0,
true );
535 dialog3slot = TQ_SLOT(checkWord3());
536 usedialog = _usedialog;
537 setUpDialog(
false );
547 while (proc->
readln( blank_line,
true ) != -1);
558 void KSpell::checkWord2(
KProcIO* )
562 proc->
readln( line,
true );
574 while (proc->
readln( blank_line,
true ) != -1);
575 NOOUTPUT(checkWord2);
577 bool mistake = ( parseOneResponse(line, word, sugg) == MISTAKE );
578 if ( mistake && usedialog )
581 dialog( word, sugg, TQ_SLOT(checkWord3()) );
582 d->checkNextTimer->start( 0,
true );
593 d->checkNextTimer->start( 0,
true );
596 void KSpell::checkNext()
600 if (!d->unchecked.empty()) {
601 BufferedWord buf = d->unchecked.front();
602 d->unchecked.pop_front();
604 if (buf.method == Method1)
607 checkWord( buf.word, buf.useDialog, buf.suggest );
611 void KSpell::suggestWord(
KProcIO * )
615 proc->
readln( line,
true );
621 proc->
readln( blank_line,
true );
623 NOOUTPUT(checkWord2);
625 bool mistake = ( parseOneResponse(line, word, sugg) == MISTAKE );
626 if ( mistake && usedialog )
629 dialog( word, sugg, TQ_SLOT(checkWord3()) );
634 void KSpell::checkWord3()
636 disconnect(
this, TQ_SIGNAL(dialog3()),
this, TQ_SLOT(checkWord3()) );
638 emit
corrected( cwword, replacement(), 0L );
641 TQString KSpell::funnyWord(
const TQString & word )
648 for( i=0; word [i]!=
'\0';i++ )
658 for( j = i+1; word[j] !=
'\0' && word[j] !=
'+' && word[j] !=
'-'; j++ )
663 if ( !( k = qs.findRev(shorty) ) || k != -1 )
664 qs.remove( k, shorty.length() );
679 int KSpell::parseOneResponse(
const TQString &buffer, TQString &word, TQStringList & sugg )
692 if ( buffer[0] ==
'*' || buffer[0] ==
'+' || buffer[0] ==
'-' )
697 if ( buffer[0] ==
'&' || buffer[0] ==
'?' || buffer[0] ==
'#' )
702 word = buffer.mid( 2, buffer.find(
' ', 3 ) -2 );
706 if( d->m_bIgnoreTitleCase && word == word.upper() )
709 if( d->m_bIgnoreUpperWords && word[0] == word[0].upper() )
711 TQString text = word[0] + word.right( word.length()-1 ).lower();
720 if ( ignorelist.findIndex( word.lower() ) != -1 )
726 if ( buffer.find(
':' ) != -1 )
727 qs2 = buffer.left( buffer.find(
':') );
731 posinline = qs2.right( qs2.length()-qs2.findRev(
' ') ).toInt()-1;
734 TQStringList::Iterator it = replacelist.begin();
735 for( ;it != replacelist.end(); ++it, ++it )
746 if ( buffer[0] !=
'#' )
748 TQString qs = buffer.mid( buffer.find(
':')+2, buffer.length() );
753 while( (
unsigned int)i < qs.length() )
755 TQString temp = qs.mid( i, (j=qs.find (
',',i)) - i );
756 sugg.append( funnyWord(temp) );
762 if ( (sugg.count()==1) && (sugg.first() == word) )
768 if ( buffer.isEmpty() ) {
769 kdDebug(750) <<
"Got an empty response: ignoring"<<
endl;
773 kdError(750) <<
"HERE?: [" << buffer <<
"]" <<
endl;
774 kdError(750) <<
"Please report this to zack@kde.org" <<
endl;
778 emit
done( KSpell::origbuffer );
786 if ((totalpos=wordlist->count())==0)
788 wlIt = wordlist->begin();
789 usedialog=_usedialog;
795 dialog3slot = TQ_SLOT (checkList4 ());
809 void KSpell::checkList2 ()
814 if (wlIt != wordlist->end())
816 kdDebug(750) <<
"KS::cklist2 " << lastpos <<
": " << *wlIt <<
endl;
818 d->endOfResponse =
false;
821 put = cleanFputsWord (*wlIt);
834 NOOUTPUT(checkList3a);
840 void KSpell::checkList3a (
KProcIO *)
859 tempe=proc->
readln( line,
true );
865 d->endOfResponse =
true;
867 }
else if ( tempe>0 ) {
868 if ( (e=parseOneResponse( line, word, sugg ) ) == MISTAKE ||
875 TQString old = *(--wlIt); ++wlIt;
876 dlgreplacement = word;
877 checkListReplaceCurrent();
879 emit
corrected( old, *(--wlIt), lastpos ); ++wlIt;
886 dialog( word, sugg, TQ_SLOT(checkList4()) );
891 d->m_bNoMisspellingsEncountered =
false;
906 if (d->endOfResponse && !dlgon) {
912 void KSpell::checkListReplaceCurrent()
919 s.replace(posinline+offset,orig.length(),replacement());
920 offset += replacement().length()-orig.length();
921 wordlist->insert (wlIt, s);
922 wlIt = wordlist->remove (wlIt);
927 void KSpell::checkList4 ()
933 disconnect (
this, TQ_SIGNAL (dialog3()),
this, TQ_SLOT (checkList4()));
940 kdDebug(750) <<
"KS: cklist4: lastpos: " << lastpos <<
endl;
944 checkListReplaceCurrent();
945 emit
corrected( old, *(--wlIt), lastpos );
970 if (!d->endOfResponse) {
980 usedialog = _usedialog;
983 dialog3slot = TQ_SLOT(check3());
986 origbuffer = _buffer;
987 if ( ( totalpos = origbuffer.length() ) == 0 )
989 emit
done( origbuffer );
996 if ( !origbuffer.endsWith(
"\n\n" ) )
998 if (origbuffer.at(origbuffer.length()-1)!=
'\n')
1007 newbuffer = origbuffer;
1014 offset = lastlastline = lastpos = lastline = 0;
1019 int i = origbuffer.find(
'\n', 0 ) + 1;
1020 qs = origbuffer.mid( 0, i );
1021 cleanFputs( qs,
false );
1036 void KSpell::check2(
KProcIO * )
1042 static bool recursive =
false;
1052 tempe = proc->
readln( line,
false );
1057 if ( ( e=parseOneResponse (line, word, sugg) )==MISTAKE ||
1063 if ((ksconfig->encoding() == KS_E_UTF8) && !d->aspellV6) {
1070 posinline = (TQString::fromUtf8(
1071 origbuffer.mid(lastlastline,lastline-lastlastline).utf8(),
1072 posinline)).length();
1076 lastpos = posinline+lastlastline+offset;
1082 dlgreplacement=word;
1083 emit
corrected( orig, replacement(), lastpos );
1084 offset += replacement().length()-orig.length();
1085 newbuffer.replace( lastpos, orig.length(), word );
1093 dialog( word, sugg, TQ_SLOT(check3()) );
1096 d->m_bNoMisspellingsEncountered =
false;
1098 dlgresult = KS_IGNORE;
1112 if ( tempe == -1 ) {
1125 if ( (
unsigned int)lastline < origbuffer.length() )
1132 lastpos = (lastlastline=lastline) + offset;
1133 i = origbuffer.find(
'\n', lastline) + 1;
1134 qs = origbuffer.mid( lastline, i-lastline );
1135 cleanFputs( qs,
false );
1145 newbuffer.truncate( newbuffer.length()-2 );
1147 emit
done( newbuffer );
1152 void KSpell::check3 ()
1155 disconnect (
this, TQ_SIGNAL (dialog3()),
this, TQ_SLOT (check3()));
1156 kdDebug(750) <<
"check3 [" << cwword <<
"] [" << replacement() <<
"] " << dlgresult <<
endl;
1163 offset+=replacement().length()-cwword.length();
1164 newbuffer.replace (lastpos, cwword.length(),
1166 emit
corrected (dlgorigword, replacement(), lastpos);
1171 emit
done( origbuffer );
1175 emit
done( origbuffer );
1183 emit
done (newbuffer);
1191 KSpell::slotStopCancel (
int result)
1193 if (dialogwillprocess)
1196 kdDebug(750) <<
"KSpell::slotStopCancel [" << result <<
"]" <<
endl;
1198 if (result==KS_STOP || result==KS_CANCEL)
1199 if (!dialog3slot.isEmpty())
1202 connect (
this, TQ_SIGNAL (dialog3()),
this, dialog3slot.ascii());
1208 void KSpell::dialog(
const TQString & word, TQStringList & sugg,
const char *_slot )
1212 dialog3slot = _slot;
1213 dialogwillprocess =
true;
1214 connect( ksdlg, TQ_SIGNAL(command(
int)),
this, TQ_SLOT(dialog2(
int)) );
1215 TQString tmpBuf = newbuffer;
1220 TQString marker(
"_MARKER_" );
1221 tmpBuf.replace( lastpos, word.length(), marker );
1222 TQString context = tmpBuf.mid(TQMAX(lastpos-18,0), 2*18+marker.length());
1223 context.replace(
'\n',TQString::fromLatin1(
" "));
1224 context.replace(
'<', TQString::fromLatin1(
"<") );
1225 context.replace(
'>', TQString::fromLatin1(
">") );
1226 context.replace( marker, TQString::fromLatin1(
"<b>%1</b>").arg( word ) );
1227 context =
"<qt>" + context +
"</qt>";
1229 ksdlg->init( word, &sugg, context );
1230 d->m_bNoMisspellingsEncountered =
false;
1237 void KSpell::dialog2(
int result )
1241 disconnect( ksdlg, TQ_SIGNAL(command(
int)),
this, TQ_SLOT(dialog2(
int)) );
1242 dialogwillprocess =
false;
1246 dlgreplacement = ksdlg->replacement();
1249 switch ( dlgresult )
1256 ignorelist.prepend( dlgorigword.lower() );
1261 personaldict =
true;
1264 ignorelist.prepend( dlgorigword.lower() );
1268 replacelist.append( dlgorigword );
1269 TQString _replacement = replacement();
1270 replacelist.append( _replacement );
1271 emit
replaceall( dlgorigword , _replacement );
1275 checkWord( ksdlg->replacement(),
false,
true );
1280 connect(
this, TQ_SIGNAL(dialog3()),
this, dialog3slot.ascii() );
1290 delete d->checkNextTimer;
1304 if ( m_status == Cleaning )
1307 if ( m_status == Running )
1310 writePersonalDictionary();
1311 m_status = Cleaning;
1318 kdDebug() <<
"KSpell::ispellExit() " << m_status <<
endl;
1320 if ( (m_status == Starting) && (trystart < maxtrystart) )
1327 if ( m_status == Starting )
1329 else if (m_status == Cleaning)
1330 m_status = d->m_bNoMisspellingsEncountered ? FinishedNoMisspellingsEncountered : Finished;
1331 else if ( m_status == Running )
1337 TQTimer::singleShot( 0,
this, TQ_SLOT(emitDeath()) );
1343 void KSpell::emitDeath()
1345 bool deleteMe = autoDelete;
1356 void KSpell::emitProgress ()
1358 uint nextprog = (uint) (100.*lastpos/(
double)totalpos);
1360 if ( nextprog >= curprog )
1369 TQPoint pt( x,y ), pt2;
1370 pt2 = parent->mapToGlobal( pt );
1371 ksdlg->move( pt2.x(),pt2.y() );
1376 d->m_bIgnoreUpperWords=_ignore;
1381 d->m_bIgnoreTitleCase=_ignore;
1402 KSpell* spell =
new KSpell( 0L, i18n(
"Spell Checker"), 0 ,
1403 0, _kcs,
true,
true );
1405 while (spell->
status()!=Finished)
1406 kapp->processEvents();
1414 void KSpell::slotSpellCheckerCorrected(
const TQString & oldText,
const TQString & newText,
unsigned int pos )
1416 modaltext=modaltext.replace(pos,oldText.length(),newText);
1420 void KSpell::slotModalReady()
1425 Q_ASSERT( m_status == Running );
1426 connect(
this, TQ_SIGNAL(
done(
const TQString & ) ),
1427 this, TQ_SLOT( slotModalDone(
const TQString & ) ) );
1428 TQObject::connect(
this, TQ_SIGNAL(
corrected(
const TQString&,
const TQString&,
unsigned int ) ),
1429 this, TQ_SLOT( slotSpellCheckerCorrected(
const TQString&,
const TQString &,
unsigned int ) ) );
1430 TQObject::connect(
this, TQ_SIGNAL(
death() ),
1431 this, TQ_SLOT( slotModalSpellCheckerFinished( ) ) );
1435 void KSpell::slotModalDone(
const TQString & )
1445 slotModalSpellCheckerFinished();
1448 void KSpell::slotModalSpellCheckerFinished( )
1450 modalreturn=(int)this->
status();
1453 void KSpell::initialize( TQWidget *_parent,
const TQString &_caption,
1455 bool _progressbar,
bool _modal, SpellerType type )
1457 d =
new KSpellPrivate;
1459 d->m_bIgnoreUpperWords =
false;
1460 d->m_bIgnoreTitleCase =
false;
1461 d->m_bNoMisspellingsEncountered =
true;
1463 d->checking =
false;
1464 d->aspellV6 =
false;
1465 d->checkNextTimer =
new TQTimer(
this );
1466 connect( d->checkNextTimer, TQ_SIGNAL( timeout() ),
1467 this, TQ_SLOT( checkNext() ));
1470 progressbar = _progressbar;
1484 switch ( ksconfig->encoding() )
1487 codec = TQTextCodec::codecForName(
"ISO 8859-1");
1490 codec = TQTextCodec::codecForName(
"ISO 8859-2");
1493 codec = TQTextCodec::codecForName(
"ISO 8859-3");
1496 codec = TQTextCodec::codecForName(
"ISO 8859-4");
1499 codec = TQTextCodec::codecForName(
"ISO 8859-5");
1502 codec = TQTextCodec::codecForName(
"ISO 8859-7");
1505 codec = TQTextCodec::codecForName(
"ISO 8859-8-i");
1508 codec = TQTextCodec::codecForName(
"ISO 8859-9");
1511 codec = TQTextCodec::codecForName(
"ISO 8859-13");
1514 codec = TQTextCodec::codecForName(
"ISO 8859-15");
1517 codec = TQTextCodec::codecForName(
"UTF-8");
1520 codec = TQTextCodec::codecForName(
"KOI8-R");
1523 codec = TQTextCodec::codecForName(
"KOI8-U");
1526 codec = TQTextCodec::codecForName(
"CP1251");
1529 codec = TQTextCodec::codecForName(
"CP1255");
1535 kdDebug(750) << __FILE__ <<
":" << __LINE__ <<
" Codec = " << (codec ? codec->name() :
"<default>") <<
endl;
1538 ignorelist += ksconfig->ignoreList();
1540 replacelist += ksconfig->replaceAllList();
1541 texmode=dlgon=
false;
1542 m_status = Starting;
1543 dialogsetup =
false;
1547 dialogwillprocess =
false;
1548 dialog3slot = TQString::null;
1550 personaldict =
false;
1562 connect(
this, TQ_SIGNAL(
ready(
KSpell *)), obj, slot);
1565 connect(
this, TQ_SIGNAL(
ready(
KSpell *)),
this, TQ_SLOT(slotModalReady()) );
1572 TQString KSpell::modaltext;
1573 int KSpell::modalreturn = 0;
1574 TQWidget* KSpell::modalWidgetHack = 0;
1576 #include "tdespell.moc"
static void information(TQWidget *parent, const TQString &text, const TQString &caption=TQString::null, const TQString &dontShowAgainName=TQString::null, int options=Notify)
Display an "Information" dialog.
bool writeStdin(const TQString &line, bool appendnewline=true)
bool start(RunMode runmode=NotifyOnExit, bool includeStderr=false)
void enableReadSignals(bool enable)
int readln(TQString &line, bool autoAck=true, bool *partial=0)
A configuration class/dialog for KSpell.
void setIgnoreList(TQStringList _ignorelist)
@sect Options setting routines.
void setReplaceAllList(TQStringList _replaceAllList)
The _replaceAllList contains word you like that replace word.
bool noRootAffix() const
Options reading routines.
int client() const
Spell checker client, see KSpellClients.
void corrected(const TQString &originalword, const TQString &newword, unsigned int pos)
Emitted after the "Replace" or "Replace All" buttons of the dialog was pressed, or if the word was co...
spellStatus status() const
Returns the status of KSpell.
virtual bool ignore(const TQString &word)
Tells ISpell/ASpell to ignore this word for the life of this KSpell instance.
void ready(KSpell *)
Emitted after KSpell has verified that ISpell/ASpell is running and working properly.
KSpell(TQWidget *parent, const TQString &caption, TQObject *receiver, const char *slot, KSpellConfig *kcs=0, bool progressbar=true, bool modal=false)
Starts the spellchecker.
void ignoreword(const TQString &originalword)
Emitted when the user pressed "Ignore" in the dialog.
int heightDlg() const
Returns the height of the dialog box.
void ignoreall(const TQString &originalword)
Emitted when the user pressed "Ignore All" in the dialog.
virtual ~KSpell()
The destructor instructs ISpell/ASpell to write out the personal dictionary and then terminates ISpel...
virtual bool checkWord(const TQString &_buffer, bool usedialog=false)
Spellchecks a single word.
void hide()
Hides the dialog box.
void setIgnoreUpperWords(bool b)
Call setIgnoreUpperWords(true) to tell the spell-checker to ignore words that are completely uppercas...
void misspelling(const TQString &originalword, const TQStringList &suggestions, unsigned int pos)
Emitted whenever a misspelled word is found by check() or by checkWord().
KSpellConfig ksConfig() const
void moveDlg(int x, int y)
Moves the dialog.
static int modalCheck(TQString &text) TDE_DEPRECATED
void setIgnoreTitleCase(bool b)
Call setIgnoreTitleCase(true) to tell the spell-checker to ignore words with a 'title' case,...
virtual void cleanUp()
Cleans up ISpell.
void setProgressResolution(unsigned int res)
Sets the resolution (in percent) of the progress() signals.
int widthDlg() const
Returns the width of the dialog box.
SpellerType
These are possible types of documents which the spell checker can check.
virtual bool check(const TQString &_buffer, bool usedialog=true)
Spellchecks a buffer of many words in plain text format.
void replaceall(const TQString &origword, const TQString &replacement)
Emitted when the user pressed "ReplaceAll" in the dialog.
virtual bool addPersonal(const TQString &word)
Adds a word to the user's personal dictionary.
void progress(unsigned int i)
Emitted during a check().
bool modaldlg
Used for modalCheck.
void addword(const TQString &originalword)
Emitted when the user pressed "Add" in the dialog.
virtual bool checkList(TQStringList *_wordlist, bool usedialog=true)
Spellchecks a list of words.
void done(const TQString &buffer)
Emitted when check() is done.
void death()
Emitted on terminal errors and after clean up.
static void setIcons(WId win, const TQPixmap &icon, const TQPixmap &miniIcon)
kndbgstream & endl(kndbgstream &s)
kdbgstream kdError(int area=0)
kdbgstream kdDebug(int area=0)