]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBox.h
math stuff
[lyx.git] / src / frontends / qt4 / GuiBox.h
1 // -*- C++ -*-
2 /**
3  * \file GuiBox.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  * \author Martin Vermeer (with useful hints from Angus Leeming)
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUIBOX_H
14 #define GUIBOX_H
15
16 #include "GuiDialog.h"
17 #include "ui_BoxUi.h"
18 #include "insets/InsetBox.h"
19
20 #include <vector>
21
22
23 namespace lyx {
24 namespace frontend {
25
26 class GuiBox : public GuiDialog, public Ui::BoxUi, public Controller
27 {
28         Q_OBJECT
29
30 public:
31         GuiBox(LyXView & lv);
32
33 private Q_SLOTS:
34         void change_adaptor();
35         void innerBoxChanged(const QString &);
36         void typeChanged(int);
37         void restoreClicked();
38
39 private:
40         ///
41         void closeEvent(QCloseEvent * e);
42
43         /// parent controller
44         Controller & controller() { return *this; }
45         /// add and remove special lengths
46         void setSpecial(bool ibox);
47         /// only show valid inner box items
48         void setInnerType(bool frameless, int i);
49
50         /// Apply changes
51         void applyView();
52         /// update
53         void updateContents();
54
55         ///
56         bool initialiseParams(std::string const & data);
57         ///
58         void clearParams();
59         ///
60         void dispatchParams();
61         ///
62         bool isBufferDependent() const { return true; }
63
64         ///
65         std::vector<std::string> ids_;
66         ///
67         std::vector<docstring> gui_names_;
68         ///
69         std::vector<std::string> ids_spec_;
70         ///
71         std::vector<docstring> gui_names_spec_;
72
73         ///
74         InsetBoxParams params_;
75 };
76
77 } // namespace frontend
78 } // namespace lyx
79
80 #endif // GUIBOX_H