]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiTabular.h
Migrate GuiLine to InsetParamsWidget.
[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
37 private:
38         /// \name InsetParamsWidget inherited methods
39         //@{
40         InsetCode insetCode() const { return TABULAR_CODE; }
41         FuncCode creationCode() const { return LFUN_TABULAR_INSERT; }
42         void paramsToDialog(Inset const *);
43         docstring dialogToParams() const;
44         //@}
45
46         ///
47         void setHAlign(std::string & param_str) const;
48         ///
49         void setVAlign(std::string & param_str) const;
50         ///
51         void setTableAlignment(std::string & param_str) const;
52         ///
53         void setWidthAndAlignment();
54         ///
55         bool funcEnabled(Tabular::Feature f) const;
56 };
57
58 } // namespace frontend
59 } // namespace lyx
60
61 #endif // GUITABULAR_H