2 * \file QSpellcheckerDialog.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
14 #include "QSpellcheckerDialog.h"
15 #include "QSpellchecker.h"
17 #include <qpushbutton.h>
19 #include <qcombobox.h>
22 QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
23 : QSpellcheckerDialogBase(0, 0, false, 0),
26 connect(closePB, SIGNAL(clicked()),
27 form, SLOT(slotClose()));
31 void QSpellcheckerDialog::acceptClicked()
37 void QSpellcheckerDialog::addClicked()
43 void QSpellcheckerDialog::replaceClicked()
49 void QSpellcheckerDialog::ignoreClicked()
55 void QSpellcheckerDialog::suggestionChanged(const QString & str)
57 if (replaceCO->count() != 0)
58 replaceCO->changeItem(str, 0);
60 replaceCO->insertItem(str);
62 replaceCO->setCurrentItem(0);
66 void QSpellcheckerDialog::replaceChanged(const QString & str)
68 if (suggestionsLB->currentText() == str)
72 for (; i < suggestionsLB->count(); ++i) {
73 if (suggestionsLB->text(i) == str)
77 if (i != suggestionsLB->count())
78 suggestionsLB->setCurrentItem(i);
82 void QSpellcheckerDialog::closeEvent(QCloseEvent * e)
89 void QSpellcheckerDialog::reject()
92 QSpellcheckerDialogBase::reject();