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"
16 #include "qt_helpers.h"
18 #include <qpushbutton.h>
19 #include <qlineedit.h>
21 #include <qcombobox.h>
24 QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
25 : QSpellcheckerDialogBase(0, 0, false, 0),
28 connect(closePB, SIGNAL(clicked()),
29 form, SLOT(slotClose()));
33 void QSpellcheckerDialog::acceptClicked()
39 void QSpellcheckerDialog::addClicked()
45 void QSpellcheckerDialog::replaceClicked()
51 void QSpellcheckerDialog::ignoreClicked()
57 void QSpellcheckerDialog::suggestionChanged(QString const & str)
59 if (replaceCO->count() != 0)
60 replaceCO->changeItem(str, 0);
62 replaceCO->insertItem(str);
64 replaceCO->setCurrentItem(0);
68 void QSpellcheckerDialog::replaceChanged(QString const & str)
70 if (suggestionsLB->currentText() == str)
74 for (; i < suggestionsLB->count(); ++i) {
75 if (suggestionsLB->text(i) == str)
79 if (i != suggestionsLB->count())
80 suggestionsLB->setCurrentItem(i);
84 void QSpellcheckerDialog::closeEvent(QCloseEvent * e)
91 void QSpellcheckerDialog::reject()
94 QSpellcheckerDialogBase::reject();