]> git.lyx.org Git - features.git/blob - src/frontends/qt4/GuiNomencl.h
2d9536ed570f4a497e33f2968ac035765eb8adf9
[features.git] / src / frontends / qt4 / GuiNomencl.h
1 // -*- C++ -*-
2 /**
3  * \file GuiNomencl.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 O. U. Baran
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef GUINOMENCL_H
15 #define GUINOMENCL_H
16
17 #include "GuiDialogView.h"
18 #include "ControlCommand.h"
19 #include "ui_NomenclUi.h"
20
21 #include <QDialog>
22
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiNomencl;
28
29 class GuiNomenclDialog : public QDialog, public Ui::NomenclUi {
30         Q_OBJECT
31 public:
32         GuiNomenclDialog(GuiNomencl * form);
33         virtual void show();
34 protected Q_SLOTS:
35         virtual void change_adaptor();
36         virtual void reject();
37 protected:
38         virtual void closeEvent(QCloseEvent * e);
39 private:
40         GuiNomencl * form_;
41 };
42
43
44 class GuiNomencl : public GuiView<GuiNomenclDialog>
45 {
46 public:
47         friend class GuiNomenclDialog;
48
49         GuiNomencl(Dialog &, docstring const & title);
50         /// parent controller
51         ControlCommand & controller()
52         { return static_cast<ControlCommand &>(this->getController()); }
53         /// parent controller
54         ControlCommand const & controller() const
55         { return static_cast<ControlCommand const &>(this->getController()); }
56 protected:
57         virtual bool isValid();
58 private:
59         /// Apply changes
60         virtual void apply();
61         /// update
62         virtual void update_contents();
63         /// build the dialog
64         virtual void build_dialog();
65 };
66
67 } // namespace frontend
68 } // namespace lyx
69
70 #endif // GUINOMENCL_H