]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiERT.h
Merge QController into individual dialogs. Also various cleanup
[lyx.git] / src / frontends / qt4 / GuiERT.h
1 // -*- C++ -*-
2 /**
3  * \file GuiERT.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  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIERT_H
13 #define GUIERT_H
14
15 #include "GuiDialogView.h"
16 #include "ControlERT.h"
17 #include "ui_ERTUi.h"
18
19 #include <QCloseEvent>
20 #include <QDialog>
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiERT;
26
27 class GuiERTDialog : public QDialog, public Ui::ERTUi
28 {
29         Q_OBJECT
30 public:
31         GuiERTDialog(GuiERT * form);
32 protected Q_SLOTS:
33         virtual void change_adaptor();
34 protected:
35         virtual void closeEvent(QCloseEvent * e);
36 private:
37         GuiERT * form_;
38 };
39
40
41 class GuiERT : public GuiView<GuiERTDialog>
42 {
43 public:
44         /// constructor
45         GuiERT(Dialog &);
46         /// parent controller
47         ControlERT & controller()
48         { return static_cast<ControlERT &>(this->getController()); }
49         /// parent controller
50         ControlERT const & controller() const
51         { return static_cast<ControlERT const &>(this->getController()); }
52 private:
53         friend class GuiERTDialog;
54         /// Apply changes
55         virtual void apply();
56         /// update
57         virtual void update_contents();
58         /// build the dialog
59         virtual void build_dialog();
60 };
61
62 } // namespace frontend
63 } // namespace lyx
64
65 #endif // GUIERT_H