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