]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSpellchecker.h
move our stuff off the Q* namespace
[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  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef QSPELLCHECKER_H
14 #define QSPELLCHECKER_H
15
16 #include "GuiDialogView.h"
17 #include "ui_SpellcheckerUi.h"
18
19 #include <QDialog>
20 #include <QCloseEvent>
21
22 class QListWidgetItem;
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiSpellchecker;
28
29 class GuiSpellcheckerDialog: public QDialog, public Ui::SpellcheckerUi {
30         Q_OBJECT
31 public:
32         GuiSpellcheckerDialog(GuiSpellchecker * form);
33 public Q_SLOTS:
34         virtual void suggestionChanged(QListWidgetItem *);
35
36 protected Q_SLOTS:
37         virtual void acceptClicked();
38         virtual void addClicked();
39         virtual void replaceClicked();
40         virtual void ignoreClicked();
41         virtual void replaceChanged(const QString &);
42         virtual void reject();
43
44 protected:
45         virtual void closeEvent(QCloseEvent * e);
46
47 private:
48         GuiSpellchecker * form_;
49 };
50
51
52 class ControlSpellchecker;
53
54 class GuiSpellchecker
55         : public QController<ControlSpellchecker, GuiView<GuiSpellcheckerDialog> >
56 {
57 public:
58         friend class GuiSpellcheckerDialog;
59
60         GuiSpellchecker(Dialog &);
61
62         /// update from controller
63         void partialUpdate(int id);
64 private:
65         void accept();
66         void add();
67         void ignore();
68         void replace();
69
70         /// Apply changes
71         virtual void apply() {}
72         ///
73         virtual void update_contents();
74         /// build the dialog
75         virtual void build_dialog();
76 };
77
78 } // namespace frontend
79 } // namespace lyx
80
81 #endif // QSPELLCHECKER_H