]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiBox.h
Make GuiRef and GuiInclude subclasses of GuiCommand.
[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
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         /// add and remove special lengths
44         void setSpecial(bool ibox);
45         /// only show valid inner box items
46         void setInnerType(bool frameless, int i);
47
48         /// Apply changes
49         void applyView();
50         /// update
51         void updateContents();
52
53         ///
54         bool initialiseParams(std::string const & data);
55         ///
56         void clearParams();
57         ///
58         void dispatchParams();
59         ///
60         bool isBufferDependent() const { return true; }
61
62         ///
63         std::vector<std::string> ids_;
64         ///
65         std::vector<docstring> gui_names_;
66         ///
67         std::vector<std::string> ids_spec_;
68         ///
69         std::vector<docstring> gui_names_spec_;
70
71         ///
72         InsetBoxParams params_;
73 };
74
75 } // namespace frontend
76 } // namespace lyx
77
78 #endif // GUIBOX_H