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.
13 #include "QSpellcheckerDialog.h"
14 #include "QSpellchecker.h"
16 #include <qcombobox.h>
18 #include <qpushbutton.h>
23 QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
24 : QSpellcheckerDialogBase(0, 0, false, 0),
27 connect(closePB, SIGNAL(clicked()),
28 form, SLOT(slotClose()));
32 void QSpellcheckerDialog::acceptClicked()
38 void QSpellcheckerDialog::addClicked()
44 void QSpellcheckerDialog::replaceClicked()
50 void QSpellcheckerDialog::ignoreClicked()
56 void QSpellcheckerDialog::suggestionChanged(const QString & str)
58 if (replaceCO->count() != 0)
59 replaceCO->changeItem(str, 0);
61 replaceCO->insertItem(str);
63 replaceCO->setCurrentItem(0);
67 void QSpellcheckerDialog::replaceChanged(const QString & str)
69 if (suggestionsLB->currentText() == str)
73 for (; i < suggestionsLB->count(); ++i) {
74 if (suggestionsLB->text(i) == str)
78 if (i != suggestionsLB->count())
79 suggestionsLB->setCurrentItem(i);
83 void QSpellcheckerDialog::closeEvent(QCloseEvent * e)
90 void QSpellcheckerDialog::reject()
93 QSpellcheckerDialogBase::reject();
96 } // namespace frontend