3 * \file GuiSpellchecker.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Kalle Dalheimer
11 * Full author contact details are available in file CREDITS.
14 #ifndef GUISPELLCHECKER_H
15 #define GUISPELLCHECKER_H
17 #include "GuiDialog.h"
18 #include "ui_SpellcheckerUi.h"
20 #include "WordLangTuple.h"
22 class QListWidgetItem;
30 class GuiSpellchecker : public GuiDialog, public Ui::SpellcheckerUi
35 GuiSpellchecker(GuiView & lv);
39 void suggestionChanged(QListWidgetItem *);
46 void replaceChanged(const QString &);
50 /// update from controller
51 void partialUpdate(int id);
53 void updateContents();
57 SPELL_PROGRESSED, //< update progress bar
58 SPELL_FOUND_WORD //< found a bad word
62 bool initialiseParams(std::string const & data);
66 void dispatchParams() {}
68 bool isBufferDependent() const { return true; }
70 bool exitEarly() const { return exitEarly_; }
72 /// replace word with replacement
73 void replace(docstring const &);
75 /// replace all occurances of word
76 void replaceAll(docstring const &);
77 /// insert word in personal dictionary
79 /// ignore all occurances of word
81 /// check text until next misspelled/unknown word
82 /// returns true when finished
85 docstring getSuggestion() const;
87 docstring getWord() const;
88 /// returns progress value
89 int getProgress() const { return oldval_; }
90 /// returns word count
91 int getCount() const { return count_; }
92 /// give error message is spellchecker dies
94 /// show count of checked words at normal exit
97 /// set to true when spellchecking is finished
99 /// current word being checked and lang code
101 /// values for progress
106 /// The actual spellchecker object
107 SpellBase * speller_;
110 } // namespace frontend
113 #endif // GUISPELLCHECKER_H