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;
31 : public GuiDialog, public Ui::SpellcheckerUi, public Controller
36 GuiSpellchecker(LyXView & lv);
40 void suggestionChanged(QListWidgetItem *);
47 void replaceChanged(const QString &);
52 void closeEvent(QCloseEvent * e);
53 /// update from controller
54 void partialUpdate(int id);
56 Controller & controller() { return *this; }
58 void updateContents();
62 SPELL_PROGRESSED, //< update progress bar
63 SPELL_FOUND_WORD //< found a bad word
67 bool initialiseParams(std::string const & data);
71 void dispatchParams() {}
73 bool isBufferDependent() const { return true; }
75 bool exitEarly() const { return exitEarly_; }
77 /// replace word with replacement
78 void replace(docstring const &);
80 /// replace all occurances of word
81 void replaceAll(docstring const &);
82 /// insert word in personal dictionary
84 /// ignore all occurances of word
86 /// check text until next misspelled/unknown word
87 /// returns true when finished
90 docstring getSuggestion() const;
92 docstring getWord() const;
93 /// returns progress value
94 int getProgress() const { return oldval_; }
95 /// returns word count
96 int getCount() const { return count_; }
97 /// give error message is spellchecker dies
99 /// show count of checked words at normal exit
102 /// set to true when spellchecking is finished
104 /// current word being checked and lang code
106 /// values for progress
111 /// The actual spellchecker object
112 SpellBase * speller_;
115 } // namespace frontend
118 #endif // GUISPELLCHECKER_H