]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSpellchecker.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiSpellchecker.h
1 // -*- C++ -*-
2 /**
3  * \file GuiSpellchecker.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author Kalle Dalheimer
9  * \author Edwin Leuven
10  * \author Abdelrazak Younes
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef GUISPELLCHECKER_H
16 #define GUISPELLCHECKER_H
17
18 #include "DockView.h"
19
20 class QListWidgetItem;
21
22 namespace lyx {
23
24 class docstring_list;
25
26 namespace frontend {
27
28 class GuiSpellchecker : public DockView
29 {
30         Q_OBJECT
31
32 public:
33         GuiSpellchecker(GuiView & parent);
34         ~GuiSpellchecker();
35
36 private Q_SLOTS:
37         void on_closePB_clicked();
38         void on_findNextPB_clicked();
39         void on_replaceAllPB_clicked();
40         void on_suggestionsLW_itemClicked(QListWidgetItem *);
41         void on_replaceCO_highlighted(const QString & str);
42         void on_ignoreAllPB_clicked();
43         void on_addPB_clicked();
44         void on_ignorePB_clicked();
45         void on_replacePB_clicked();
46
47 private:
48         /// update from controller
49         void updateSuggestions(docstring_list & words);
50
51         ///{
52         void updateView();
53         bool initialiseParams(std::string const & data);
54         void clearParams() {}
55         void dispatchParams() {}
56         bool isBufferDependent() const { return true; }
57         ///}
58
59         /// check text until next misspelled/unknown word
60         /// returns true when finished
61         void check();
62         /// show count of checked words at normal exit
63         void showSummary();
64
65         bool eventFilter(QObject *obj, QEvent *event);
66
67         struct Private;
68         Private * const d;
69 };
70
71 } // namespace frontend
72 } // namespace lyx
73
74 #endif // GUISPELLCHECKER_H