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