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()),
33 void QSpellcheckerDialog::stop()
39 void QSpellcheckerDialog::acceptClicked()
45 void QSpellcheckerDialog::spellcheckClicked()
51 void QSpellcheckerDialog::addClicked()
57 void QSpellcheckerDialog::replaceClicked()
63 void QSpellcheckerDialog::ignoreClicked()
69 void QSpellcheckerDialog::suggestionChanged(QString const & str)
71 if (replaceCO->count() != 0)
72 replaceCO->changeItem(str, 0);
74 replaceCO->insertItem(str);
76 replaceCO->setCurrentItem(0);
80 void QSpellcheckerDialog::replaceChanged(QString const & str)
82 if (suggestionsLB->currentText() == str)
86 for (; i < suggestionsLB->count(); ++i) {
87 if (suggestionsLB->text(i) == str)
91 if (i != suggestionsLB->count())
92 suggestionsLB->setCurrentItem(i);
96 void QSpellcheckerDialog::closeEvent(QCloseEvent * e)
104 void QSpellcheckerDialog::reject()
107 QSpellcheckerDialogBase::reject();