]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiTabular.h
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / GuiTabular.h
1 // -*- C++ -*-
2 /**
3  * \file GuiTabular.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 Jürgen Spitzmüller
10  * \author Herbert Voß
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef GUITABULAR_H
16 #define GUITABULAR_H
17
18 #include "InsetParamsWidget.h"
19 #include "ui_TabularUi.h"
20 #include "insets/InsetTabular.h"
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiTabular : public InsetParamsWidget, public Ui::TabularUi
26 {
27         Q_OBJECT
28
29 public:
30         GuiTabular(QWidget * parent = 0);
31
32 private Q_SLOTS:
33         void checkEnabled();
34         void borderSet_clicked();
35         void borderUnset_clicked();
36         void booktabs_toggled(bool const check);
37         void nonbooktabs_toggled(bool const check);
38         void on_topspaceCO_activated(int index);
39         void on_bottomspaceCO_activated(int index);
40         void on_interlinespaceCO_activated(int index);
41         void on_columnTypeCO_activated(int index);
42
43 private:
44         /// \name InsetParamsWidget inherited methods
45         //@{
46         InsetCode insetCode() const { return TABULAR_CODE; }
47         FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
48         QString dialogTitle() const { return qt_("Tabular Settings"); }
49         void paramsToDialog(Inset const *);
50         docstring dialogToParams() const;
51         bool checkWidgets(bool readonly) const;
52         //@}
53
54         ///
55         void enableWidgets() const;
56         ///
57         void setHAlign(std::string & param_str) const;
58         ///
59         void setVAlign(std::string & param_str) const;
60         ///
61         void setTableAlignment(std::string & param_str) const;
62         ///
63         void setWidthAndAlignment();
64         ///
65         bool funcEnabled(Tabular::Feature f) const;
66         ///
67         GuiSetBorder::BorderState borderState(GuiSetBorder::BorderState bs,
68                                               bool const line);
69         ///
70         bool firstheader_suppressable_;
71         ///
72         bool lastfooter_suppressable_;
73         ///
74         GuiSetBorder::BorderState orig_leftborder_;
75         ///
76         GuiSetBorder::BorderState orig_rightborder_;
77         ///
78         int lastrow_;
79 };
80
81 } // namespace frontend
82 } // namespace lyx
83
84 #endif // GUITABULAR_H