]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiTabular.h
* fix spelling in comments to please John.
[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 "GuiDialog.h"
19 #include "ui_TabularUi.h"
20 #include "insets/InsetTabular.h"
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiTabular : public GuiDialog, public Ui::TabularUi
26 {
27         Q_OBJECT
28
29 public:
30         GuiTabular(GuiView & lv);
31         ~GuiTabular();
32
33 private Q_SLOTS:
34         void change_adaptor();
35
36         void topspace_changed();
37         void bottomspace_changed();
38         void interlinespace_changed();
39         void booktabsChanged(bool);
40         void borderSet_clicked();
41         void borderUnset_clicked();
42
43 private:
44         ///
45         bool isValid() { return true; }
46         /// update borders
47         void update_borders();
48         ///
49         void applyView();
50         /// update
51         void updateContents();
52         ///
53         bool initialiseParams(std::string const & data);
54         /// clean-up on hide.
55         void clearParams();
56         /// We use set() instead.
57         void dispatchParams() {};
58         ///
59         bool isBufferDependent() const { return true; }
60         ///
61         FuncCode getLfun() const { return LFUN_TABULAR_FEATURE; }
62
63         ///
64         Tabular::idx_type getActiveCell() const;
65         /// set a parameter
66         void set(Tabular::Feature, std::string const & arg = std::string());
67
68         bool funcEnabled(Tabular::Feature f) const;
69
70         ///
71         Tabular::idx_type active_cell_;
72         ///
73         Tabular tabular_;
74         ///
75         bool applying_;
76 };
77
78 } // namespace frontend
79 } // namespace lyx
80
81 #endif // GUITABULAR_H