2 * \file QTabularCreate.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "QTabularCreate.h"
15 #include "EmptyTable.h"
17 #include "controllers/ControlTabularCreate.h"
20 #include <QPushButton>
25 /////////////////////////////////////////////////////////////////////
27 // QTabularCreateDialog
29 /////////////////////////////////////////////////////////////////////
31 QTabularCreateDialog::QTabularCreateDialog(QTabularCreate * form)
37 columnsSB->setValue(5);
39 connect(okPB, SIGNAL(clicked()), form_, SLOT(slotOK()));
40 connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose()));
42 connect(rowsSB, SIGNAL(valueChanged(int)),
43 this, SLOT(rowsChanged(int)));
44 connect(columnsSB, SIGNAL(valueChanged(int)),
45 this, SLOT(columnsChanged(int)));
49 void QTabularCreateDialog::columnsChanged(int)
55 void QTabularCreateDialog::rowsChanged(int)
61 /////////////////////////////////////////////////////////////////////
65 /////////////////////////////////////////////////////////////////////
67 typedef QController<ControlTabularCreate, QView<QTabularCreateDialog> >
71 QTabularCreate::QTabularCreate(Dialog & parent)
72 : TabularCreateBase(parent, _("Insert Table"))
77 void QTabularCreate::build_dialog()
79 dialog_.reset(new QTabularCreateDialog(this));
81 bcview().setOK(dialog_->okPB);
82 bcview().setCancel(dialog_->closePB);
86 void QTabularCreate::apply()
88 controller().params().first = dialog_->rowsSB->value();
89 controller().params().second = dialog_->columnsSB->value();
92 } // namespace frontend
95 #include "QTabularCreate_moc.cpp"