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"
12 #include "QSpellchecker.h"
15 #include <qpushbutton.h>
16 #include <qlineedit.h>
18 #include <qcombobox.h>
20 QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
21 : QSpellcheckerDialogBase(0, 0, false, 0),
24 connect(closePB, SIGNAL(clicked()),
29 void QSpellcheckerDialog:: suggestionChanged(const QString & str)
31 if (replaceCO->count() != 0)
32 replaceCO->changeItem(str, 0);
34 replaceCO->insertItem(str);
36 replaceCO->setCurrentItem(0);
40 void QSpellcheckerDialog:: replaceChanged(const QString & str)
42 if (suggestionsLB->currentText() == str)
46 for (; i < suggestionsLB->count(); ++i) {
47 if (suggestionsLB->text(i) == str)
51 if (i != suggestionsLB->count())
52 suggestionsLB->setCurrentItem(i);
56 void QSpellcheckerDialog::closeEvent(QCloseEvent * e)