2 * \file QSpellcheckerDialog.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
11 #include "QSpellcheckerDialog.h"
13 #include "QSpellchecker.h"
16 #include <qpushbutton.h>
17 #include <qlineedit.h>
19 #include <qcombobox.h>
21 QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
22 : QSpellcheckerDialogBase(0, 0, false, 0),
25 connect(closePB, SIGNAL(clicked()),
30 void QSpellcheckerDialog:: suggestionChanged(const QString & str)
32 if (replaceCO->count() != 0)
33 replaceCO->changeItem(str, 0);
35 replaceCO->insertItem(str);
37 replaceCO->setCurrentItem(0);
41 void QSpellcheckerDialog:: replaceChanged(const QString & str)
43 if (suggestionsLB->currentText() == str)
47 for (; i < suggestionsLB->count(); ++i) {
48 if (suggestionsLB->text(i) == str)
52 if (i != suggestionsLB->count())
53 suggestionsLB->setCurrentItem(i);
57 void QSpellcheckerDialog::closeEvent(QCloseEvent * e)