]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QTabularCreate.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QTabularCreate.C
1 /**
2  * \file QTabularCreate.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QTabularCreateDialog.h"
14 #include "QTabularCreate.h"
15 #include "Qt2BC.h"
16
17 #include "controllers/ControlTabularCreate.h"
18
19 #include <qspinbox.h>
20 #include <qpushbutton.h>
21
22 namespace lyx {
23 namespace frontend {
24
25 typedef QController<ControlTabularCreate, QView<QTabularCreateDialog> > base_class;
26
27
28 QTabularCreate::QTabularCreate(Dialog & parent)
29         : base_class(parent, lyx::to_utf8(_("Insert Table")))
30 {
31 }
32
33
34 void QTabularCreate::build_dialog()
35 {
36         dialog_.reset(new QTabularCreateDialog(this));
37
38         bcview().setOK(dialog_->okPB);
39         bcview().setCancel(dialog_->closePB);
40 }
41
42
43 void QTabularCreate::apply()
44 {
45         controller().params().first = dialog_->rowsSB->value();
46         controller().params().second = dialog_->columnsSB->value();
47 }
48
49 } // namespace frontend
50 } // namespace lyx