4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Kalle Dalheimer
9 * \author Jürgen Spitzmüller
12 * Full author contact details are available in file CREDITS.
18 #include "InsetParamsWidget.h"
19 #include "ui_TabularUi.h"
20 #include "insets/InsetTabular.h"
25 class GuiTabular : public InsetParamsWidget, public Ui::TabularUi
30 GuiTabular(QWidget * parent = 0);
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);
44 /// \name InsetParamsWidget inherited methods
46 InsetCode insetCode() const override { return TABULAR_CODE; }
47 FuncCode creationCode() const override { return LFUN_TABULAR_INSERT; }
48 QString dialogTitle() const override { return qt_("Tabular Settings"); }
49 void paramsToDialog(Inset const *) override;
50 docstring dialogToParams() const override;
51 bool checkWidgets(bool readonly) const override;
55 void enableWidgets() const;
57 void setHAlign(std::set<std::string> & params) const;
59 void setVAlign(std::set<std::string> & params) const;
61 void setTableAlignment(std::set<std::string> & params) const;
63 std::set<std::string> const getTabFeatures() const;
65 void setWidthAndAlignment();
67 bool funcEnabled(Tabular::Feature f) const;
69 GuiSetBorder::BorderState borderState(GuiSetBorder::BorderState bs,
72 bool firstheader_suppressable_;
74 bool lastfooter_suppressable_;
76 GuiSetBorder::BorderState orig_leftborder_;
78 GuiSetBorder::BorderState orig_rightborder_;
82 docstring decimal_sep_;
84 std::set<std::string> features_;
87 } // namespace frontend
90 #endif // GUITABULAR_H