]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt2/QSpellcheckerDialog.C
better selection and scrolling behaviour
[lyx.git] / src / frontends / qt2 / QSpellcheckerDialog.C
index 2b576402620295fd0680c537fefe07244c21722f..e8fcc0e81c6a33774bf4522ae5d49f058f354ea7 100644 (file)
@@ -1,13 +1,19 @@
 /**
  * \file QSpellcheckerDialog.C
- * Copyright 2001 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author John Levon <moz@compsoc.man.ac.uk>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
 #include "QSpellcheckerDialog.h"
 #include "QSpellchecker.h"
 #include "gettext.h"
@@ -17,6 +23,7 @@
 #include <qlistbox.h>
 #include <qcombobox.h>
 
+
 QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
        : QSpellcheckerDialogBase(0, 0, false, 0),
        form_(form)
@@ -26,7 +33,43 @@ QSpellcheckerDialog::QSpellcheckerDialog(QSpellchecker * form)
 }
 
 
-void QSpellcheckerDialog:: suggestionChanged(const QString & str)
+void QSpellcheckerDialog::stop()
+{
+       form_->stop();
+}
+
+
+void QSpellcheckerDialog::acceptClicked()
+{
+       form_->accept();
+}
+
+
+void QSpellcheckerDialog::spellcheckClicked()
+{
+       form_->spellcheck();
+}
+
+
+void QSpellcheckerDialog::addClicked()
+{
+       form_->add();
+}
+
+
+void QSpellcheckerDialog::replaceClicked()
+{
+       form_->replace();
+}
+
+
+void QSpellcheckerDialog::ignoreClicked()
+{
+       form_->ignore();
+}
+
+
+void QSpellcheckerDialog::suggestionChanged(QString const & str)
 {
        if (replaceCO->count() != 0)
                replaceCO->changeItem(str, 0);
@@ -37,7 +80,7 @@ void QSpellcheckerDialog:: suggestionChanged(const QString & str)
 }
 
 
-void QSpellcheckerDialog:: replaceChanged(const QString & str)
+void QSpellcheckerDialog::replaceChanged(QString const & str)
 {
        if (suggestionsLB->currentText() == str)
                return;
@@ -55,6 +98,14 @@ void QSpellcheckerDialog:: replaceChanged(const QString & str)
 
 void QSpellcheckerDialog::closeEvent(QCloseEvent * e)
 {
+       form_->stop();
        form_->slotWMHide();
        e->accept();
 }
+
+
+void QSpellcheckerDialog::reject()
+{
+       form_->slotWMHide();
+       QSpellcheckerDialogBase::reject();
+}