]> git.lyx.org Git - lyx.git/blob - src/frontends/qt/GuiTabular.h
Fix readability
[lyx.git] / src / frontends / qt / 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 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;
52         //@}
53
54         ///
55         void enableWidgets() const;
56         ///
57         void setHAlign(std::set<std::string> & params) const;
58         ///
59         void setVAlign(std::set<std::string> & params) const;
60         ///
61         void setTableAlignment(std::set<std::string> & params) const;
62         ///
63         std::set<std::string> const getTabFeatures() const;
64         ///
65         void setWidthAndAlignment();
66         ///
67         bool funcEnabled(Tabular::Feature f) const;
68         ///
69         GuiSetBorder::BorderState borderState(GuiSetBorder::BorderState bs,
70                                               bool const line);
71         ///
72         bool firstheader_suppressable_;
73         ///
74         bool lastfooter_suppressable_;
75         ///
76         GuiSetBorder::BorderState orig_leftborder_;
77         ///
78         GuiSetBorder::BorderState orig_rightborder_;
79         ///
80         int lastrow_;
81         ///
82         docstring decimal_sep_;
83         ///
84         std::set<std::string> features_;
85 };
86
87 } // namespace frontend
88 } // namespace lyx
89
90 #endif // GUITABULAR_H