]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiTabularCreate.h
math stuff
[lyx.git] / src / frontends / qt4 / GuiTabularCreate.h
1 // -*- C++ -*-
2 /**
3  * \file GuiTabularCreate.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  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUITABULARCREATE_H
13 #define GUITABULARCREATE_H
14
15 #include "GuiDialog.h"
16 #include "ui_TabularCreateUi.h"
17
18 #include <utility>
19
20 namespace lyx {
21 namespace frontend {
22
23
24 class GuiTabularCreate
25         : public GuiDialog, public Ui::TabularCreateUi, public Controller
26 {
27         Q_OBJECT
28
29 public:
30         GuiTabularCreate(LyXView & lv);
31
32 private Q_SLOTS:
33         void columnsChanged(int);
34         void rowsChanged(int);
35
36         /// parent controller
37         Controller & controller() { return *this; }
38
39 private:
40         /// Apply changes
41         void applyView();
42         ///
43         bool initialiseParams(std::string const & data);
44         /// clean-up on hide.
45         void clearParams();
46         ///
47         void dispatchParams();
48         ///
49         bool isBufferDependent() const { return true; }
50         ///
51         kb_action getLfun() const { return LFUN_TABULAR_INSERT; }
52
53         ///
54         typedef std::pair<size_t, size_t> rowsCols;
55         ///
56         rowsCols & params() { return params_; }
57
58 private:
59         /// rows, cols params
60         rowsCols params_;
61 };
62
63 } // namespace frontend
64 } // namespace lyx
65
66 #endif // GUITABULARCREATE_H