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