]> git.lyx.org Git - lyx.git/blob - src/frontends/qt/GuiBox.h
Hack to display section symbol
[lyx.git] / src / frontends / qt / 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 "ColorCode.h"
17 #include "InsetParamsWidget.h"
18 #include "ui_BoxUi.h"
19
20 namespace lyx {
21 namespace frontend {
22
23 class GuiBox : public InsetParamsWidget, public Ui::BoxUi
24 {
25         Q_OBJECT
26
27 public:
28         GuiBox(QWidget * parent = 0);
29
30 private Q_SLOTS:
31         void on_innerBoxCO_activated(int);
32         void on_typeCO_activated(int);
33         void on_frameColorCO_currentIndexChanged(int);
34         void initDialog();
35         void on_widthCB_stateChanged(int state);
36         void on_heightCB_stateChanged(int state);
37         void on_pagebreakCB_stateChanged();
38
39 private:
40         /// \name DialogView inherited methods
41         //@{
42         InsetCode insetCode() const override { return BOX_CODE; }
43         FuncCode creationCode() const override { return LFUN_BOX_INSERT; }
44         QString dialogTitle() const override { return qt_("Box Settings"); }
45         void paramsToDialog(Inset const *) override;
46         docstring dialogToParams() const override;
47         bool checkWidgets(bool readonly) const override;
48         //@}
49
50         /// Fill the color combos
51         void fillComboColor(QComboBox * combo, bool const is_none);
52         /// add and remove special lengths
53         void setSpecial(bool ibox);
54         /// only show valid inner box items
55         void setInnerType(bool frameless, QString const & type);
56
57         QStringList ids_;
58         ///
59         QStringList gui_names_;
60         ///
61         QStringList ids_spec_;
62         ///
63         QStringList gui_names_spec_;
64         ///
65         QList<ColorCode> color_codes_;
66 };
67
68 } // namespace frontend
69 } // namespace lyx
70
71 #endif // GUIBOX_H