]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSpellchecker.h
Fixed overlapping of both Find Advanced and Spellchecker Dockwidgets (addressing...
[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 SpellcheckerWidget : public QTabWidget
29 {
30         Q_OBJECT
31
32 public:
33         SpellcheckerWidget(GuiView * gv, QWidget * parent = 0);
34         ~SpellcheckerWidget();
35         ///
36         void updateView();
37         ///
38         bool initialiseParams(std::string const & data);
39
40 private Q_SLOTS:
41         void on_findNextPB_clicked();
42         void on_replaceAllPB_clicked();
43         void on_suggestionsLW_itemClicked(QListWidgetItem *);
44         void on_replaceCO_highlighted(const QString & str);
45         void on_languageCO_activated(int index);
46         void on_ignoreAllPB_clicked();
47         void on_addPB_clicked();
48         void on_ignorePB_clicked();
49         void on_replacePB_clicked();
50
51 private:
52         ///
53         bool eventFilter(QObject *obj, QEvent *event);
54         struct Private;
55         Private * const d;
56 };
57
58
59 class GuiSpellchecker : public DockView
60 {
61         Q_OBJECT
62
63 public:
64         GuiSpellchecker(
65                 GuiView & parent, ///< the main window where to dock.
66                 Qt::DockWidgetArea area = Qt::RightDockWidgetArea, ///< Position of the dock (and also drawer)
67                 Qt::WindowFlags flags = 0);
68         ~GuiSpellchecker();
69
70 private:
71         ///{
72         void updateView();
73         bool initialiseParams(std::string const &) { return true; }
74         void clearParams() {}
75         void dispatchParams() {}
76         bool isBufferDependent() const { return false; }
77         ///}
78         /// The encapsulated widget.
79         SpellcheckerWidget * widget_;
80 };
81
82 } // namespace frontend
83 } // namespace lyx
84
85 #endif // GUISPELLCHECKER_H