]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiTabular.h
Fix left/right border UI when toggling formal
[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
42 private:
43         /// \name InsetParamsWidget inherited methods
44         //@{
45         InsetCode insetCode() const { return TABULAR_CODE; }
46         FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
47         QString dialogTitle() const { return qt_("Tabular Settings"); }
48         void paramsToDialog(Inset const *);
49         docstring dialogToParams() const;
50         bool checkWidgets(bool readonly) const;
51         //@}
52
53         ///
54         void enableWidgets() const;
55         ///
56         void setHAlign(std::string & param_str) const;
57         ///
58         void setVAlign(std::string & param_str) const;
59         ///
60         void setTableAlignment(std::string & param_str) const;
61         ///
62         void setWidthAndAlignment();
63         ///
64         bool funcEnabled(Tabular::Feature f) const;
65         ///
66         GuiSetBorder::BorderState borderState(GuiSetBorder::BorderState bs,
67                                               bool const line);
68         ///
69         bool firstheader_suppressable_;
70         ///
71         bool lastfooter_suppressable_;
72         ///
73         GuiSetBorder::BorderState orig_leftborder_;
74         ///
75         GuiSetBorder::BorderState orig_rightborder_;
76 };
77
78 } // namespace frontend
79 } // namespace lyx
80
81 #endif // GUITABULAR_H