]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiWrap.h
rename a few view functions from foo() to fooView()
[lyx.git] / src / frontends / qt4 / GuiWrap.h
1 // -*- C++ -*-
2 /**
3  * \file GuiWrap.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Spitzmüller
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIWRAP_H
13 #define GUIWRAP_H
14
15 #include "GuiDialogView.h"
16 #include "ControlWrap.h"
17 #include "ui_WrapUi.h"
18
19 #include <QDialog>
20
21 namespace lyx {
22 namespace frontend {
23
24 class GuiWrap;
25
26 class GuiWrapDialog : public QDialog, public Ui::WrapUi
27 {
28         Q_OBJECT
29 public:
30         GuiWrapDialog(GuiWrap * form);
31 protected Q_SLOTS:
32         virtual void change_adaptor();
33 protected:
34         virtual void closeEvent(QCloseEvent * e);
35 private:
36         GuiWrap * form_;
37 };
38
39
40 class GuiWrap : public GuiView<GuiWrapDialog>
41 {
42 public:
43         friend class GuiWrapDialog;
44
45         GuiWrap(GuiDialog &);
46         /// parent controller
47         ControlWrap & controller()
48         { return static_cast<ControlWrap &>(this->getController()); }
49         /// parent controller
50         ControlWrap const & controller() const
51         { return static_cast<ControlWrap const &>(this->getController()); }
52 private:
53         /// Apply changes
54         virtual void applyView();
55         /// update
56         virtual void update_contents();
57         /// build the dialog
58         virtual void build_dialog();
59 };
60
61 } // namespace frontend
62 } // namespace lyx
63
64 #endif // GUIWRAP_H