]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSpellchecker.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiSpellchecker.h
index 1a9ff470a8feee17be234b7f3c60d7c7a9054e81..937d4f294b78087bb843be9781ff3335efb2a414 100644 (file)
@@ -6,6 +6,8 @@
  *
  * \author John Levon
  * \author Kalle Dalheimer
+ * \author Edwin Leuven
+ * \author Abdelrazak Younes
  *
  * Full author contact details are available in file CREDITS.
  */
 #ifndef GUISPELLCHECKER_H
 #define GUISPELLCHECKER_H
 
-#include "GuiDialog.h"
-#include "ControlSpellchecker.h"
-#include "ui_SpellcheckerUi.h"
+#include "DockView.h"
 
 class QListWidgetItem;
 
 namespace lyx {
+
+class docstring_list;
+
 namespace frontend {
 
-class GuiSpellcheckerDialog : public GuiDialog, public Ui::SpellcheckerUi
+class GuiSpellchecker : public DockView
 {
        Q_OBJECT
 
 public:
-       GuiSpellcheckerDialog(LyXView & lv);
-
-public Q_SLOTS:
-       void suggestionChanged(QListWidgetItem *);
+       GuiSpellchecker(GuiView & parent);
+       ~GuiSpellchecker();
 
 private Q_SLOTS:
-       void acceptClicked();
-       void addClicked();
-       void replaceClicked();
-       void ignoreClicked();
-       void replaceChanged(const QString &);
-       void reject();
+       void on_closePB_clicked();
+       void on_findNextPB_clicked();
+       void on_replaceAllPB_clicked();
+       void on_suggestionsLW_itemClicked(QListWidgetItem *);
+       void on_replaceCO_highlighted(const QString & str);
+       void on_ignoreAllPB_clicked();
+       void on_addPB_clicked();
+       void on_ignorePB_clicked();
+       void on_replacePB_clicked();
 
 private:
-       ///
-       void closeEvent(QCloseEvent * e);
        /// update from controller
-       void partialUpdate(int id);
-       /// parent controller
-       ControlSpellchecker & controller();
-       ////
-       void accept();
-       void add();
-       void ignore();
-       void replace();
-       ///
-       void updateContents();
+       void updateSuggestions(docstring_list & words);
+
+       ///{
+       void updateView();
+       bool initialiseParams(std::string const & data);
+       void clearParams() {}
+       void dispatchParams() {}
+       bool isBufferDependent() const { return true; }
+       ///}
+
+       /// check text until next misspelled/unknown word
+       /// returns true when finished
+       void check();
+       /// show count of checked words at normal exit
+       void showSummary();
+
+       bool eventFilter(QObject *obj, QEvent *event);
+
+       struct Private;
+       Private * const d;
 };
 
 } // namespace frontend